Rust
Last updated
You can use Wasmer in your Rust projects to execute WebAssembly modules securely and conveniently.
Some of our language extensions are using the Wasmer Rust crate under the hood.
In this section we will go through the instructions on how to setup your Rust environment, to then visit different examples of how to use Wasmer in Rust.
Setup your Rust environmentWasmer publishes various Crates:
wasmer
: The Wasmer Runtime
Compilers:
wasmer-compiler-singlepass
: The Singlepass compiler (fast compilation, normal runtime)
wasmer-compiler-cranelift
: The Cranelift compiler (normal compilation, a bit faster runtime)
wasmer-compiler-llvm
: The LLVM compiler (slower compilation, super fast runtime)
Engines:
wasmer-engine-jit
: The JIT Engine
wasmer-engine-native
: The Native Engine
Integrations:
wasmer-wasi
: Wasmer's implementation of the WASI standard. This allows you to run Wasm in a POSIX-like environment with a file system and permissions.
wasmer-emscripten
: Wasmer's implementation of the Emscripten ABI. This allows you to run Wasm in a less sandboxed way in a 32bit Linux-like environment.
Now let's setup your Rust environment!