Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a command for running Bevy for web #8

Closed
janhohenheim opened this issue Aug 30, 2024 · 2 comments · Fixed by #120
Closed

Add a command for running Bevy for web #8

janhohenheim opened this issue Aug 30, 2024 · 2 comments · Fixed by #120
Labels
A-CLI Related to the main CLI and not a more specific subcommand C-Feature Make something new possible

Comments

@janhohenheim
Copy link
Member

janhohenheim commented Aug 30, 2024

The web (through WASM) is a common platform for game jams, but it currently requires jumping through some hoops to get it working with Bevy. We should make this process easier, specifically for during the development cycle.

We could have a bevy web or bevy run --web command that does the following:

  • Builds project for wasm32-unknown-unknown target and passes flags along to cargo.
  • Sets up a basic index.html if you have none
  • Runs wasm-bindgen
  • Copies the assets to be served
  • Starts a local HTTP server
  • Opens the browser

IIRC cargo-bavy already does most of these, so we can borrow code from there.

@BD103 BD103 added A-CLI Related to the main CLI and not a more specific subcommand C-Feature Make something new possible labels Aug 30, 2024
@BD103
Copy link
Member

BD103 commented Sep 6, 2024

Just as a note, I edited Jan's original message as part of my issue-pass in #34.

@janhohenheim
Copy link
Member Author

janhohenheim commented Sep 6, 2024

The edit swallowed up one major point: passes flags along to cargo. This is the one thing that is annoying me the most about Trunk, since it means we cannot have dedicated Wasm profiles when using it.
Edited it back in :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Related to the main CLI and not a more specific subcommand C-Feature Make something new possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants