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

Having a *-sys crate depending on rust "staticlib" crate #7524

Open
Geobert opened this issue Oct 18, 2019 · 0 comments
Open

Having a *-sys crate depending on rust "staticlib" crate #7524

Geobert opened this issue Oct 18, 2019 · 0 comments
Labels
A-crate-dependencies Area: [dependencies] of any kind A-linkage Area: linker issues, dylib, cdylib, shared libraries, so C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

Comments

@Geobert
Copy link

Geobert commented Oct 18, 2019

Describe the problem you are trying to solve
I have a *-sys crate wrapping a C lib. This C lib needs some other C functions provided by some C code. I choose the reimplement these functions in Rust in a "shims" crate, as a staticlib.

On top of the *-sys I have a *-rs crate to make my safe wrapper.

What I'm trying to do and don't know if it's possible at the moment, is when using the *-rs crate, it builds the *-sys crate which will build the Rust staticlib.

I've asked on reddit (https://www.reddit.com/r/rust/comments/di6uos/sys_crate_depending_on_a_rust_static_lib_build/) and it doesn't seem possible hence this ticket.

Describe the solution you'd like
Some way to describe a dependency from my *-sys to a Rust staticilb.

If it's already possible, sorry for the bother ^^

@Geobert Geobert added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Oct 18, 2019
@ehuss ehuss added A-crate-dependencies Area: [dependencies] of any kind A-linkage Area: linker issues, dylib, cdylib, shared libraries, so labels Nov 8, 2019
@epage epage added the S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-crate-dependencies Area: [dependencies] of any kind A-linkage Area: linker issues, dylib, cdylib, shared libraries, so C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Projects
None yet
Development

No branches or pull requests

3 participants