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

Installation and local build

The implemented distribution path is a source checkout built with Cargo. This repository does not document a public package registry name, a download URL, or a universal platform support matrix. Do not substitute an unverified archive or an arbitrary binary for the checked source path below.

Required toolchain for the CLI

The workspace pins Rust through rust-toolchain.toml:

ComponentCurrent repository requirement
Rust toolchain1.98.0
Rust edition2024
CargoSupplied with the pinned Rust toolchain
Formatter and linter componentsrustfmt and clippy for repository verification
GitNeeded to obtain and update a checkout

With rustup installed, install the pinned toolchain and components once:

rustup toolchain install 1.98.0 --profile default --component rustfmt --component clippy

Entering a checkout that contains rust-toolchain.toml selects that toolchain. Confirm the active versions rather than relying on a shell prompt:

rustc --version
cargo --version

Build from a checkout

Obtain the authorized FormaSL source by your normal source-control process, then run these commands from the repository root:

cargo build -p formasl-cli --locked
./target/debug/formasl --version

For an optimized local binary:

cargo build --release -p formasl-cli --locked
./target/release/formasl --version

Cargo normally writes the executable to target/debug/formasl or target/release/formasl. Add the chosen directory to your own PATH only if you want shell access to it; the repository does not install a global command on your behalf.

--locked asks Cargo to use the checkout’s lockfile. The Forma-NeuG Rust engine is acquired from its own repository at the immutable Git revision in crates/storage-forma-native/Cargo.toml and Cargo.lock. No sibling checkout or campaign worktree is required.

For an offline dependency closure, prepare all registry and Git sources while networking is available. Choose an empty directory outside the checkout:

offline_root=/path/to/empty-offline-build
mkdir -p "$offline_root/cargo-home"
cargo vendor --locked --versioned-dirs "$offline_root/vendor" \
  > "$offline_root/cargo-home/config.toml"

Keep the whole generated source configuration: its Git source replacements are required alongside the crates.io replacement. With the pinned toolchain already installed, build from the checkout using that isolated Cargo home:

CARGO_HOME="$offline_root/cargo-home" \
CARGO_TARGET_DIR="$offline_root/target" \
CARGO_INCREMENTAL=0 RUSTFLAGS="" \
cargo build --release --locked --offline --target x86_64-unknown-linux-gnu

--offline prevents Cargo acquisition; verification of a network-denied canonical build additionally runs the command in the repository’s network sandbox. scripts/t26_build_evidence.py consumes the vendored closure, including the pinned engine, and produces its integrity-bound build inputs. The source-bundle assembler carries the generated Cargo source configuration with those inputs; do not substitute a registry-only configuration.

Verify the local binary

A build proves that Cargo produced an executable; it does not prove that a particular source program is accepted. Run a small product check after building:

./target/debug/formasl check examples/hello.fsl
./target/debug/formasl run examples/hello.fsl --app AllGreets --gas 1000

The corresponding behavior and output are shown in Getting started. The broader repository verification commands are in Verification.

Formal checker toolchain is separate

Running the FormaSL CLI does not require Agda. The repository’s formal checker has its own pinned inputs in formal/toolchain.env:

ComponentPinned version
Agda2.8.0
Agda standard library2.4

Use the repository’s canonical formal gate only when you are validating the formalization or working under its instructions:

bash scripts/check_agda.sh

Read formal/AGENTS.md before changing files under formal/. Tooling source or credentials that a local formal environment may use are not part of a program’s .fsl semantics and must not be copied into application source or machine output.

Documentation preview

The user guide is an mdBook source directory. If mdbook is installed, render it without writing a generated book into the source tree:

mdbook build docs/user -d /tmp/formasl-user-book

This rendering check validates Markdown structure and links in the generated book. The executable examples are independently checked by the Rust user-documentation gate.

Signed delivery tooling

The workspace also contains a separate formasl-distribution binary for verifying and installing a supplied delivery. Its install command takes an explicit archive, delivery metadata and signature, trusted public-key identity, authorization inputs, recipient/profile/permission values, target, and prefix. It does not discover a package or trust root from this guide.

Use that command only when an issuer has supplied those exact materials and has authorized the installation. A source build is the documented route for working with this checkout; an installer binary or a prior receipt does not by itself grant rights, prove a release is current, or create a network service.