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

Set up your environment

Prerequisites

Rust stable via rustup, with rustfmt and clippy:

rustup component add rustfmt clippy

rust-toolchain.toml pins the channel and components, so rustup installs the right ones the first time you build.

pre-commit for the git hooks. Install it however you install Python tools (pipx install pre-commit, brew install pre-commit, uv tool install pre-commit).

Get the workspace building

git clone https://github.com/graze-ai/vidi
cd vidi

cargo build          # build the workspace
pre-commit install   # wire the git hooks

The first build takes a while. Most of it is the 19 tree-sitter grammars compiling their generated C. Later builds only recompile what changed.

Confirm it works

cargo run -- status

Run inside the repo, that prints a coverage line for vidi’s own code. If you get a verdict rather than an error, the workspace is set up.

Two binaries live in vidi-cli, so cargo run needs default-run = "vidi" to know which one you mean. The other, fake-vidi, exists only for the hooks test suite.

Run the tests

cargo test --all --all-features --locked

--all-features matters. The hooks suite is gated behind vidi-cli’s private _fake-vidi feature, which is what keeps the test helper out of cargo install. A bare cargo test silently skips that suite, meaning it passes, and it did not run what you thought it ran.

The crates

Six, with dependency edges pointing one way into a parser-free core:

CrateWhat it is
vidi-coreThe trusted core: addressing, digests, records, the ledger, policy, crypto. Depends on no internal crate, and never sees a parser.
vidi-langThe scan engine: one generic tree-sitter descent plus a Markdown profile.
vidi-graphSignificance scoring. Advisory; never feeds a content hash.
vidi-cliThe shipped vidi binary and its filesystem glue.
vidi-pyThe PyO3 bridge over the core verifier.
vidi-interopThe renderer-side client contract. Binds the engine’s output, never re-derives a verdict.

Editors

.idea/ and .vscode/ carry shared settings and load automatically. In VS Code, install the recommended extensions when prompted; rust-analyzer is configured to run clippy on check.

Next

Gates and checks