Skip to content

Add support for binary-only crates with crate_universe #2168

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

Open
adsnaider opened this issue Sep 22, 2023 · 3 comments
Open

Add support for binary-only crates with crate_universe #2168

adsnaider opened this issue Sep 22, 2023 · 3 comments

Comments

@adsnaider
Copy link
Contributor

The documentation specifies that crate_universe doesn't support binary-only dependencies out of the box: http://bazelbuild.github.io/rules_rust/crate_universe.html#binary-dependencies. It would be really nice if it did. How much work would it be to implement? I would be happy to try contributing this feature.

@illicitonion
Copy link
Collaborator

If we're going to support this, it would likely be via #1739 (see also #2031).

I expect it's probably a relatively small amount of work to do, but it's using an unstable cargo feature so you may run into bugs on the way (and will also need to fork the cargo_metadata crate to modify some structs in there) :)

@mikea
Copy link

mikea commented Sep 25, 2023

this limitation is very painful with cxxbridge-cmd. I see quite a few projects on github (google's skia including) trying to implement the workaround.

@UebelAndre
Copy link
Collaborator

this limitation is very painful with cxxbridge-cmd. I see quite a few projects on github (google's skia including) trying to implement the workaround.

There are some known work-arounds. The wasm_bindgen_library rule uses one of them. If anyone is willing to try out nightly releases of Rust (Cargo) that support -zbindeps I'd be happy to review pull-requests to make any updates needed for crate_universe to parse the new info from cargo metadata (since that's the source of truth crate_universe uses to generate dependencies).

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

No branches or pull requests

4 participants