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

Support compiling to wasm targets #1069

Open
jozanza opened this issue May 9, 2024 · 0 comments
Open

Support compiling to wasm targets #1069

jozanza opened this issue May 9, 2024 · 0 comments

Comments

@jozanza
Copy link

jozanza commented May 9, 2024

PR: #1068

For more context, in a wasm game engine SDK I maintain (turbo), I'm pulling in a crate (solana-sdk). However, cc-rs is deeply buried in dependencies of dependencies of that crate. This wouldn't be a terrible problem since cc-rs (especially the parallel feature stuff) is far from any code path that runs in wasm and optimization can get rid of a unused code, however, the compile_error! macro prevents cc-rs prevents builds from ever completing in the first place.

So the only option in my case (where cc-rs is buried deep in the dependency tree and I'm targeting wasm) currently is to fork and patch. This gets brittle fairly quickly since other dependencies can have version conflicts and force me to create more branches with version bumps and other minor tweaks over time.

I'm hoping we can land this patch and carve out exceptions for wasm with compile_error! moving forward 🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant