Disclaimer: This documentation is targeted towards people making changes to the Rust Turbopack codebase. If you are using Turbopack in a Next.js project, please refer to the Next.js documentation.
Turbo Tasks
Turbo Tasks is the incremental computation framework that powers Turbopack.
turbo-tasks: Incremental memoized computation framework with dependency tracking and invalidationturbo-tasks-backend: Persistent caching backend for turbo-tasks with on-disk storageturbo-tasks-fs: File system access, watching, globbing, and readingturbo-tasks-env: Environment variable access and .env file loadingturbo-tasks-fetch: HTTP fetchingturbo-tasks-bytes: Byte streams and buffer typesturbo-tasks-hash: Deterministic hashing and encoding utilitiesturbo-tasks-macros: Procedural macros for defining turbo-tasks values, traits, and functionsturbo-tasks-malloc: Allocation-tracking global allocator wrapperturbo-tasks-testing: Testing utilities and macros for turbo-tasks
Shared Data Structures
These crates provide shared data structures and utilities used throughout the project.
turbo-rcstr: Reference-counted immutable string typeauto-hash-map: Size-adaptive hash collectionsturbo-frozenmap: Compact immutable sorted map and set collectionsturbo-prehash: Pre-computed hash wrapper for expensive valuesturbo-dyn-eq-hash: Dynamic-dispatch Eq and Hash for trait objectsturbo-persistence: LSM-tree based persistent key-value databaseturbo-bincode: Bincode serialization utilities and helpersturbo-static: Static dependency graph analysis for turbo-tasks functionsturbo-esregex: ECMAScript-compatible regular expressionsturbo-unix-path: Unix path manipulation and normalization
Core
There crates are the core of turbopack, providing the basic traits and types. This handles things such as issue reporting, resolving, and environments.
turbopack-core: Core types and traitsturbopack-resolve: Specific resolving implementations
Utils
These crates provide utility functions and types that are used throughout the project.
turbopack-swc-utils: SWC helpers that are shared between ecmascript and cssturbopack-node: Node.js pool processing, webpack loaders, postcss transformturbopack-nft: Node file tracingturbopack-env: .env file loading
Modules
These crates provide implementations of various module types.
turbopack-ecmascript: The ecmascript module type (JavaScript, TypeScript, JSX), Tree Shakingturbopack-ecmascript-plugins: Common ecmascript transforms (styled-components, styled-jsx, relay, emotion, etc.)turbopack-css: The CSS module type (CSS, CSS Modules, SWC, lightningcss)turbopack-static: The static module type (images, fonts, etc.)turbopack-image: Image processing (metadata, optimization, blur placeholder)turbopack-wasm: The WebAssembly module typeturbopack-mdx: The mdx module type
Output
These crates provide implementations of various output formats.
turbopack-browser: Output format for the browser target, HMRturbopack-nodejs: Output format for the Node.js targetturbopack-ecmascript-runtime: The runtime code for bundlesturbopack-ecmascript-hmr-protocol: The Rust side of the HMR protocol
Facade
These crates provide the facade to use Turbopack. They combine the different modules and output formats into presets and handle the default module rules.
turbopack: The main facade bundling all module types and rules when to apply them, presets for resolving and module processing
CLI
These crates provide the standalong CLI and the dev server.
turbopack-cli: The Turbopack CLIturbopack-dev-server: The on demand dev server implementation
CLI Utils
These crates provide utility functions for the CLI.
turbopack-cli-utils: Helper functions for CLI toolingturbopack-trace-utils: Helper function for tracing
Tools
These crates provide tools to test, benchmark and trace Turbopack.
turbopack-analyze: Bundle analysis and chunk size attributionturbopack-bench: The Turbopack benchmarkturbopack-tracing: Node file trace tests and benchmarksturbopack-tests: Integration tests for Turbopackturbopack-create-test-app: A CLI to create a test application with configurable number of modulesturbopack-test-utils: Helpers for testingturbopack-trace-server: A CLI to open a trace file and serve it in the browserswc-ast-explorer: A CLI tool to explore the SWC AST
Additional Material: Conference Talks and Blog Posts
- Next.js Conf 2025: Are we Turbo yet? (Video)
- Inside Turbopack: Building Faster by Building Less (Blog Post)
- GitNation: The Core of Turbopack Explained (Live Coding)
- GitNation: Rethinking Bundling Strategies (Video)
- GitNation: Turbopack. Why? How? When? and the Vision… (Video)
- Turbopack updates: Moving homes (Blog Post)