mirror of
https://github.com/encounter/wasmtime.git
synced 2026-03-30 11:42:15 -07:00
310e6677dc
On a high level, this is what this PR changed:
1. Move the CLI chapter before the API chapter.
I think this makes sense because the CLI is more high-level.
The same change was proposed in
https://github.com/bytecodealliance/wasmtime/pull/7987.
1. Move some Rust and C examples from the "Examples" chapter into the API chapter.
1. Remove the original main C and Rust chapter introduction files.
They contained mostly outdated or duplicate information.
1. Rename the "Examples" chapter to "Further Examples".
(For lack of a better name.)
1. Rename "Embedding" to "API" at some places since API is a more generally known term.
The term "embedding" is also slightly more confusing, I think,
because the term nowadays also used a lot in LLM-related communication.
1. Read through the entire document and fix some outdated links and information.
1. Fix a missing subheading for Elixir (it was mentioned on the lang page, but not in the menu).
68 lines
2.7 KiB
Markdown
68 lines
2.7 KiB
Markdown
# Installing `wasmtime`
|
|
|
|
Here we'll show you how to install the `wasmtime` command line tool. Note that
|
|
this is distinct from embedding the Wasmtime project into another, for that
|
|
you'll want to consult the [embedding documentation](lang.md).
|
|
|
|
The easiest way to install the `wasmtime` CLI tool is through our installation
|
|
script. Linux and macOS users can execute the following:
|
|
|
|
```sh
|
|
$ curl https://wasmtime.dev/install.sh -sSf | bash
|
|
```
|
|
|
|
This will download a precompiled version of `wasmtime`, place it in
|
|
`$HOME/.wasmtime`, and update your shell configuration to place the right
|
|
directory in `PATH`.
|
|
|
|
Windows users will want to visit our [releases page][releases] and can download
|
|
the MSI installer (`wasmtime-dev-x86_64-windows.msi` for example) and use that
|
|
to install.
|
|
|
|
[releases]: https://github.com/bytecodealliance/wasmtime/releases
|
|
|
|
You can confirm your installation works by executing:
|
|
|
|
```sh
|
|
$ wasmtime -V
|
|
wasmtime 0.12.0
|
|
```
|
|
|
|
And now you're off to the races! Be sure to check out the [various CLI
|
|
options](cli-options.md) as well.
|
|
|
|
## Download Precompiled Binaries
|
|
|
|
If you'd prefer to not use an installation script, or you're perhaps
|
|
orchestrating something in CI, you can also download one of our precompiled
|
|
binaries of `wasmtime`. We have two channels of releases right now for
|
|
precompiled binaries:
|
|
|
|
1. Each tagged release will have a full set of release artifacts on the [GitHub
|
|
releases page][releases].
|
|
2. The [`dev` release] is also continuously updated with the latest build of the
|
|
`main` branch. If you want the latest-and-greatest and don't mind a bit of
|
|
instability, this is the release for you.
|
|
|
|
[`dev` release]: https://github.com/bytecodealliance/wasmtime/releases/tag/dev
|
|
|
|
When downloading binaries you'll likely want one of the following archives (for
|
|
the `dev` release)
|
|
|
|
* Linux users - [`wasmtime-dev-x86_64-linux.tar.xz`]
|
|
* macOS users - [`wasmtime-dev-x86_64-macos.tar.xz`]
|
|
* Windows users - [`wasmtime-dev-x86_64-windows.zip`]
|
|
|
|
Each of these archives has a `wasmtime` binary placed inside which can be
|
|
executed normally as the CLI would.
|
|
|
|
[wasmtime-dev-x86_64-linux.tar.xz`]: https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-x86_64-linux.tar.xz
|
|
[wasmtime-dev-x86_64-macos.tar.xz`]: https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-x86_64-macos.tar.xz
|
|
[wasmtime-dev-x86_64-windows.zip`]: https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-x86_64-windows.zip
|
|
|
|
## Compiling from Source
|
|
|
|
If you'd prefer to compile the `wasmtime` CLI from source, you'll want to
|
|
consult the [contributing documentation for building](contributing-building.md).
|
|
Be sure to use a `--release` build if you're curious to do benchmarking!
|