You focus on product. We focus on performance.
Dust is a high-performance alternative to build_runner. It offers built-in
support for data classes, validation, JSON serialization, HTTP clients, routing,
state management, and database codegen.
- Stable public APIs for features marked stable.
- Performance and quality improvements should change generated code, the Rust engine, and runtime internals first.
- Features marked beta may still receive API refinements before stabilization.
- Your handwritten product code should stay focused on product logic.
Important
Tired of waiting for your code to generate? Dust is built to handle the large Flutter projects with near-instant rebuilds.
- π Performance: Written in Rust. Generates thousands of files in seconds.
- π― Product Focus: We handle code generation so you focus only on product.
- π§± Stable By Design: Public APIs are designed to stay stable; improvements should land in generated code and internals first.
- π§© All-in-One: Data classes, JSON, validation, HTTP clients, routing, state, and DB codegen in one unified tool.
- π Incremental: Intelligent watch mode only rebuilds the specific files you edited.
- π‘οΈ Type Safe: Advanced validation catches errors before you even run your app.
| Feature | Stability | Description | Documentation |
|---|---|---|---|
| Data Classes | Stable public API. API will not change. | ToString, Eq, HashCode, and CopyWith generation. |
Read Guide β |
| JSON Serialization | Stable public API. API will not change. | Blazing fast JSON encode/decode with support for renames and custom codecs. | Read Guide β |
| Validation | Stable public API. API will not change. | Dart model validation plus Flutter-only form validators from typed field rules. | Read Guide β |
| HTTP Client | Stable public API. API will not change. | Type-safe, Dio-backed API client generation from annotations. | Read Guide β |
| Routing | Beta. API may still be refined. | Boilerplate-free Navigator 2.0 routing with typed parameters. | Read Guide β |
| State Management | Beta. API may still be refined. | Lightweight, high-performance state containers with action generation. | Read Guide β |
| Database | Beta. API may still be refined. | SQLx-style sqlite3 query validation, DAOs, and row mapping. | Read Guide β |
| Firebase | Coming soon. | Typed Firebase integration and generated data access helpers. | (Coming Soon) |
| Supabase | Coming soon. | Typed Supabase integration and generated data access helpers. | (Coming Soon) |
| i18n | Beta. API may still be refined. | Flutter i18n runtime, ARB assets, static scanning, generated bootstrap, and translation checks. | Read Guide β |
This path clones Dust, fetches the example dependencies, runs generation, and
verifies the generated files are current. It requires Git, Rust stable, and the
Dart/Flutter SDK on your PATH.
git clone https://github.com/y3l1n4ung/dust.git
cd dustcd examples/product_showcase
dart pub get
cd ../..cargo run -p dust_cli -- build --root examples/product_showcase
cargo run -p dust_cli -- check --root examples/product_showcaseThe final command should report the showcase is clean:
check scanned: 25 clean: 25 stale: 0
Add annotations to your Dart source:
import 'package:dust_dart/dust_dart.dart';
part 'user.g.dart';
@Derive([ToString(), CopyWith(), Serialize()])
class User with _$User {
final String name;
const User(this.name);
}When using an installed CLI in your own package, run dust build from that
package root. From a source checkout, use the same pattern with
cargo run -p dust_cli -- build --root path-to-your-package.
| Command | Description |
|---|---|
dust build |
Run a full project generation. |
dust watch |
High-performance file watcher for instant rebuilds. |
dust check |
CI mode: Verifies if generated files are up to date. |
dust clean |
Clears all generated files and persistent caches. |
Dust is open-source and we welcome all contributors!
- Found a bug? Open an issue
- Security reports: Use private vulnerability reporting
- Rust/Dart Setup: See CONTRIBUTING.md
- Architecture: Read the Developer Guide
MIT. See LICENSE. Copyright (c) 2026 Ye Lin Aung.