beetmash_template

Crates.iobeetmash_template
lib.rsbeetmash_template
version
sourcesrc
created_at2024-07-15 03:37:59.248366
updated_at2024-12-07 08:59:09.693502
descriptionAn example workflow for publishing Bevy apps and scenes to Beetmash.
homepagehttps://beetmash.com
repositoryhttps://github.com/mrchantey/beetmash
max_upload_size
id1303427
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Peter Hayman (mrchantey)

documentation

https://beetmash.com/docs/beetmash

README

Beetmash Template

A demonstration of the workflow for publishing Bevy apps and scenes to beetmash.

Optimization table

Based on Bevy's internal optimizations, commands used with the base_app example, measured on 13/09/24 with bevy@0.14.2 and beetmash@0.0.6-rc.4.

Command size Notes
cargo build --release 46.65 MB
cargo build --release && wasm-opt -Oz 26.11 MB About half
cargo build --profile wasm-release 46.65 MB No measurable difference
cargo build --profile wasm-release && wasm-opt -Oz 46.65 MB No measurable difference

Getting started

Running cargo run won't do much, the app is a blank canvas 🖌️

  1. Export scenes: cargo run --bin export_scenes

  2. Run the app: cargo run scenes/my_base_scene.json scenes/my_beautiful_scene.json

Deploying Apps

Beetmash currently does not host apps, the simplest approach is to deploy to Github Pages and link to that. Because Bevy apps can be several megabytes at least, I recommend creating a new repo just for releases so it doesn't clog up your codebase repo.

For cross-repo deployment you will need to generate a Personal Access Token and place it in your github secrets.

# setup repo
gh auth login
gh repo create my-releases --public --confirm
gh repo clone my-releases
cd my-releases
# initial commit
echo "# My GitHub Pages Site" > README.md
echo "<div>hello world</div>" > index.html
git add .
git commit -m "Initial commit with README"
git push origin main
Commit count: 88

cargo fmt