Closed jacobrosenthal closed 4 years ago
Seems reasonable to me. The problem with the headers being not found is that the new header you are creating is in the OUT_DIR
path, while you are trying to reference the other headers relatively to this header. This doesn't work since those headers arent in the OUT_DIR.
A quick solution would be to just create the wrapper header manually and put it into the wasm3-sys
directory. Then the includes would look something like
#include "wasm3/source/m3_compile.h
...
Thanks, that was it. The only change I know that I made was removing default_enum_style as it is the command line default anyway I think.
As for no_std cross compile still doesnt successfully build for me as it doesnt have target arch stuff. Does this run for you as expected?
Ah, you can even use CARGO_MANIFEST_DIR
great, I didn't even think of that one and the default_enum_style was chosen by me at random so far so it doesn't really matter for now. Regarding cross compile I can't say much as I haven't worked with myself so far unfortunately.
Edit: Turns out the enum default is consts
while I was using constmodules
, I should really set up CI for this 😅
Thanks so much for your recent no_std support. There is one problem still, in that using deps with shared features from build.rs pollutes the no_std features with std features. Its sadly a well known problem with the only solution being to swap bindgen api for cli. https://github.com/rust-lang/cargo/issues/5730
I think this is pretty close to complete, but not quite right yet as the pathing on the headers is broken but thought Id open the pr to start discussion