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 WASI support #5

Open
No9 opened this issue Jan 3, 2021 · 1 comment
Open

Add WASI support #5

No9 opened this issue Jan 3, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@No9
Copy link
Collaborator

No9 commented Jan 3, 2021

Given the separation we have between functions.rs and the build system it should be fairly trivial to output the executable as a WASI file.
The base rust image https://quay.io/repository/roche/alpine-libgcc would need to be updated to include the wasm32 target
rustup target add wasm32-wasi
and the build system would have to add cargo build --target wasm32-wasi to the cargo commands.
https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md#from-rust

Rather than packaging to a runtime container https://github.com/roche-rs/roche/blob/main/src/template/Release.Dockerfile#L5
It might be better to wrap the outputs with an OCI https://github.com/engineerd/wasm-to-oci

And possibly utilised in something like https://github.com/deislabs/krustlet
It would be good to understand what the potential deployment targets are for a WASM service.
Research to be captured here.

@No9 No9 added the enhancement New feature or request label Jan 3, 2021
@No9
Copy link
Collaborator Author

No9 commented Jan 5, 2021

Cargo already has a fully integrated WASI stack https://github.com/bytecodealliance/cargo-wasi
Networking has yet to land in WASI WebAssembly/WASI#312
Minipot is a FreeBSD container platform based on Nomad that could target such an environment
https://github.com/pizzamig/minipot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant