- Useable as a standalone WebAssembly runtime.
- Can serve as a backend for languages compiling to WebAssembly.
- Provide options for taking advantage of the LLVM backend with JIT and AOT support.
- Provide options for increasing performance by turning off safety checks.
- Must be embedabble within projects written in other languages.
-
Rust and Cargo
Rust and Cargo can be installed by following the instructions here
-
LLVM 8.0.1
You can download an LLVM installer for Windows or pre-compiled binaries for your Unix platform here
-
Clone the repository.
git clone https://github.com/appcypher/wasmo.git
-
Change directory
cd wasmo
-
Create an
LLVM_SYS_80_PREFIX
environment variable and set its value to your installed LLVM path. The syntax for this depends on the shell you are usingRead more
-
Posix (Bash, Zsh, ...)
export LLVM_SYS_80_PREFIX="/path/to/llvm"
-
Fish
setenv LLVM_SYS_80_PREFIX "/path/to/llvm"
-
Cmd
set LLVM_SYS_80_PREFIX="/path/to/llvm"
-
Powershell
setx LLVM_SYS_80_PREFIX "/path/to/llvm"
-
-
Build the project
cargo build
-
Run wasmo executable
target/debug/wasmo --help
-
Run a WebAssembly file WIP
target/debug/wasmo sample.wasm
-
Print help messages
target/debug/wasmo --help
// AOT
let module: ModuleAOT = Module::create_aot(&wasm_code);
let instance: InstanceAOT = module.instantiate(&imports);
instance.execute(&args)?;
// JIT
let module: Module = Module::create(&wasm_code);
let instance: Instance = module.instantiate(&imports)
instance.execute(&args)?;