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

Feature to disable libloading (helpful for WASM support) #363

Merged
merged 1 commit into from
Sep 2, 2020

Conversation

Waridley
Copy link
Contributor

libloading is currently the only crate preventing bevy_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

[dependencies]
# bevy
bevy_app = { path = "../bevy_app", version = "0.1" }
bevy_app = { path = "../bevy_app", version = "0.1", default_features = false }
Copy link
Contributor

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

Copy link
Contributor Author

@Waridley Waridley Aug 27, 2020

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.

@karroffel karroffel added A-Build-System Related to build systems or continuous integration C-Dependencies A change to the crates that Bevy depends on labels Aug 27, 2020
esp. helpful for wasm target
Made default only for `bevy` crate
Copy link
Contributor

@Dispersia Dispersia left a 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

@cart
Copy link
Member

cart commented Sep 2, 2020

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.

@cart cart merged commit 4e587db into bevyengine:master Sep 2, 2020
@Waridley Waridley deleted the libloading_feature branch September 6, 2020 19:23
mrk-its pushed a commit to mrk-its/bevy that referenced this pull request Oct 6, 2020
esp. helpful for wasm target
Made default only for `bevy` crate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System Related to build systems or continuous integration C-Dependencies A change to the crates that Bevy depends on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants