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

Add support for target wasm32-unknown-unknown #10

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

av1ctor
Copy link
Contributor

@av1ctor av1ctor commented Jan 8, 2024

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

According to rust-lang/rust-bindgen#751 (comment), the -fvisibility=default flag must be passed to clang.

Also, no c++ should be linked.

@andriyDev
Copy link
Owner

andriyDev commented Jan 8, 2024

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! :)

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andriyDev
Copy link
Owner

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 andriyDev merged commit 102ba09 into andriyDev:main Jan 11, 2024
@andriyDev
Copy link
Owner

Published on crates.io. :)

@av1ctor
Copy link
Contributor Author

av1ctor commented Jan 11, 2024

Hi and thanks for this library!

I will update my project to the new version.

Thanks again!

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

Successfully merging this pull request may close these issues.

None yet

2 participants