Skip to content

Installation

exav runs on Linux, macOS and Windows and ships as a single binary. The Linux release builds are static (musl); the macOS and Windows builds link the system libraries. The prefork worker pool, the per-job limits (--max-scan-secs, --max-process-bytes) and --auto-update are Unix only.

Each release on GitHub carries binaries for {x86_64,aarch64}-unknown-linux-musl (static, any distro), {x86_64,aarch64}-apple-darwin and x86_64-pc-windows-msvc, and the WASI module exav-wasm-<tag>-wasm32-wasip1.wasm (see the WASM sandbox guide). Each archive has a .sha256 checksum beside it. For example, on 64-bit Linux:

Terminal window
tag=v0.0.3 target=x86_64-unknown-linux-musl
curl -fsSLO https://github.com/sylvinus/exav/releases/download/$tag/exav-$tag-$target.tar.gz
tar xzf exav-$tag-$target.tar.gz
sudo install -m755 exav /usr/local/bin/exav
exav --version

The binaries are the default build, without HTTP support. To fetch signatures with --auto-update or scan URLs, build with --features http (below).

Every archive carries the LICENSE and the NOTICE of what the binary links. The same releases carry the other tools in archives of their own, installed as their pages say: exav-unpack, exav-grep, exav-pe-emu and exav-imagehash.

Building needs Rust 1.95 or newer (rustc --version; rustup update to upgrade).

Terminal window
cargo install exav

That installs the exav binary with the default pure-Rust build, which handles every supported archive format. For a build with HTTP support (URL scanning and signature updates over HTTP(S)):

Terminal window
cargo install exav --features http

The build uses the release profile of the published binaries: overflow checks, fat LTO and one codegen unit, for a longer build that needs about 3 GiB of memory at its peak. On a smaller machine, --profile fast-build keeps the overflow checks and builds faster with less memory, for larger and slower binaries:

Terminal window
cargo install exav --profile fast-build

See Feature flags for all build options.

  1. Install a Rust toolchain (1.95 or newer) via rustup.

  2. Clone and build:

    Terminal window
    git clone https://github.com/sylvinus/exav
    cd exav
    cargo build --release -p exav # -> target/release/exav
    ./target/release/exav --help

    The repository’s release profile builds with fat LTO and one codegen unit: smaller and faster binaries, for a longer build that needs about 3 GiB of memory at its peak. The Docker image is built the same way. cargo build --profile fast-build -p exav (to target/fast-build/exav) is the shorter build.

  3. Put the binary somewhere on your PATH:

    Terminal window
    sudo install -m755 target/release/exav /usr/local/bin/exav

To add HTTP(S) support (URL scanning and signature auto-update):

Terminal window
cargo build --release -p exav --features http

For a smaller binary with only the archive formats and decryption:

Terminal window
cargo build --release -p exav --no-default-features --features all-formats,decrypt

See Feature flags for the full list of build-time options.

Build a .deb locally with cargo-deb:

Terminal window
cargo install cargo-deb
cargo build --release -p exav
cargo deb -p exav --no-build # the binary, and the systemd unit exav.service
sudo apt install ./target/debian/exav_*.deb

The unit runs as the clamav user and reads /var/lib/clamav, as clamav-daemon does; the package creates neither, so install it on a machine that has ClamAV’s (see Migrating from ClamAV).

The published image is a wire-level replacement for the ClamAV Docker image: the same clamd port 3310 and protocol. It fetches signatures itself from a source you name, such as a cvdupdate mirror of Cisco’s database:

Terminal window
docker run -d -p 127.0.0.1:3310:3310 -v exav-db:/var/lib/exav \
-e EXAV_SIG_SOURCES=https://clamav-mirror.internal/ ghcr.io/sylvinus/exav

The port is published on localhost only, because the clamd protocol has no authentication.

Without a source it waits for another container to fill the volume. See the Docker guide for signature population, environment variables, and the dual-container updater pattern.

To run the scanner sandboxed (for untrusted signatures), take the release’s .wasm or build the wasm32-wasip1 module:

Terminal window
rustup target add wasm32-wasip1
cargo build --release --target wasm32-wasip1 -p exav-core --features wasi-bin

The output is target/wasm32-wasip1/release/exav-wasm.wasm. See the WASM sandbox guide for how to run it under wasmtime.

exav ships no signature database of its own, so the next step is to get signatures and run a first scan.