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 configuration to automatically disable/enable features when running in the web #250

Open
TimJentzsch opened this issue Jan 29, 2025 · 0 comments
Labels
A-Build Related to the bevy build command A-Run Related to the bevy run command A-Web Building or running Bevy apps targeting the browser C-Usability An improvement that makes the API more pleasant D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes

Comments

@TimJentzsch
Copy link
Collaborator

We should provide an option to automatically disable default features and enable features when running the app on the web.

For example, via a package.metadata.bevy_cli.web.default-features = false configuration in Cargo.toml.

Use case: Some features, like file watching, are only available on native platforms.
It's convenient to have them enabled by default, so that cargo run gives you hot asset reloading.

But then we have to always add --no-default-features when running bevy run web, which is a regression in TheBevyFlock/bevy_new_2d#312.
It would be nice if we could permanently configure it instead so the user doesn't have to type it out every time.

CLI options should take precedence over the Cargo.toml configuration.

@TimJentzsch TimJentzsch added A-Build Related to the bevy build command A-Run Related to the bevy run command A-Web Building or running Bevy apps targeting the browser C-Usability An improvement that makes the API more pleasant D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build Related to the bevy build command A-Run Related to the bevy run command A-Web Building or running Bevy apps targeting the browser C-Usability An improvement that makes the API more pleasant D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes
Projects
None yet
Development

No branches or pull requests

1 participant