Gems with native extensions
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 875
- Forks
- 68
- Avg merge
- 9d 5h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the minimal example in the linked rbwasm-foo repository, then inspect the mkmf log and the static-linking and dynamic-linking errors described here. Document whether native-extension gems are supported, the required setup, and what a successful compilation should look like, including the Apple silicon case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, wasm
- Domain
- build-system
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100