WASI cdylib output
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
Currently wasm32-wasi does not support the cdylib output type, which is unfortunate because this means that only Rust programs can consume programs that target wasi (through the rlib output).
As a motivating example, consider a database wrapper Wasm module. One might want to write it safely in Rust and use it from another Wasm module loaded at runtime. The database wrapper would want to use WASI syscalls to access the database process. This is not yet possible because Rust WASI modules cannot be made into cdylibs.
It looks like all that would need to be done to support this feature is to not link crt1 when compiling to cdylib. This would amount to creating a target that looks like wasm32-unknown-unknown except with wasi sys.
Contributor guide
No contributing guide indexed for this repository
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 investigating how the wasm32-wasi target defines cdylib output and where crt1 is linked. Compare it with wasm32-unknown-unknown, then determine the target configuration and validation needed for WASI cdylibs to be consumed by other Wasm modules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- compilers, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100