-
Notifications
You must be signed in to change notification settings - Fork 8
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
Build various target libraries from source #7
Conversation
Increment version to 0.2.2 Add dependency on cmake and cc crates Updated readme with additional instructions
- Removed git submodule initialization - Move all library outputs to OUT_DIR
Libraries were built ahead-of-time for the following platforms: - x86_64-pc-windows-msvc - x86_64-unknown-linux-gnu - x86_64-apple-darwin - aarch64-linux-android - armv7-linux-androideabi Libraries are built from source for the following platform(s): - i686-pc-windows-msvc
f09ad00
to
9ee8a3c
Compare
@cart @bjorn3 I've come up with a novel solution to our issue! By making use of The
|
.cargo/config.toml
Outdated
@@ -0,0 +1,64 @@ | |||
[target.x86_64-pc-windows-msvc.glslang] |
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.
This only applies when directly compiling this crate. It doesn't have any effect when using this crate as a dependency unfortunately. .cargo/config.toml
is only read for the directory from which cargo was invoked, parent dirs and the home dir, not from arbitrary dependencies.
Properly skips optional dependencies pending rust-lang/cargo#7914 More extensible for addition of new platforms
Okay since the Currently, on stable cargo, it will eagerly activate the feature for all targets regardless:
On nightly with the
Fortunately, this isn't so bad, because
|
Ok the cmake dependency seems acceptable, provided that it won't break builds on systems that (1) don't have cmake and (2) can use one of the precompiled binaries in this crate. |
Systems that already have precompiled libraries will continue as normal and never call the
Systems that are explicitly opted into building will build once and reuse the compiled libraries.
Other systems will panic (without calling
It might be possible to use GitHub workflows to check if the four remaining Tier 1 platforms can be built from source. |
- i686-pc-windows-gnu - x86_64-pc-windows-gnu
I've managed to add support for |
@cart Anything left you want me to tick off? |
Awesome work! I'll boot into windows and give it a whirl. |
This worked as expected on windows (msvc 64, msvc 32, gnu 64) and on Linux. Nice! |
To publish this we'll need to publish glslang-actual-builder separately / update the dependency in the main crate. Additionally, I think we should probably rename glslang-actual-builder to something like |
Feel free to do the rename in a followup pr. If not ill get to it (and publish the crates) before the next bevy release. |
How are [dependencies]
bevy_dylib = {path = "crates/bevy_dylib", version = "0.4.0", default-features = false, optional = true}
bevy_internal = {path = "crates/bevy_internal", version = "0.4.0", default-features = false} I made the assumption that since Agreed on the rename if we need to publish it as a separate crate. |
Increment version to 0.2.2
Add dependency on cmake and cc crates
Updated readme with additional instructions
Supports: