Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Install Sail

Actual archive checks and their limits are recorded in the installer validation.

Sail currently supports Linux x86-64 with glibc 2.39 or newer (Ubuntu 24.04, for example), and Apple-silicon macOS. It ships its own Verus and pinned Z3. Your existing Verus installation is left alone. Sail is distributed as prebuilt archives on GitHub releases under the MIT licence. Stable sail-solve 0.2.0 is also published to crates.io; its package and installation qualification is recorded in the crate-publication gate. The native archives and attestations are bound in the release record.

Cargo installation

Use Rust 1.99 or newer, a C toolchain, Rustup and Python 3. Install the verifier’s Rust pin, then the CLI and its pinned runtime:

rustup toolchain install 1.99.1 --profile minimal --component rust-src
cargo +1.99.1 install sail-solve --version 0.2.0 --locked
sail engine install
sail engine status
sail verify proof.rs

Cargo installs sail and the adjacent sail-solve-z3 shim. The explicit engine installer downloads the committed runtime over HTTPS, checks its archive digest, provenance and every runtime file, and installs it under Sail’s cache. It uses the same installer as source/CI runtime setup. It needs no repository checkout or GitHub credential. Existing conflicting or corrupted runtime installs are refused; they are never silently overwritten. sail engine install --from PATH continues to import an existing validated runtime.

Cargo installations establish their own vstd and target proofs; GitHub archives additionally ship their preverified vstd and signed replies. Reuse still requires the same complete inputs and Current provenance. Rustup installs the explicit verifier toolchain without changing your default. Project toolchain choices remain authoritative; see background preparation when a setup verifies without managed reuse.

Guided installation

Install a C toolchain, rustup and Python 3.9 or newer first. Use the installer from the selected Sail checkout. Choose an explicit version; the installer does not select a moving latest release:

python3 scripts/install.py --version VERSION --install-toolchain

With authenticated GitHub CLI (gh), the installer downloads through it; otherwise it uses ordinary GitHub release downloads. It never stores credentials. A downloaded archive can instead be installed offline, with its adjacent .sha256 file:

python3 scripts/install.py --archive ./sail-VERSION-aarch64-apple-darwin.tar.gz \
  --prefix ~/.local/opt

When authenticated gh is available, the installer first verifies the archive’s build-provenance attestation and refuses an archive that fails it. Without signed-in gh, it prints a note and continues with the checksum alone; --require-attestation makes the attestation mandatory. The installer verifies the checksum, checks the platform and archive layout, and validates the actual bundled runtime before making the installation available. It refuses an existing installation directory. An interrupted or failed check does not publish a partial installation; retry the same command. Every installed file and directory gets exactly the mode the archive records, whatever your umask, because the shipped vstd proof is admitted only for an installation that matches the release index’s modes. --install-toolchain explicitly installs the bundled verifier’s Rust pin with rust-src through rustup. Without it, no Rust installation is attempted. The default toolchain, shell profiles and existing installations are unchanged. Add the printed PATH line to your shell profile. The archive remains together under the prefix; do not move just its executables.

To install without Python, see manual installation.

Manual installation

Install the prerequisites first: a C toolchain and curl. On Debian or Ubuntu, run sudo apt-get install -y build-essential curl. On macOS, run xcode-select --install.

Pick the archive for your platform:

PlatformArchive
Linux x86-64, glibc 2.39 or latersail-VERSION-x86_64-unknown-linux-gnu.tar.gz
macOS on Apple siliconsail-VERSION-aarch64-apple-darwin.tar.gz

Download it with its .sha256 file, check it, unpack it and put its bin/ on PATH:

VERSION=0.2.0                      # the release you are installing
TARGET=x86_64-unknown-linux-gnu    # or aarch64-apple-darwin
base="https://github.com/Chelis-Lang/sail/releases/download/v$VERSION"
curl -fLO "$base/sail-$VERSION-$TARGET.tar.gz"
curl -fLO "$base/sail-$VERSION-$TARGET.tar.gz.sha256"
shasum -a 256 -c "sail-$VERSION-$TARGET.tar.gz.sha256"   # or: sha256sum -c
mkdir -p ~/.local/opt
tar -C ~/.local/opt -xzf "sail-$VERSION-$TARGET.tar.gz"
export PATH="$HOME/.local/opt/sail-$VERSION-$TARGET/bin:$PATH"   # add to your shell profile
sail --version

The check must print OK. Keep the unpacked directory together: sail finds sail-z3 beside it in bin/ and its Verus in engine/. On macOS, an archive downloaded with a browser is quarantined; clear that with xattr -dr com.apple.quarantine ~/.local/opt/sail-$VERSION-$TARGET.

Then install the Rust toolchain Verus pins, with its sources:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
rustup toolchain install 1.99.1 --profile minimal --component rust-src
sail engine status                 # checks Sail's Verus against its pins

This doesn’t change your default toolchain.

Rust toolchain and the preverified vstd

sail verify runs Cargo with the pinned toolchain on its own, so the release’s preverified vstd (recorded with Cargo 1.99.1) applies whatever your default Cargo is. A RUSTUP_TOOLCHAIN you set, a project’s rust-toolchain.toml, a rustup override or an explicit CARGO takes precedence, and then vstd may be verified again. Sail never installs a toolchain itself.

The archive records a finite list of exact vstd setups:

  • the vstd version sail new writes, with its default dependency resolution and features;
  • the pinned Vest registry closure with vstd alloc/std and default features disabled, recorded separately at the default limit and --rlimit 100 (qualification and limits).

Each setup also requires:

  • the pinned toolchain with rust-src and no extra components, since rustc-dev or llvm-tools change what rustc loads;
  • no forwarded Verus flags other than a supported --rlimit.

Each proof binds its own exact dependency versions, features and original verification run. Sail does not change a project’s manifest or lockfile to match a profile. Other Vest resolutions, CapybaraKV and Anvil are not covered by adding this exact profile.

Otherwise Sail verifies vstd in the project, with the same results, and answers identical solver queries from signed replies shipped in the archive.

Verus flags after -- reach vstd too, as with cargo verus verify. To keep them off vstd, pass --fwd-verus-args-to roots before --, as with stock: sail verify --fwd-verus-args-to roots -- --rlimit 100.

Verify provenance

The .sha256 file comes from the same release as its archive, so it detects a damaged download but not a replaced one. Each release archive also carries a GitHub artifact attestation signed for Chelis-Lang/sail’s release workflow. To check a downloaded archive yourself, with GitHub CLI signed in:

gh attestation verify sail-VERSION-TARGET.tar.gz --repo Chelis-Lang/sail

It must report a verified attestation for the archive’s SHA-256. Check the checksum as well (shasum -a 256 -c sail-VERSION-TARGET.tar.gz.sha256). The archives are built by the project’s release script, not on GitHub’s runners; the attestation binds each archive’s digest to this repository, so a substituted asset fails it. See releasing.

First verification and existing projects

sail engine status
sail new --lib demo
cd demo
sail verify

sail engine status validates and identifies the selected runtime and prints its rust_toolchain pin. Missing Rust sources cause proof-bundle reuse to be skipped; install that pin with rust-src using the command printed by Sail. An explicit project or environment toolchain selection takes precedence over Sail’s managed Cargo selection.

For an existing compatible project, run sail verify with the arguments you would give cargo verus verify. Installation does not edit its source, manifest or lockfile. Sail supports one Verus version, not arbitrary historical Verus/vstd combinations. The compatibility guide describes that pin and its known project limitations.

On a fresh project, a SAIL3138 note (in --output json, or on stderr with SAIL_EXPLAIN=1) explains why a shipped vstd proof cannot be used. A different dependency resolution, extra compiler components or forwarded verifier flags can cause this. So can an installation whose directory modes differ from the release index. An installation made under umask 002 (Ubuntu’s default) by scripts/install.py from release candidates up to 0.1.0-rc.7 is refused this way, with a note that wrongly blames the toolchain or Verus; reinstall it. Verification continues normally, with exact solver caching still available. Do not rewrite a real project’s lockfile merely to reproduce a benchmark’s bundle hit.

To switch back, use your existing cargo verus verify command. Remove a Sail installation by removing its directory and the corresponding PATH entry. Managed project caches can be reclaimed independently with sail cache projects prune; see disk use.