Write cross-platform application with React-like declarative UI framework
and scalable ECS architecture all in Rust.
WARNING:
bevy_dioxus
is still in the very early stages of development.
```rust, norun use bevy::prelude::*; use bevydioxus::desktop::prelude::; use dioxus::prelude::;
fn main() {
App::new()
.insertresource(WindowDescriptor {
title: "Bevy Dioxus Plugin Example".tostring(),
..Default::default()
})
.add_plugin(DioxusPlugin:: fn Root(cx: Scope) -> Element {
cx.render(rsx! {
h1 { "Hello, World !" }
})
}
``` Dioxus is a cross-platform declarative UI framework. It provides familiar features that React developer expects such as component, state, props, hooks, global state, and router. If you familiar with any modern state driven UI framework, you should be able to read or write Dioxus components without knowing Rust. Bevy is a cutting-edge game engine in Rust based on Entity Component System(ECS) design pattern. Think of it as a global state management tool like Redux but much more performant because all systems will run concurrently as much as possible. Thanks to its plugin system, there's already a handlfull of third-party Bevy plugins out there. Imagine implemnenting core logic as Make sure to install all prerequisites for Tauri.
Prerequisites ```sh
gh repo clone JunichiSugiura/bevydioxus
cd bevydioxus cargo run --example counter
``` More examples can be found in examples/ directory. ```sh cargo build --examples cargo run --example counter
``` ```sh npm i zola -r packages/website serve --drafts npm run watch npm run build
``` ```sh cargo doc --open --no-deps cargo watch -s 'cargo doc && http target/doc'
``` Make sure to use About Dioxus and Bevy
Dioxus
Bevy
CorePlugin
seperated from UI layer. You may start with bevy_dioxus
to build desektop application. Then let's say you want to release a metaverse edition at some point in the future, it's as simple as swapping UI plugin to Bevy's 3d rendering plugin while still using the same CorePlugin.Try examples
Development
Prerequisites
General
sh
cargo install convco
# or
brew install convco/formulae/convco
sh
cargo install cargo-workspaces
Website
sh
brew install zola
API Reference
sh
cargo install cargo-watch
Run
Examples
Build
or Run
Website
Install dependencies
Serve locally
Watch Tailwind CSS
or build
API Reference
Serve doc locally
Watch file changes and serve doc locally
Conventions
Branch name example
sh
git checkout -b docs/#20-guide-website
Conventional Commits
convco commit
instead of git commit
when it should be noted in changelog. git-cliff will automatically generates changelog on conventional-commit message that convco produces.
sh
convco commit