|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 15-May-2026 | - |
| .github/ | H | 15-May-2026 | - | 2,621 | 2,269 |
| benches/ | H | 15-May-2026 | - | 2,835 | 2,365 |
| ci/ | H | 15-May-2026 | - | 1,390 | 895 |
| cranelift/ | H | 15-May-2026 | - | 608,191 | 527,932 |
| crates/ | H | 15-May-2026 | - | 468,914 | 345,108 |
| docs/ | H | 15-May-2026 | - | 11,102 | 8,887 |
| examples/ | H | 15-May-2026 | - | 8,862 | 6,188 |
| fuzz/ | H | 15-May-2026 | - | 1,987 | 1,469 |
| pulley/ | H | 15-May-2026 | - | 12,025 | 9,113 |
| scripts/ | H | 15-May-2026 | - | 640 | 517 |
| src/ | H | 15-May-2026 | - | 5,436 | 4,267 |
| supply-chain/ | H | 15-May-2026 | - | 12,167 | 10,147 |
| tests/ | H | 15-May-2026 | - | 285,526 | 267,707 |
| winch/ | H | 15-May-2026 | - | 26,155 | 19,568 |
| .gitattributes | H A D | 15-May-2026 | 257 | 11 | 8 |
| .gitignore | H A D | 15-May-2026 | 402 | 37 | 36 |
| .gitmodules | H A D | 15-May-2026 | 548 | 14 | 13 |
| ADOPTERS.md | H A D | 15-May-2026 | 3.2 KiB | 21 | 17 |
| CODEOWNERS | H A D | 15-May-2026 | 2.1 KiB | 49 | 42 |
| CODE_OF_CONDUCT.md | H A D | 15-May-2026 | 3.6 KiB | 51 | 31 |
| CONTRIBUTING.md | H A D | 15-May-2026 | 569 | 13 | 9 |
| Cargo.lock | H A D | 15-May-2026 | 137.4 KiB | 6,099 | 5,512 |
| Cargo.toml | H A D | 15-May-2026 | 27 KiB | 762 | 701 |
| LICENSE | H A D | 15-May-2026 | 12 KiB | 221 | 182 |
| ORG_CODE_OF_CONDUCT.md | H A D | 15-May-2026 | 7.1 KiB | 144 | 116 |
| README.md | H A D | 15-May-2026 | 7.5 KiB | 185 | 142 |
| RELEASES.md | H A D | 15-May-2026 | 7.9 KiB | 141 | 114 |
| SECURITY.md | H A D | 15-May-2026 | 727 | 17 | 12 |
| build.rs | H A D | 15-May-2026 | 1.1 KiB | 45 | 40 |
| deny.toml | H A D | 15-May-2026 | 1.9 KiB | 65 | 54 |
| rustfmt.toml | H A D | 15-May-2026 | 17 | 2 | 1 |
README.md
1<div align="center">
2 <h1><code>wasmtime</code></h1>
3
4 <p>
5 <strong>A standalone runtime for
6 <a href="https://webassembly.org/">WebAssembly</a></strong>
7 </p>
8
9 <strong>A <a href="https://bytecodealliance.org/">Bytecode Alliance</a> project</strong>
10
11 <p>
12 <a href="https://github.com/bytecodealliance/wasmtime/actions?query=workflow%3ACI"><img src="https://github.com/bytecodealliance/wasmtime/workflows/CI/badge.svg" alt="build status" /></a>
13 <a href="https://bytecodealliance.zulipchat.com/#narrow/stream/217126-wasmtime"><img src="https://img.shields.io/badge/zulip-join_chat-brightgreen.svg" alt="zulip chat" /></a>
14 <img src="https://img.shields.io/badge/rustc-stable+-green.svg" alt="supported rustc stable" />
15 <a href="https://docs.rs/wasmtime"><img src="https://docs.rs/wasmtime/badge.svg" alt="Documentation Status" /></a>
16 </p>
17
18 <h3>
19 <a href="https://bytecodealliance.github.io/wasmtime/">Guide</a>
20 <span> | </span>
21 <a href="https://bytecodealliance.github.io/wasmtime/contributing.html">Contributing</a>
22 <span> | </span>
23 <a href="https://wasmtime.dev/">Website</a>
24 <span> | </span>
25 <a href="https://bytecodealliance.zulipchat.com/#narrow/stream/217126-wasmtime">Chat</a>
26 </h3>
27</div>
28
29## Installation
30
31The Wasmtime CLI can be installed on Linux and macOS (locally) with a small install
32script:
33
34```console
35curl https://wasmtime.dev/install.sh -sSf | bash
36```
37This script installs into `$WASMTIME_HOME` (defaults to `$HOME/.wasmtime`), and executable is placed in `$WASMTIME_HOME/bin`.
38
39After running the install script above, follow the on-screen instructions.
40
41Windows or otherwise interested users can download installers and
42binaries directly from the [GitHub
43Releases](https://github.com/bytecodealliance/wasmtime/releases) page.
44
45For additional installation options, refer to the [online book CLI installation page](https://docs.wasmtime.dev/cli-install.html).
46
47Documentation on Wasmtime's currently supported versions can be found [in the
48online book
49documentation](https://docs.wasmtime.dev/stability-release.html#current-versions).
50
51## Example
52
53If you've got the [Rust compiler
54installed](https://www.rust-lang.org/tools/install) then you can take some Rust
55source code:
56
57```rust
58fn main() {
59 println!("Hello, world!");
60}
61```
62
63and compile it into a WebAssembly component with:
64
65```console
66rustup target add wasm32-wasip2
67rustc hello.rs --target wasm32-wasip2
68```
69
70Once compiled, you can run your component:
71
72```console
73wasmtime hello.wasm
74```
75
76You should see the following output:
77
78```text
79Hello, world!
80```
81
82(Note: make sure you installed Rust using the [`rustup`][rustup] method in the official
83instructions above, and do not have a copy of the Rust toolchain installed on
84your system in some other way as well (e.g. the system package manager). Otherwise, the `rustup target add...`
85command may not install the target for the correct copy of Rust.)
86
87[rustup]: https://rustup.rs
88
89## Features
90
91* **Fast**. Wasmtime is built on the optimizing [Cranelift] code generator to
92 quickly generate high-quality machine code either at runtime or
93 ahead-of-time. Wasmtime is optimized for efficient instantiation, low-overhead
94 calls between the embedder and wasm, and scalability of concurrent instances.
95
96* **[Secure]**. Wasmtime's development is strongly focused on correctness and
97 security. Building on top of Rust's runtime safety guarantees, each Wasmtime
98 feature goes through careful review and consideration via an [RFC
99 process]. Once features are designed and implemented, they undergo 24/7
100 fuzzing donated by [Google's OSS Fuzz]. As features stabilize they become part
101 of a [release][release policy], and when things go wrong we have a
102 well-defined [security policy] in place to quickly mitigate and patch any
103 issues. We follow best practices for defense-in-depth and integrate
104 protections and mitigations for issues like Spectre. Finally, we're working to
105 push the state-of-the-art by collaborating with academic researchers to
106 formally verify critical parts of Wasmtime and Cranelift.
107
108* **[Configurable]**. Wasmtime uses sensible defaults, but can also be
109 configured to provide more fine-grained control over things like CPU and
110 memory consumption. Whether you want to run Wasmtime in a tiny environment or
111 on massive servers with many concurrent instances, we've got you covered.
112
113* **[WASI]**. Wasmtime supports a rich set of APIs for interacting with the host
114 environment through the [WASI standard](https://wasi.dev).
115
116* **[Standards Compliant]**. Wasmtime passes the [official WebAssembly test
117 suite](https://github.com/WebAssembly/testsuite), implements the [official C
118 API of wasm](https://github.com/WebAssembly/wasm-c-api), and implements
119 [future proposals to WebAssembly](https://github.com/WebAssembly/proposals) as
120 well. Wasmtime developers are intimately engaged with the WebAssembly
121 standards process all along the way too.
122
123[Wasmtime]: https://github.com/bytecodealliance/wasmtime
124[Cranelift]: https://cranelift.dev/
125[Google's OSS Fuzz]: https://google.github.io/oss-fuzz/
126[security policy]: https://bytecodealliance.org/security
127[RFC process]: https://github.com/bytecodealliance/rfcs
128[release policy]: https://docs.wasmtime.dev/stability-release.html
129[Secure]: https://docs.wasmtime.dev/security.html
130[Configurable]: https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html
131[WASI]: https://docs.rs/wasmtime-wasi/latest/wasmtime_wasi/
132[Standards Compliant]: https://docs.wasmtime.dev/stability-tiers.html
133
134## Language Support
135
136You can use Wasmtime from a variety of different languages through embeddings of
137the implementation.
138
139Languages supported by the Bytecode Alliance:
140
141* **[Rust]** - the [`wasmtime` crate]
142* **[C]** - the [`wasm.h`, `wasi.h`, and `wasmtime.h` headers][c-headers], [CMake](crates/c-api/CMakeLists.txt)
143* **C++** - the [`wasmtime.hh` header][c-headers]
144* **[Python]** - the [`wasmtime` PyPI package]
145* **[.NET]** - the [`Wasmtime` NuGet package]
146* **[Go]** - the [`wasmtime-go` repository]
147* **[Ruby]** - the [`wasmtime` gem]
148
149Languages supported by the community:
150
151* **[Elixir]** - the [`wasmex` hex package]
152* **Perl** - the [`Wasm` Perl package's `Wasm::Wasmtime`]
153
154[Rust]: https://bytecodealliance.github.io/wasmtime/lang-rust.html
155[C]: https://bytecodealliance.github.io/wasmtime/lang-c.html
156[`wasmtime` crate]: https://crates.io/crates/wasmtime
157[c-headers]: https://bytecodealliance.github.io/wasmtime/c-api/
158[Python]: https://bytecodealliance.github.io/wasmtime/lang-python.html
159[`wasmtime` PyPI package]: https://pypi.org/project/wasmtime/
160[.NET]: https://bytecodealliance.github.io/wasmtime/lang-dotnet.html
161[`Wasmtime` NuGet package]: https://www.nuget.org/packages/Wasmtime
162[Go]: https://bytecodealliance.github.io/wasmtime/lang-go.html
163[`wasmtime-go` repository]: https://pkg.go.dev/github.com/bytecodealliance/wasmtime-go
164[Ruby]: https://bytecodealliance.github.io/wasmtime/lang-ruby.html
165[`wasmtime` gem]: https://rubygems.org/gems/wasmtime
166[Elixir]: https://docs.wasmtime.dev/lang-elixir.html
167[`wasmex` hex package]: https://hex.pm/packages/wasmex
168[`Wasm` Perl package's `Wasm::Wasmtime`]: https://metacpan.org/pod/Wasm::Wasmtime
169
170## Documentation
171
172[ Read the Wasmtime guide here! ][guide]
173
174The [wasmtime guide][guide] is the best starting point to learn about what
175Wasmtime can do for you or help answer your questions about Wasmtime. If you're
176curious in contributing to Wasmtime, [it can also help you do
177that][contributing]!
178
179[contributing]: https://bytecodealliance.github.io/wasmtime/contributing.html
180[guide]: https://bytecodealliance.github.io/wasmtime
181
182---
183
184It's Wasmtime.
185