Basic Project Setup
This example uses the current supported CLI surface.
Project Shape
Section titled “Project Shape”my-rust-project/ .assura/ config.yml src/ main.rs Cargo.toml README.md-
Create a Rust project
Terminal window cargo new my-rust-projectcd my-rust-project -
Install Assura
Terminal window curl -fsSL https://raw.githubusercontent.com/rothnic/assura/master/website/public/install.sh | sh -
Initialize Assura
Terminal window assura init -
Run validation
Terminal window assura check -
Add a stricter shape
Edit
.assura/config.yml:structure:./:extra: falseREADME.md: exists:1Cargo.toml: exists:1src/: exists:1"*.lock": exists:0-1src/:.rs: snake_caseexclude:- "target/**"The root policy mirrors the project tree. It requires the public files, allows one lockfile, closes the root to unexpected direct children, and checks Rust source names where the source files live.
-
Check again
Terminal window assura check --format text
CI Snippet
Section titled “CI Snippet”name: Assuraon: [push, pull_request]jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: curl -fsSL https://raw.githubusercontent.com/rothnic/assura/master/website/public/install.sh | sudo env BIN_DIR=/usr/local/bin sh - run: assura check --format text