- Notifications
You must be signed in to change notification settings - Fork1.6k
A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
License
bytecodealliance/wasmtime
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A standalone runtime forWebAssembly
ABytecode Alliance project
The Wasmtime CLI can be installed on Linux and macOS (locally) with a small installscript:
curl https://wasmtime.dev/install.sh -sSf | bashThis script installs into$WASMTIME_HOME (defaults to$HOME/.wasmtime), and executable is placed in$WASMTIME_HOME/bin.
After running the install script above, follow the on-screen instructions.
Windows or otherwise interested users can download installers andbinaries directly from theGitHubReleases page.
For additional installation options, refer to theonline book CLI installation page.
Documentation on Wasmtime's currently supported versions can be foundin theonline bookdocumentation.
If you've got theRust compilerinstalled then you can take some Rustsource code:
fnmain(){println!("Hello, world!");}
and compile it into a WebAssembly component with:
rustup target add wasm32-wasip2rustc hello.rs --target wasm32-wasip2
Once compiled, you can run your component:
wasmtime hello.wasmYou should see the following output:
Hello, world!(Note: make sure you installed Rust using therustup method in the officialinstructions above, and do not have a copy of the Rust toolchain installed onyour system in some other way as well (e.g. the system package manager). Otherwise, therustup target add...command may not install the target for the correct copy of Rust.)
Fast. Wasmtime is built on the optimizingCranelift code generator toquickly generate high-quality machine code either at runtime orahead-of-time. Wasmtime is optimized for efficient instantiation, low-overheadcalls between the embedder and wasm, and scalability of concurrent instances.
Secure. Wasmtime's development is strongly focused on correctness andsecurity. Building on top of Rust's runtime safety guarantees, each Wasmtimefeature goes through careful review and consideration via anRFCprocess. Once features are designed and implemented, they undergo 24/7fuzzing donated byGoogle's OSS Fuzz. As features stabilize they become partof arelease, and when things go wrong we have awell-definedsecurity policy in place to quickly mitigate and patch anyissues. We follow best practices for defense-in-depth and integrateprotections and mitigations for issues like Spectre. Finally, we're working topush the state-of-the-art by collaborating with academic researchers toformally verify critical parts of Wasmtime and Cranelift.
Configurable. Wasmtime uses sensible defaults, but can also beconfigured to provide more fine-grained control over things like CPU andmemory consumption. Whether you want to run Wasmtime in a tiny environment oron massive servers with many concurrent instances, we've got you covered.
WASI. Wasmtime supports a rich set of APIs for interacting with the hostenvironment through theWASI standard.
Standards Compliant. Wasmtime passes theofficial WebAssembly testsuite, implements theofficial CAPI of wasm, and implementsfuture proposals to WebAssembly aswell. Wasmtime developers are intimately engaged with the WebAssemblystandards process all along the way too.
You can use Wasmtime from a variety of different languages through embeddings ofthe implementation.
Languages supported by the Bytecode Alliance:
- Rust - the
wasmtimecrate - C - the
wasm.h,wasi.h, andwasmtime.hheaders,CMake - C++ - the
wasmtime.hhheader - Python - the
wasmtimePyPI package - .NET - the
WasmtimeNuGet package - Go - the
wasmtime-gorepository - Ruby - the
wasmtimegem
Languages supported by the community:
- Elixir - the
wasmexhex package - Perl - the
WasmPerl package'sWasm::Wasmtime
📚 Read the Wasmtime guide here! 📚
Thewasmtime guide is the best starting point to learn about whatWasmtime can do for you or help answer your questions about Wasmtime. If you'recurious in contributing to Wasmtime,it can also help you dothat!
It's Wasmtime.
About
A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.