Generate compact function call graph data from Rust projects.
probe-rust analyzes any standard Rust codebase and produces structured JSON describing every function, its dependencies (callees), source locations, and Rust-qualified names. It is designed for downstream verification and analysis tooling — in particular, the Beneficial AI Foundation's verification pipeline, where it feeds into probe-aeneas for Rust-to-Lean translation mapping. Output follows the Schema 2.1 envelope format; see docs/SCHEMA.md for the full specification.
-
Rust toolchain with
rust-analyzer:rustup component add rust-analyzer
-
scip CLI — auto-downloadable via
--auto-install, or install manually from sourcegraph/scip releases. Pre-built binaries are available for Linux and macOS only (no Windows). -
charon (only when using
--with-charon) — auto-buildable via--auto-install(requirescargo), or install from AeneasVerif/charon.
Every tagged release publishes binaries for Linux (x86_64, aarch64), macOS (x86_64, aarch64), and Windows (x86_64). See the Releases page or use the installer scripts:
Linux / macOS:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Beneficial-AI-Foundation/probe-rust/releases/latest/download/probe-rust-installer.sh | shWindows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://github.com/Beneficial-AI-Foundation/probe-rust/releases/latest/download/probe-rust-installer.ps1 | iex"Note: On Windows, the
extractcommand requiresscip, which has no Windows binary. You will need to buildscipfrom source or runextractunder WSL.
cargo install --git https://github.com/Beneficial-AI-Foundation/probe-rustOr clone and build locally:
git clone https://github.com/Beneficial-AI-Foundation/probe-rust
cd probe-rust
cargo install --path .# Install the latest release
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Beneficial-AI-Foundation/probe-rust/releases/latest/download/probe-rust-installer.sh | sh
# Install external tools (downloads scip, checks rust-analyzer)
probe-rust setup
# Run against a Rust project
probe-rust extract /path/to/rust-projectrust-analyzer must already be installed (see Prerequisites above). Alternatively, instead of running setup first, you can use --auto-install on the extract command to download scip on the fly.
Output lands in .verilib/probes/rust_<pkg>_<ver>.json by default.
| Command | Description |
|---|---|
setup |
Install or check status of external tools (rust-analyzer, scip) |
extract |
Generate function call graph atoms from a Rust project's SCIP index |
callee-crates |
Find which crates a function's callees belong to |
list-functions |
List all functions in a Rust project by parsing source files |
probe-rust extract <PROJECT_PATH> [OPTIONS]| Option | Description |
|---|---|
-o, --output <PATH> |
Output file path (default: .verilib/probes/rust_<pkg>_<ver>.json) |
--regenerate-scip |
Force regeneration of the SCIP index even if cached |
--with-locations |
Include per-call location data in output |
--allow-duplicates |
Continue on duplicate code_name entries (first occurrence kept) |
--auto-install |
Automatically download missing tools (scip, and charon when --with-charon is set) |
--with-charon |
Enrich atoms with Charon-derived rust-qualified-name fields (for Aeneas integration) |
For the full command reference with examples, see docs/USAGE.md. For the complete JSON schema specification, see docs/SCHEMA.md.
Running probe-rust extract produces a JSON envelope. Each entry in data describes a function and its callees:
{
"schema": "probe-rust/extract",
"schema-version": "2.3",
"tool": { "name": "probe-rust", "version": "0.3.0", "command": "extract" },
"source": {
"repo": "https://github.com/org/project.git",
"commit": "abc123...",
"language": "rust",
"package": "my-crate",
"package-version": "1.0.0"
},
"timestamp": "2026-03-17T12:00:00Z",
"data": {
"probe:my-crate/1.0.0/module/MyStruct#process()": {
"display-name": "MyStruct::process",
"dependencies": [
"probe:my-crate/1.0.0/module/helper()"
],
"code-module": "module",
"code-path": "my-crate/src/module.rs",
"code-text": { "lines-start": 42, "lines-end": 67 },
"kind": "exec",
"language": "rust",
"rust-qualified-name": "my_crate::module::MyStruct::process",
"is-disabled": false
}
}
}- SCIP index generation — runs
rust-analyzerandscipto produce a Source Code Index Protocol file for the target project (cached in<project>/data/) - Call graph construction — parses the SCIP JSON to identify all function definitions, call relationships, and trait impl disambiguation
- Accurate line spans — uses
synto parse Rust source files and resolve exact function body start/end lines - Charon enrichment (opt-in via
--with-charon) — runs Charon to derive Aeneas-compatiblerust-qualified-namefields; only needed for projects integrating with Aeneas - Schema 2.1 output — wraps the call graph atoms in a metadata envelope containing git commit, repo URL, package info, and timestamps
Releases are managed with cargo-dist and published automatically when a version tag (e.g. v0.2.0) is pushed. Each release includes:
- Pre-built binaries for all supported platforms
- Shell and PowerShell installer scripts
- SHA256 checksums
See the Releases page for downloads and the CHANGELOG for what changed in each version.
A reusable GitHub Actions workflow is provided for generating atoms from any Rust repository:
jobs:
generate:
uses: Beneficial-AI-Foundation/probe-rust/.github/workflows/generate-atoms.yml@main
with:
target_repo: some-org/some-rust-projectSee docs/USAGE.md for full details and matrix examples.
MIT OR Apache-2.0