## File: README.md
---
## 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
[](https://codesandbox.io/p/github/ErKeLost/react/main)
## Why Farm?
> See [Why Farm](https://farmfe.org/docs/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](https://farmfe.org/docs/using-plugins#using-vite-plugins-in-farm)
> - Since Farm v0.14, persistent disk cache enabled by default. Refer to [Incremental Building](https://farmfe.org/docs/advanced/persistent-cache)
> - Now Farm is **1.0 stable** and **production ready!**. See [Farm official website](https://farmfe.org/) 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 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. Refer to [RFC-003 Partial Bundling](https://github.com/farm-fe/rfcs/blob/main/rfcs/003-partial-bundling/rfc.md) 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](https://github.com/farm-fe/rfcs/blob/main/rfcs/001-core-architecture/rfc.md#motivation) for design motivation and architecture.
## Getting Started
Create a new Farm project with your favorite package manager:
```bash
# with npm
npm create farm@latest
# with yarn
yarn create farm@latest
# with pnpm
pnpm create farm@latest
```
Visit [Farm Documentation](https://farmfe.org) 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](https://github.com/farm-fe/performance-compare) for details.
## Contribution
See [Contributing Guide](https://github.com/farm-fe/farm/blob/main/CONTRIBUTING.md).
## Chat With Us
- [Author Twitter](https://twitter.com/brightwwu46799), [Official Twitter](https://twitter.com/FarmFe71928)
- With [Discord](https://discord.gg/mDErq9aFnF)
- Wechat group
- QQ group
## Contributors
| | |
| --- | --- |
| | |
| | |
## Credits
Thanks to https://github.com/tmm who donated the [farm](https://www.npmjs.com/package/farm) npm package to the Farm team.
Thanks to projects:
- The [SWC](https://github.com/swc-project/swc) project created by [@kdy1](https://github.com/kdy1), which powers Farm's code parsing, transformation and minification.
- The [NAPI-RS](https://github.com/napi-rs/napi-rs) project created by [@Brooooooklyn](https://github.com/Brooooooklyn), which powers Farm's node-binding implementation.
- The [Rollup](https://github.com/rollup/rollup) project created by [@lukastaegert](https://github.com/lukastaegert), which inspired Farm's plugin system implementation.
- The [Vite](https://github.com/vitejs/vite) project created by [Evan You](https://github.com/yyx990803), which inspired Farm's compatibility design of ecosystem.
## Author & Maintainer
Author:
- [brightwu(吴明亮)](https://github.com/wre232114),worked at bytedance. [Twitter](https://twitter.com/brightwwu46799)
Maintainer:
- [ErKeLost](https://github.com/ErKeLost)
- [shulandmimi](https://github.com/shulandmimi)
---
## File: .changeset/README.md
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
---
## File: crates/utils/README.md
# farmfe_utils
Rust utils package for Rust web compiler [Farm](https://github.com/farm-fe/farm).
---
## File: crates/macro_plugin/README.md
# farmfe_macro_cache_item
Make a struct or enum cacheable, using by [Farm](https://github.com/farm-fe/farm).
---
## File: crates/macro_cache_item/README.md
# farmfe_macro_cache_item
Make a struct or enum cacheable, using by [Farm](https://github.com/farm-fe/farm).
---
## File: crates/create-farm-rs/templates/vue3/README.md
# Farm + Vue
This template should help you start developing using Vue and TypeScript in Farm.
## Setup
Install the dependencies:
```bash
pnpm install
```
## Get Started
Start the dev server:
```bash
pnpm start
```
Build the app for production:
```bash
pnpm build
```
Preview the Production build product:
```bash
pnpm preview
```
Clear persistent cache local files
```bash
pnpm clean
```
---
## File: crates/create-farm-rs/templates/vue2/README.md
# Farm + Vue
This template should help you start developing using Vue and TypeScript in Farm.
## Setup
Install the dependencies:
```bash
pnpm install
```
## Get Started
Start the dev server:
```bash
pnpm start
```
Build the app for production:
```bash
pnpm build
```
Preview the Production build product:
```bash
pnpm preview
```
Clear persistent cache local files
```bash
pnpm clean
```
---
## File: crates/create-farm-rs/templates/vanilla/README.md
# Farm + TypeScript
This template should help you start developing using TypeScript in Farm.
## Setup
Install the dependencies:
```bash
pnpm install
```
## Get Started
Start the dev server:
```bash
pnpm start
```
Build the app for production:
```bash
pnpm build
```
Preview the Production build product:
```bash
pnpm preview
```
Clear persistent cache local files
```bash
pnpm clean
```
---
## File: crates/create-farm-rs/templates/tauri2/vue/README.md
# Tauri + Vue + TypeScript
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `