-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
A-linkageProposals relating to the linking step.Proposals relating to the linking step.A-targetTarget related proposals & ideasTarget related proposals & ideasT-compilerRelevant to the compiler team, which will review and decide on the RFC.Relevant to the compiler team, which will review and decide on the RFC.
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
.
mikevoronov, kellytk and dunnock
Metadata
Metadata
Assignees
Labels
A-linkageProposals relating to the linking step.Proposals relating to the linking step.A-targetTarget related proposals & ideasTarget related proposals & ideasT-compilerRelevant to the compiler team, which will review and decide on the RFC.Relevant to the compiler team, which will review and decide on the RFC.