Skip to content
Search

Turborepo

lastmod 2023-03-09created 2021-12-133 edits

A fast build system for JavaScript/TypeScript monorepos

Features

  • Acquired by Vercel
  • A fast build system for JavaScript/TypeScript monorepos
    • Monorepos are good for productivity in frontend work, but the tooling was complex, so this tool improves on that
  • Supports incremental builds
  • Content-aware hashing rather than timestamps
  • Remote caching lets teammates and CI/CD systems build faster
  • Parallel execution using all cores
  • Zero Runtime Overhead: does not touch runtime code / source maps
  • Generates only a subset for a specific target from the monorepo, speeding up PaaS deployment
  • Task Pipelines: defines connections between tasks to optimize when and how builds run

Why Turborepo is migrating from Go to Rust

"Why Turborepo is migrating from Go to Rust" by Vercel

  • Turborepo is a high-performance build system for JavaScript / TypeScript
    • Tries to improve performance with incremental builds, parallel execution, remote caching (using Vercel infrastructure), etc.
    • Initially built following esbuild, which showed good performance
  • Codebase merged with Turbopack, written in Rust, under the Turbo package
  • Felt that Go's strengths in server development differ from what is needed when building a build tool
    • Go: focuses on the goroutine model, the Context API, and a standard library for server infrastructure
    • Rust: Process management, Filesystem, Low-level OS concepts, distributing to user machines
  • Strong ecosystem, with many diverse and good crates (packages) already available
  • Using C/C++ libraries is simpler and faster than in Go
  • Sharing a codebase with Turbopack brings advantages in maintenance, code sharing, etc.
  • Rust makes developers happy and thus brings various positive effects
  • Currently used in a "Rust-Go-Rust" structure, but migration will continue

Monorepo Projects

  • Monorepo
  • Bazel (by Google) - A fast, scalable, multi-language and extensible build system.
  • Gradle (by Gradle, Inc) - A fast, flexible polyglot build system designed for multi-project builds.
  • Lage (by Microsoft) - Task runner in JS monorepos
  • Lerna - A tool for managing JavaScript projects with multiple packages.
  • Nx (by Nrwl) - Next generation build system with first class monorepo support and powerful integrations.
  • Rush (by microsoft) - Geared for large monorepos with lots of teams and projects. Part of the Rush Stack family of projects.
  • Turborepo (by Vercel) - The high-performance build system for JavaScript & TypeScript codebases.
  • Pants
  • Earthly

See also

Favorite site

author Zer0 sitemap