farm
Farm is a Rust-based web build tool and bundler that is largely compatible with the Vite ecosystem, using SWC for parsing/transformation to deliver very fast cold starts, sub-20ms HMR, and consistent dev/prod output. It supports Vite plugins out of the box, persistent module-level caching, lazy compilation, and partial bundling.
MITPermissive — free to use in commercial and proprietary software, with attribution.View license →
Production readiness
5/5- Actively maintainedCommits in the last 6 months
- No known vulnerabilitiesNo OSV advisories
- Clear, usable licenseMIT (permissive)
- Proven adoptionWidely used
- Has documentationDocumentation indexed
cargo add farm-feOur analysis
Farm is a web build tool/bundler written in Rust that aims to be a drop-in-compatible alternative to Vite, combining Rust-native speed with the existing Vite plugin ecosystem.
When to use farm
Use Farm when you want Vite-like DX and plugin compatibility but need faster cold starts and HMR on large codebases, want consistent dev/production output (a single bundling strategy), or are hitting Vite's many-requests-during-dev or code-splitting limitations.
When not to
Stick with Vite if you depend on niche plugins or edge-case behaviors not yet covered by Farm's compatibility layer, or if you want the largest community and most battle-tested ecosystem. For library bundling Rollup/tsup may be simpler, and framework-specific meta-frameworks (Next.js, Nuxt) bring their own integrated tooling.
Strengths
- Rust + SWC core gives very fast cold starts and sub-20ms HMR, benchmarked far ahead of webpack and Vite
- Vite plugin compatibility lowers migration cost and reuses an established ecosystem
- Persistent, module-level disk cache enabled by default for incremental builds
- Consistent dev/production strategy avoids dev-vs-prod debugging surprises
- Partial bundling and lazy compilation address real large-project pain points
Trade-offs
- Vite compatibility is approximate — some plugins and behaviors may not work identically
- Smaller community and ecosystem than Vite/webpack, so fewer tutorials and battle-tested integrations
- Writing native Rust plugins requires more expertise than JS plugins
- As a newer tool, long-term maintenance depends on a relatively small core team
Maturity
Declared 1.0 stable and production-ready, with full feature coverage (tree-shaking, minification) and reported enterprise migrations. Backed by ~5.5k stars, active contributors, and an RFC-driven design process, though it is younger and less widely adopted than incumbents.
Intro
Farm is an extremely fast, Vite-compatible web build tool written in Rust. Designed to be fast, powerful, and consistent, it delivers the best web development experience — the real next-generation build tool.
Online experience
Why Farm?
See Why Farm for details.
In short, tools like webpack are too slow, but new tools like Vite are not perfect, Vite has a lot of drawbacks when comes to a large project:
A huge number of requests during development:when there are hundreds or thousands modules per page, loading performance severely degraded, it may takes seconds or more when refresh the page.
Inconsistency between development and production: Using different strategy and tools in development and production, it's really inconsistent and it's hard to debug online issues.
Inflexible Code Splitting: It's hard to control the output of your bundles.
Farm can solve these problems perfectly, and it's really fast cause it's written in Rust. Farm aims to be fast, consistent, flexible, which is the real next generation build tool.
Features
[!NOTE]
Since Farm v0.13, Vite plugins can be used directly in Farm. Refer to Using vite plugins in Farm
Since Farm v0.14, persistent disk cache enabled by default. Refer to Incremental Building
Now Farm is 1.0 stable and production ready!. See Farm official website to get started.
⚡ Extremely Fast: Written in Rust, start a React / Vue project in milliseconds and perform an HMR update within 20ms for most situations.
⚡ Incremental Building: Support persistent cache, module level cache enabled by default, any module won't be compiled twice until it's changed!
🧰 Fully Pluggable and Vite Compatible: Everything inside Farm is powered by plugins, Support Vite Plugins out of box. Supports Farm compilation plugins(both Rust and JavaScript plugins, and SWC plugins), Farm runtime plugins and Farm server plugin.
⚙️ Powerful: Compiles JS/TS/JSX/TSX, CSS, CSS Modules, HTML, and static assets out of the box. Official compilation plugins for React, Vue, Sass, Less, PostCSS, and more.
⏱️ Lazy Compilation: Dynamically imported resources are compiled only when requested, speed up compilation for large scale project. Just write a
dynamic importand the imported module won't be compiled when it is executed.📦 Partial Bundling: Bundle your project into a few reasonable bundles automatically, speeding up resource loading without losing caching granularity. Refer to RFC-003 Partial Bundling for details.
🔒 Consistency: What you see in development will be the same as what you get in production.
🌳 Compatibility: Supports both legacy (ES5) and modern browsers.
Farm has implemented all features of a web build tool, including production optimization like tree shake and minification. It's now 1.0 stable. We have already migrated enterprise projects to Farm, and it works great!
See RFC-001 Architecture for design motivation and architecture.
Getting Started
Create a new Farm project with your favorite package manager:
# with npm
npm create farm@latest
# with yarn
yarn create farm@latest
# with pnpm
pnpm create farm@latest
Visit Farm Documentation to learn more about Farm.
Benchmark
Farm is much faster than similar tool, 20x faster than webpack and 10x faster than Vite in the benchmark:

See Benchmark for details.
Contribution
See Contributing Guide.
Chat With Us
With Discord
Wechat group
QQ group
Contributors
Credits
Thanks to https://github.com/tmm who donated the farm npm package to the Farm team.
Thanks to projects:
The SWC project created by @kdy1, which powers Farm's code parsing, transformation and minification.
The NAPI-RS project created by @Brooooooklyn, which powers Farm's node-binding implementation.
The Rollup project created by @lukastaegert, which inspired Farm's plugin system implementation.
The Vite project created by Evan You, which inspired Farm's compatibility design of ecosystem.
Author & Maintainer
Author:
brightwu(吴明亮),worked at bytedance. Twitter
Maintainer: