Skip to content

y3l1n4ung/dust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

226 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒͺ️ Dust

You focus on product. We focus on performance.

CI Release License

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.

Our Promise

  • 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.


✨ Why Dust?

  • πŸš€ 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.

πŸ—οΈ Supported Features

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 β†’

πŸš€ Quick Start

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 dust
cd 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_showcase

The final command should report the showcase is clean:

check  scanned: 25  clean: 25  stale: 0

Use Dust in your project

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.


πŸ› οΈ Commands

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.

🀝 Contributing

Dust is open-source and we welcome all contributors!


πŸ“œ License

MIT. See LICENSE. Copyright (c) 2026 Ye Lin Aung.

About

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.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors