Turbopack’s next phase: A move into Next.js
Turbopack, Vercel’s Rust-based JavaScript and TypeScript bundler, is relocating. Over the next few weeks, the source code will be transferred from the vercel/turbo repository to the vercel/next.js monorepo. The goal is to streamline development by co-locating Turbopack with its primary consumer, Next.js, which should accelerate progress toward a stable release with production build support.
This move does not affect the Turborepo build system, which stays in the vercel/turbo repository. There are no changes to how you interact with Turbopack, Turborepo, or Next.js.
Why consolidate the codebases?
Initially, housing both Turbopack and Turborepo together made sense, especially after Turborepo’s migration from Go to Rust. However, as Next.js became the main testbed during development, the frequent internal changes in Turbopack began affecting Next.js more than Turborepo. This forced a constant cycle of cross-repository dependency synchronization and change coordination.
To manage this, the team developed custom tooling to check out both codebases, combine Cargo.toml files into a unified workspace, and merge Cargo lockfiles. These hacks were fragile, partial fixes. They also complicated onboarding for new engineers and sometimes required upstream patches to IDE plugins to resolve workflow issues. The new setup will use a top-level Cargo.toml with Cargo workspaces, mirroring the organization of a JavaScript workspace. This will also simplify release management, allowing hotfixes for both Next.js and Turbopack to be backported into a single Git branch.
Will Turbopack remain framework-agnostic?
Yes, the core of the bundler stays framework-agnostic. The near-term focus is firmly on Next.js to provide clearer development boundaries. This benefits users in two key ways:
- Faster impact at scale: By using Next.js as the scope limit, the team can more effectively address the needs of the growing number of developers building large applications with it.
- Better API design: Changes can be iterated on within a single pull request, validated against the Next.js test suite in CI, leading to more robust Turbopack APIs.
Once the bundler reaches a stable, general-purpose state, it will be moved to its own separate repository again.
How the migration happens
The migration will use git-subtree in combination with git-filter-branch to copy the entire Turbopack source code and its commit history. Before the move, CI configuration and build scripts will be updated to ensure all testing infrastructure transfers correctly.
Current status and priorities
Turbopack is advancing toward stability. It now passes 100% of the Next.js development test suite, works with all Next.js examples, and has verified that the top 300 npm packages for Next.js applications compile without issue. The team also uses Turbopack daily to develop vercel.com, noting it is significantly faster than webpack for startup and code updates.
An example of how we must cross repository boundaries to make breaking changes today.
Work has also started on production builds, with progress tracked publicly at areweturboyet.com/build. The team’s current focus areas are:
- Resolving user-reported bugs and performance regressions: Addressing edge cases that aren’t covered by the existing test suite.
- Reducing memory consumption: Improving the fine-grained, function-level caching framework for better cache eviction and avoiding storage of rarely reused intermediate results.
- Completing persistent on-disk caching: Finishing serialization and deserialization work to enable a persistent cache by default. Even without it, cold starts are typically faster than webpack with a warm cache.
- Finalizing production build optimizations: Implementing features like tree shaking, a key challenge recently discussed by Tobias Koppers at JSNation 2024.

An example of how we must cross repository boundaries to make breaking changes today.

