Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.
/ wasm-poc Public archive

A collection showcasing how to generate WASM from various programming languages and execute the WASM code using a WASM runtime.

Notifications You must be signed in to change notification settings

MGTheTrain/wasm-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

wasm-poc

Table of Contents

Summary

A collection showcasing how to generate WASM from various programming languages and execute the WASM code using a WASM runtime.

NOTE: HTTP services might be hard to compile since socket support might not yet be available in Wasi. Therefore search in following link for socket support. Optionally check further projects:

References

How to use

simple-rust sample

Run following commands:

cd samples/simple-rust

# when wanting to utilize wasmer as WebAssembly runtime 
docker build -t simple-rust-wasm-app-with-wasmer:stable -f Dockerfile.wasmer . 
docker run --rm simple-rust-wasm-app-with-wasmer:stable bash -c "wasmer run simple-rust.wasm"

# when wanting to utilize wasmtime as WebAssembly runtime 
docker build -t simple-rust-wasm-app-with-wasmtime:stable -f Dockerfile.wasmtime . 
docker run --rm simple-rust-wasm-app-with-wasmtime:stable bash -c "wasmtime run simple-rust.wasm"

simple-go sample

Run following commands:

cd samples/simple-go
docker build -t simple-go-wasm-app-with-wasmtime:stable .
docker run --rm simple-go-wasm-app-with-wasmtime:stable bash -c "wasmtime run output.wasm"

simple-rust-service

Run following commands to spin up a serverless application powered by WebAssembly:

cd samples/simple-rust-service
# Update in the `spin.toml` the cargo command
spin build # Build WebAssembly file
spin up # Run serverless HTTP service powered by WebAssembly

NOTE: Spin was installed in and utilized with Ubuntu WSL

About

A collection showcasing how to generate WASM from various programming languages and execute the WASM code using a WASM runtime.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published