mystor / rust-cpp

Embed C++ directly inside your rust code!
Apache License 2.0
798 stars 44 forks source link

implement ability for user to call methods on gcc::Config #11

Closed astraw closed 7 years ago

astraw commented 7 years ago

Somehow the user needs to be able to call methods gcc::Config on be able to do things like specify the include path. I got this approach working for me and it seems like it is reasonably general. What do you think?

mystor commented 7 years ago

I would rather not publicly expose the gcc dependency. It seems more like an internal implementation detail to me. I've pushed afbe89b and will publish a new v0.2.1 version to crates.io which has a cpp_build::Config object which you can use to set these compiler flags.

A benefit of this is it means we can add new flags to the Config object in the future to configure rust_cpp directly without breaking anything, which is nice :)

Thanks for the PR :).

astraw commented 7 years ago

Thanks, your approach also works for me.