-
Notifications
You must be signed in to change notification settings - Fork 222
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
feat: add link feature #608
Conversation
Could you elaborate a bit more the context for this change? |
As I have stated, this is necessary for Deno. This is because the WebGPU implementation was removed due to static linking causing massive startup time issues, and as the usage of said web API is not quite common yet, we decided to temporarily remove the implementation. Now we are looking into bringing WebGPU back into Deno, and to do that we need to weak link frameworks. We have started doing this already in the gfx-rs repos (gfx-rs/metal-rs#271, gfx-rs/wgpu#3853, gfx-rs/wgpu#3897), and the main & remaining frameworks used are coming from core-foundation. |
I still don't understand. Perhaps this is me not understanding what exactly Also, macOS doesn't support statically linking against the system libraries so I don't understand what you mean when you say static linking caused a massive startup time issues. |
Hey @jrmuizel With #[link], macOS will always load the framework at startup (dyld). We want to use |
So ideally, I think we should work towards having the option in the language ( But since that's a bit farther away, I think this is a fine stopgap solution. |
Can you squash this into a single commit? |
☔ The latest upstream changes (presumably b009c87) made this pull request unmergeable. Please resolve the merge conflicts. |
apologies for the delay. @jrmuizel I have squashed all the commits. |
adjust docs Update cocoa/Cargo.toml Co-authored-by: Divy Srivastava <[email protected]> fmt
@jrmuizel when can we expect new releases for the crates? |
Which crates do you all need releases for? |
For now |
It looks like this will need core-foundation and core-foundation-sys too because of:
|
I see; would it be possible to then publish those as well, or is there some blocker? |
The version specified for the dependencies will need to be updated. |
@jrmuizel I looked through the repo and that spot seems the only one (as all other packages depend on non-fully qualified semvers). I am not really sure I understand how the release system works for this repo though, so I might be missing something. |
@crowlKats I made a new release of core-graphics-types |
@jrmuizel thanks a lot! |
EDIT: See #651 |
The reason for this is that weak linking required for Deno to bring back webgpu support, and as we use the wgpu crate which depends on core-foundation, this feature flag needs to be added to core-foundation as well, as we are not going to be building with nightly or unstable rust features.