Olivier Goffart

Results 270 comments of Olivier Goffart

What's your compiler and platform ?

Actually, the size assertion should in theory never be triggered because there is also a compile check just before. Could you debug and see what are the values of the...

Ah, cross-compilation ... That is probably the reason. I never tried that. Is the C++ compiler is also running in cross compilation mode? Normally the `cc` crate should take care...

Looks like the link is failing, What platform are you running on. Are you using linker flag. the build.rs script should print a line to let cargo know it needs...

https://github.com/mystor/rust-cpp/pull/35 will help in some cases (although it won't help for the CPlusPlusBox use case, but that's covered by cpp_class! )

> What if build script used rustc itself to parse the crate? Then it would only work with a nightly compiler, and never with stable. So I don't think that...

@frankier: the `cxx` crate has the same problem. It also uses a build script that parses the .rs files to extract some information before building the generated .cpp code with...

This crate equivalent of `CPlusPlusBox` is to do ```rust cpp_class!(unsafe struct MyCPlusPlusType as "std::unique_ptr"); ``` (that did not exist in 2017 when that comment was written) But this issue is...

true, cpp_class wrapping an unique_ptr is just box an opaque type, and there is no way to access the content. So this is usefull when one wants to expose a...

That looks complicated to do as we need to parse so many environment variable. I wonder if it would not be better to add api to cpp_build which would allow...