| Crates.io | cargo-bavy |
| lib.rs | cargo-bavy |
| version | 0.2.0 |
| created_at | 2022-08-18 23:07:09.566345+00 |
| updated_at | 2022-08-20 22:52:02.513216+00 |
| description | A third-party command line utility for the Bevy game engine. |
| homepage | |
| repository | https://github.com/TimJentzsch/cargo-bevy-mod |
| max_upload_size | |
| id | 648410 |
| size | 127,886 |
A third-party command-line utility for the Bevy game engine.
To not steal the cargo bevy command from the official Bevy maintainers, I chose cargo bavy instead.
cargo install cargo-bavy
Run the following command:
cargo bavy new <FOLDER_NAME>
You can then select all the features that you want. Afterwards, a template project with the given name is created for you.
Run the following command:
cargo bavy run
This works similar to cargo run, but automatically passes the --features bevy/dynamic flag to get faster compile times.
It also provides a --wasm/-w flag, which allows you to quickly test your game for the web.
It will automatically compile your game for wasm32-unknown-unknown, bundle it with wasm-bindgen-cli and then serve it on a local webserver to be playable in your browser.
All necessary tools will be installed for you if needed.
Run the following command:
cargo bavy build
This works similar to cargo build, but automatically passes the --features bevy/dynamic flag to get faster compile times.
It also provides a --wasm/-w flag, which allows you to create a bundle for the web.
It will automatically compile your game for wasm32-unknown-unknown and bundle it with wasm-bindgen-cli.
All necessary tools will be installed for you if needed.
Run the following command:
cargo bavy check
This works similar to cargo check, but automatically passes the --features bevy/dynamic flag to get faster compile times.
It also provides a --wasm/-w flag, which allows you to check for the WASM target.
If you are using cargo bavy with Rust Analyzer, you should configure it to use the --features bevy/dynamic flag in your project.
Otherwise, its checks might interfere with your cargo bavy run usage, leading to many non-incremental re-compiles.
Create a .vscode/settings.json file in your project with the following content:
{
"rust-analyzer.cargo.features": ["bevy/dynamic"]
}
This way, Rust Analyzer uses the same features as you.
The source code of this repository is dual-licensed under either:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.