Rust Workspace
Build and test the aitop/ Cargo workspace — 8 crates producing the aitop CLI binary.
Prerequisites
- Rust toolchain with edition 2024 support (MSRV 1.95)
- NVIDIA driver 595.71.05 + CUDA 13.2 (for
cudarc/nvml-wrappercrates) - cu132 venv at
/mnt/aitop-data/venv-cu132/(doctor calls Python via subprocess)
Steps
Build the workspace
cd aitop && make buildRuns
cargo build --workspace --release.Run tests
make testRuns
cargo test --workspace.Run clippy (zero warnings required)
make clippyRuns
cargo clippy --workspace --release -- -D warnings.Run the doctor (10/10 PASS expected)
make doctorRuns
./target/release/aitop doctor. Mirrorsmodel-training-prep/training/doctor.py1:1.Run CUDA kernel smoketest (optional, requires GPUs)
make kernelsTests
cuda-oxide/cudarcon both RTX 5090s (sm_120).
Key crates
| Crate | Purpose |
|---|---|
aitop-doctor |
10 health checks (NVML, venv, CUDA, torch, env vars) |
aitop-doctor/src/env_loader.rs |
Once-guarded /etc/profile.d/aitop-data.sh sourcer |
aitop-cli |
CLI entry point (aitop doctor, aitop status) |
Common failures
unsafe set_varlint: env mutation requires BOTHOnceAND single-threaded invocation- cudarc link errors: ensure CUDA 13.2 toolkit is on
LD_LIBRARY_PATH - doctor subprocess failures: cu132 venv must be at
/mnt/aitop-data/venv-cu132/
Postconditions
cargo build --workspace --releasesucceedscargo test --workspaceall passcargo clippy --workspace --release -- -D warningszero warningsaitop doctorreports 10/10 PASS
Source: drdave-flexnetos/ai-top-utility — distributed by TomeVault.