1# Installing `wasmtime` 2 3Here we'll show you how to install the `wasmtime` command line tool. Note that 4this is distinct from embedding the Wasmtime project into another, for that 5you'll want to consult the [embedding documentation](lang.md). 6 7The easiest way to install the `wasmtime` CLI tool is through our installation 8script. Linux and macOS users can execute the following: 9 10```console 11curl https://wasmtime.dev/install.sh -sSf | bash 12``` 13 14This will download a precompiled version of `wasmtime`, place it in 15`$HOME/.wasmtime`, and update your shell configuration to place the right 16directory in `PATH`. 17 18Windows users will want to visit our [releases page][releases] and can download 19the MSI installer (`wasmtime-dev-x86_64-windows.msi` for example) and use that 20to install. 21 22[releases]: https://github.com/bytecodealliance/wasmtime/releases/latest 23 24You can confirm your installation works by executing: 25 26```shell-session 27$ wasmtime -V 28wasmtime 30.0.0 (ede663c2a 2025-02-19) 29``` 30 31And now you're off to the races! Be sure to check out the [various CLI 32options](cli-options.md) as well. 33 34## Download Precompiled Binaries 35 36If you'd prefer to not use an installation script, or you're perhaps 37orchestrating something in CI, you can also download one of our precompiled 38binaries of `wasmtime`. We have two channels of releases right now for 39precompiled binaries: 40 411. Each tagged release will have a full set of release artifacts on the [GitHub 42 releases page][releases]. 432. The [`dev` release] is also continuously updated with the latest build of the 44 `main` branch. If you want the latest-and-greatest and don't mind a bit of 45 instability, this is the release for you. 46 47[`dev` release]: https://github.com/bytecodealliance/wasmtime/releases/tag/dev 48 49When downloading binaries you'll likely want one of the following archives (for 50the `dev` release) 51 52* Linux users - [`wasmtime-dev-x86_64-linux.tar.xz`] 53* macOS users - [`wasmtime-dev-aarch64-macos.tar.xz`] 54* Windows users - [`wasmtime-dev-x86_64-windows.zip`] 55 56Each of these archives has a `wasmtime` binary placed inside which can be 57executed normally as the CLI would. 58 59[`wasmtime-dev-x86_64-linux.tar.xz`]: https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-x86_64-linux.tar.xz 60[`wasmtime-dev-aarch64-macos.tar.xz`]: https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-aarch64-macos.tar.xz 61[`wasmtime-dev-x86_64-windows.zip`]: https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-x86_64-windows.zip 62 63## Install via Cargo 64 65If you have [Rust and Cargo](https://www.rust-lang.org/tools/install) available in your system, you can build and install an official `wasmtime` release from its [crates.io](https://crates.io/crates/wasmtime-cli) source: 66 67```console 68cargo install wasmtime-cli 69``` 70 71This compiles and installs `wasmtime` into your Cargo bin directory (typically `$HOME/.cargo/bin`). Make sure that directory is in your `PATH` before running `wasmtime`. For example, add the following line to `~/.bashrc` or `~/.zshrc`: 72 73```console 74export PATH="$HOME/.cargo/bin:$PATH" 75``` 76 77You can also use [`binstall`](https://github.com/cargo-bins/cargo-binstall) to automatically find and install the correct `wasmtime` binary for your system, matching a candidate from [GitHub Releases](https://github.com/bytecodealliance/wasmtime/releases): 78 79```console 80cargo binstall wasmtime-cli 81``` 82 83## Compiling from Source 84 85If you'd prefer to compile the `wasmtime` CLI from source, you'll want to 86consult the [contributing documentation for building](contributing-building.md). 87Be sure to use a `--release` build if you're curious to do benchmarking! 88