1bf526b62SAlex Crichton# Installing `wasmtime` 2bf526b62SAlex Crichton 38caa5a94SAlex CrichtonHere we'll show you how to install the `wasmtime` command line tool. Note that 48caa5a94SAlex Crichtonthis is distinct from embedding the Wasmtime project into another, for that 5310e6677SRik Huijzeryou'll want to consult the [embedding documentation](lang.md). 68caa5a94SAlex Crichton 78caa5a94SAlex CrichtonThe easiest way to install the `wasmtime` CLI tool is through our installation 88caa5a94SAlex Crichtonscript. Linux and macOS users can execute the following: 98caa5a94SAlex Crichton 1092cfda1bSVictor Adossi```console 1192cfda1bSVictor Adossicurl https://wasmtime.dev/install.sh -sSf | bash 128caa5a94SAlex Crichton``` 138caa5a94SAlex Crichton 14738d41eaSKelly Thomas KlineThis will download a precompiled version of `wasmtime`, place it in 158caa5a94SAlex Crichton`$HOME/.wasmtime`, and update your shell configuration to place the right 168caa5a94SAlex Crichtondirectory in `PATH`. 178caa5a94SAlex Crichton 188caa5a94SAlex CrichtonWindows users will want to visit our [releases page][releases] and can download 198caa5a94SAlex Crichtonthe MSI installer (`wasmtime-dev-x86_64-windows.msi` for example) and use that 208caa5a94SAlex Crichtonto install. 218caa5a94SAlex Crichton 223e406d2eSAlex Crichton[releases]: https://github.com/bytecodealliance/wasmtime/releases/latest 238caa5a94SAlex Crichton 248caa5a94SAlex CrichtonYou can confirm your installation works by executing: 258caa5a94SAlex Crichton 2692cfda1bSVictor Adossi```shell-session 278caa5a94SAlex Crichton$ wasmtime -V 283e406d2eSAlex Crichtonwasmtime 30.0.0 (ede663c2a 2025-02-19) 298caa5a94SAlex Crichton``` 308caa5a94SAlex Crichton 318caa5a94SAlex CrichtonAnd now you're off to the races! Be sure to check out the [various CLI 328caa5a94SAlex Crichtonoptions](cli-options.md) as well. 338caa5a94SAlex Crichton 348caa5a94SAlex Crichton## Download Precompiled Binaries 358caa5a94SAlex Crichton 368caa5a94SAlex CrichtonIf you'd prefer to not use an installation script, or you're perhaps 378caa5a94SAlex Crichtonorchestrating something in CI, you can also download one of our precompiled 388caa5a94SAlex Crichtonbinaries of `wasmtime`. We have two channels of releases right now for 398caa5a94SAlex Crichtonprecompiled binaries: 408caa5a94SAlex Crichton 418caa5a94SAlex Crichton1. Each tagged release will have a full set of release artifacts on the [GitHub 428caa5a94SAlex Crichton releases page][releases]. 438caa5a94SAlex Crichton2. The [`dev` release] is also continuously updated with the latest build of the 44a92a31d8SAlex Crichton `main` branch. If you want the latest-and-greatest and don't mind a bit of 458caa5a94SAlex Crichton instability, this is the release for you. 468caa5a94SAlex Crichton 478caa5a94SAlex Crichton[`dev` release]: https://github.com/bytecodealliance/wasmtime/releases/tag/dev 488caa5a94SAlex Crichton 498caa5a94SAlex CrichtonWhen downloading binaries you'll likely want one of the following archives (for 508caa5a94SAlex Crichtonthe `dev` release) 518caa5a94SAlex Crichton 528caa5a94SAlex Crichton* Linux users - [`wasmtime-dev-x86_64-linux.tar.xz`] 53*cc1bebbdSZalim Bashorov* macOS users - [`wasmtime-dev-aarch64-macos.tar.xz`] 548caa5a94SAlex Crichton* Windows users - [`wasmtime-dev-x86_64-windows.zip`] 558caa5a94SAlex Crichton 568caa5a94SAlex CrichtonEach of these archives has a `wasmtime` binary placed inside which can be 578caa5a94SAlex Crichtonexecuted normally as the CLI would. 588caa5a94SAlex Crichton 593e406d2eSAlex Crichton[`wasmtime-dev-x86_64-linux.tar.xz`]: https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-x86_64-linux.tar.xz 60*cc1bebbdSZalim Bashorov[`wasmtime-dev-aarch64-macos.tar.xz`]: https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-aarch64-macos.tar.xz 613e406d2eSAlex Crichton[`wasmtime-dev-x86_64-windows.zip`]: https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-x86_64-windows.zip 628caa5a94SAlex Crichton 63ab8e653cSveralvx## Install via Cargo 64ab8e653cSveralvx 65ab8e653cSveralvxIf 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: 66ab8e653cSveralvx 67ab8e653cSveralvx```console 68ab8e653cSveralvxcargo install wasmtime-cli 69ab8e653cSveralvx``` 70ab8e653cSveralvx 71ab8e653cSveralvxThis 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`: 72ab8e653cSveralvx 73ab8e653cSveralvx```console 74ab8e653cSveralvxexport PATH="$HOME/.cargo/bin:$PATH" 75ab8e653cSveralvx``` 76ab8e653cSveralvx 77ab8e653cSveralvxYou 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): 78ab8e653cSveralvx 79ab8e653cSveralvx```console 80ab8e653cSveralvxcargo binstall wasmtime-cli 81ab8e653cSveralvx``` 82ab8e653cSveralvx 838caa5a94SAlex Crichton## Compiling from Source 848caa5a94SAlex Crichton 858caa5a94SAlex CrichtonIf you'd prefer to compile the `wasmtime` CLI from source, you'll want to 868caa5a94SAlex Crichtonconsult the [contributing documentation for building](contributing-building.md). 878caa5a94SAlex CrichtonBe sure to use a `--release` build if you're curious to do benchmarking! 88