wasmy 
wasmy, easily customize my wasm app!
features
- Completely shield vm-wasm interaction details
- Simple and flexible ABI, supports freely adding vm and wasm handlers using attribute macros (
#[vm_handle(0)]/#[wasm_handle(0)]) - Provide attribute macro
#[wasm_onload]support to initialize wasm - Support multi-threaded concurrency
- Provides context, layering friendly
- Features a security sandbox
- Use protobuf as the interaction protocol
crates
- wasmy-vm crate : vm dependencies
[]
= "0.5"
- wasmy-abi crate : wasm dependencies
[]
= "0.5"
- wasmy-macros crate : no direct dependency
= "0.5"
example
- wasm code (target = "wasm32-wasi")
use random;
use *;
use *;
- vm code
use *;
use crate;
...
// Make sure the mod is linked
test simple example
- raw cargo cmd:
$ rustup target add wasm32-wasi
$ cargo +nightly build --target=wasm32-wasi --example=simple
$ cargo +nightly run --example=svm -- ../../wasm32-wasi/debug/examples/simple.wasm
- alias cargo cmd:
$ rustup target add wasm32-wasi
$ cargo +nightly wasm simple
$ cargo +nightly svm simple