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

build.rs should be able to output executable c/c++ binary via cc-rs #458

Closed
furoraest opened this issue Nov 18, 2019 · 1 comment
Closed

Comments

@furoraest
Copy link

I created project, where we added some c++ bindings to rust.
I ended up compiling c++ files by hand, even though everything was pretty easily manageable via build.rs
Only thing what was missing was outputting from build.rs the real c++ binary (not the library)
I know, that using little main.rs magic, its easily doable but in this case, rust is plug-in to the the c++, not vise versa, so adding main.rs just to "call out binary" seems excessive.
I would like to see that all the different scenarios can be managed from build.rs (generating libraries, binaries for different platforms, from different languages c/c++/rust) -
that would really boost the already powerful cargo build and deprecates need of different build scripts.
Is it possible to compile the c++ as binary with cc-rs via build.rs? If not please consider to add it.

@alexcrichton
Copy link
Member

Thanks for the report, but I personally do not have the time to maintain the intricacies of binary creation in this crate. I'm happy to expose any necessary utilities to do so via another crate on crates.io, though.

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

2 participants