# `mix alternera.wasm_host`
[🔗](https://github.com/10e-ab/alternera-wasm/blob/v0.9.1/alternera_plugin_wasm_framework/lib/mix/tasks/alternera.wasm_host.ex#L1)

Puts `alternera_wasm_host`, the host program of
`PluginWasmFramework.Runtime.Port`, at
`priv/native/<target>/alternera_wasm_host` in the framework package.

    mix alternera.wasm_host            # build from source with cargo
    mix alternera.wasm_host --fetch    # download a release binary
    mix alternera.wasm_host --check    # say whether one is in place

**Build** runs `cargo build --release --locked` in the package's
`native/alternera_wasm_host/` and copies the binary, mode 0755 (a
worktree copy drops execute bits, so the mode is set every time). It
needs a Rust toolchain.

**Fetch** downloads `alternera_wasm_host-<version>-<target>.tar.gz`
from the package's GitHub release,
`https://github.com/10e-ab/alternera-wasm/releases/download/v<version>`,
or from `ALTERNERA_WASM_HOST_URL` when it names another base (a mirror),
and checks it against `priv/native/checksums.term`, the SHA-256 per
target for the package's version; a target with no entry there is
refused, so nothing unverified is put in place. A release carries
`x86_64-unknown-linux-gnu`, `aarch64-unknown-linux-gnu`,
`aarch64-apple-darwin` and `x86_64-apple-darwin`; any other machine
builds.

A node on `Runtime.Wasmex` needs neither.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
