fensu-rust analyzer and run through the normal
fensu command. There is no separate Rust command or policy file.
Configure a workspace
Add a named target tofensu.toml:
rule_packs = ["rust"] and select = ["FPRS"] are the Rust defaults. Keeping
them explicit makes the active policy clear in a multi-target repository.
Then run:
roots = ["src"]. If the Cargo project is below
the repository root, set root to that directory. Target paths are relative to
root.
Cargo discovers workspace members, package names, library and binary targets, and
integration-test targets automatically. You do not need to list crates unless you
deliberately want a closed inventory. Rust targets reject positional paths because
Cargo owns target discovery.
What it checks
Therust pack exposes all 117 implemented rules under FPRS. The rules cover:
- Cargo workspace and dependency policy;
- module ownership, visibility, layout, and import boundaries;
- file, function, naming, and error-handling hygiene;
- function shape and coordination budgets; and
- unit and integration-test structure and conventions.
Cargo.toml; they do not use Python
definition selectors. Inspect any rule and its effective settings with:
Rule options
Adjust a rule under the target’s standardrule_options table:
Budgets must be positive integers. Unknown rule codes, option names, and invalid
value types are rejected instead of being silently ignored.
Tooling and repository boundaries
Use the target’s normaltooling paths to identify tooling crates:
forbidden_packages prevents runtime
crates outside those paths from depending on the named tooling packages and defaults
to an empty list.
Parser boundaries are also explicit and repository-neutral by default:
packages defaults to an empty list and restricted_paths defaults to ["rules"].
Dependency aliases are resolved when matching package identities.
Closed inventories are optional:
Cargo metadata and caching
Rust sources, Cargo manifests, an existing lockfile, and target configuration are cache inputs. Fensu uses locked dependency resolution whenCargo.lock exists.
For a lock-free workspace, it reads declared dependencies without creating a
lockfile.
If Cargo metadata cannot be read, Fensu reports a setup diagnostic and does not cache
the result. The result remains uncached even when rule selection hides that diagnostic.
