-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Feature to disable libloading (helpful for WASM support) #363
Conversation
crates/bevy_type_registry/Cargo.toml
Outdated
[dependencies] | ||
# bevy | ||
bevy_app = { path = "../bevy_app", version = "0.1" } | ||
bevy_app = { path = "../bevy_app", version = "0.1", default_features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the default
features could be removed, and moved up to the bevy lib itself. Then you wouldn't have to disable default_features in each crate referencing it, which would make it difficult to integrate any future features in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point, I guess I was trying too hard to not break anything 😅
I was actually wondering whether the feature should even be default at all... or even a separate crate, though that seems silly for 2 functions. And I figured default is best for now; it could always be removed later, or maybe even a different solution figured out for wasm that gave the same features with different implementation.
esp. helpful for wasm target Made default only for `bevy` crate
0d5879c
to
028ac6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! Ideally this would be pulled out into a separate crate, but for now I think this is a good solution to get it moving forward
Yup this looks good to me too. I also agree that we could probably move this to its own crate. I created #415 for this. |
esp. helpful for wasm target Made default only for `bevy` crate
libloading
is currently the only crate preventingbevy_core
from compiling to WebAssembly, and AFAIK this is unlikely to change any time remotely soon. Other sub-crates have other issues, and I have not tested all functionality on WASM, but this may be the first step to resolving #88