Farm is a super-fast web-building tool written in Rust, like webpack and vite, but much faster.
Farm is designed to be performance first, benchmark against other tools (using Turbopack's benchmark, 1000 React components) as shown below:
Test Repository: https://github.com/farm-fe/performance-compare
Test Machine (Linux Mint 21.1 Cinnamon, 11th Gen Intel© Core™ i5-11400 @ 2.60GHz × 6, 15.5 GiB)
- ⚡ Super Fast: Written in Rust, start a React / Vue project in milliseconds and perform an HMR update within 10ms for most situations.
- 🧰 Fully Pluggable: Everything inside Farm is powered by plugins, supports Farm compilation plugins(both Rust and JavaScript plugins, and SWC plugins), Farm runtime plugins and Farm server plugin. Achieve anything you want by creating a plugin.
- ⚙️ Powerful: Compiles JS/TS/JSX/TSX, CSS, Css Modules, Sass, Less, Postcss, HTML, and static assets out of the box. Support official compilation plugins for Popular frameworks like React, Vue, SolidJs.
- ⏱️ Lazy Compilation: Dynamically imported resources are compiled only when requested, speed up compilation for large scale project. Just write a
dynamic import
and 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.
- 🔒 Consistency: What you see in development will be the same as what you get in production.
- 🌳 Compatibility: Supports both legacy (ES5) and modern browsers.
See RFC-001 for design motivation and principles.
Create a new Farm(support both React and Vue) project with your favorite package manager:
# with npm
npm create farm@latest
# with yarn
yarn create farm@latest
# with pnpm
pnpm create farm@latest
Then start the project:
cd farm-project && npm start
See our 1 minute quick start video:
farm-quick-start.mp4
Refer to the Documentation to learn more about Farm.
See Contributing Guide.
Farm support compiling React, Vue, SolidJS, Sass, Less, and Css Modules officially out of the box. See our examples:
- React-Basic
- React-Ant-Design
- React-Sass-CssModules
- React-Multi-Page-Application
- React-SSR
- React-TailwindCSS
- React-Emotion
The Farm has implemented all features of a web build tool, including production optimization like tree shake and minification. We have already migrated enterprise projects to Farm, and it works great!
See RoadMap.
-
With Discord
-
Wechat group
![](https://private-user-images.githubusercontent.com/66500121/258802630-19fe1c76-318c-4440-8146-bed9d0e14ae7.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyNjg3MjcsIm5iZiI6MTcyMzI2ODQyNywicGF0aCI6Ii82NjUwMDEyMS8yNTg4MDI2MzAtMTlmZTFjNzYtMzE4Yy00NDQwLTgxNDYtYmVkOWQwZTE0YWU3LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEwVDA1NDAyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThlZDk4NWVmY2FkNTFkMzczNzUxYWQ0NDkyN2YxYWI1ZjllMjAyMjZjNjBmOGRiN2RkZGYxZDFmZmZhOWRjMmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YG3Eh8ZBCDNqXP0QHugkjEiqVIa0pcMaoftbMvpa1-M)
brightwu(吴明亮), worked at Bytedance and Tencent.