Skip to content

Add WASI support #5

@No9

Description

@No9

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions