andriyDev / recastnavigation-rs-sys

Raw Rust FFI bindings for recastnavigation.
MIT License
7 stars 2 forks source link

Add support for target wasm32-unknown-unknown #10

Closed av1ctor closed 8 months ago

av1ctor commented 8 months ago

I was trying to build the library for --target wasm32-unknown-unknown, but no wrappers for classes and methods were being generated.

According to https://github.com/rust-lang/rust-bindgen/issues/751#issuecomment-496891269, the -fvisibility=default flag must be passed to clang.

Also, no c++ should be linked.

andriyDev commented 8 months ago

Thank you for the contribution! I'll take a deeper look later. Would you be able to add a GitHub Action to test WASM? That would be incredibly helpful.

Edit: I'll also take a look at the GitHub Action later today, so no worries if you don't want to take up the task! :)

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (dd0aa88) 99.57% compared to head (dd9e8eb) 99.56%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #10 +/- ## ========================================== - Coverage 99.57% 99.56% -0.01% ========================================== Files 1 1 Lines 698 685 -13 ========================================== - Hits 695 682 -13 Misses 3 3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

andriyDev commented 8 months ago

I took a look at this a second time, and I think I've just decided I'm happy with it. I'm assuming it works for your use-case, so I'd rather just merge it and move on. A Github Action for WASM testing should be it's own PR.

Thank you for the contribution!

andriyDev commented 8 months ago

Published on crates.io. :)

av1ctor commented 8 months ago

Hi and thanks for this library!

I will update my project to the new version.

Thanks again!