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

Gems with native extensions #453

Open
danini-the-panini opened this issue May 6, 2024 · 4 comments
Open

Gems with native extensions #453

danini-the-panini opened this issue May 6, 2024 · 4 comments

Comments

@danini-the-panini
Copy link

Can we use gems with native extensions? I've read somewhere that it is possible, and it makes sense for it to be possible. However, I'm struggling to get even a basic example to compile. There doesn't seem to be any documentation as to how to set it up.

If I try statically linking, I get the error "Could not create Makefile due to some reason". Checking the mkmf log does not yield any useful information.

If I try dynamically linking with RUBY_WASM_EXPERIMENTAL_DYNAMIC_LINKING, I get the error ld: unknown option: -Xlinker

I've created a minimal repo to test: https://github.com/danini-the-panini/rbwasm-foo

If it makes a difference, I'm running on Apple silicon.

@danini-the-panini
Copy link
Author

Ok I tried on linux x86_64 and I get the same errors, although the dynamic linking says ld: Error: unable to disambiguate: -Xlinker (did you mean --Xlinker ?)

@kateinoigakukun
Copy link
Member

It's still experimental, and I need to do some upstreaming works. Stay tuned 😉

@danini-the-panini
Copy link
Author

ok, is there any way I can help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants