Skip to content

Trust 0.2.0 — adoptable as an advisory linter

Choose a tag to compare

@briannadoubt briannadoubt released this 11 Jun 06:27
· 23 commits to main since this release

First external integration feedback drove this release: Trust now meets a cargo workspace as an advisory linter that rides on the normal toolchain, not just a separate dialect you compile.

Highlights

  • Advisory mode (no activation): trust check --rules bugs|safety runs the bug-catching rules (.unwrap(), as-casts, bare indexing, dropped error context) over plain Rust — no #![strict], no R0042, nothing added to source.
  • Workspace-aware check: point trust check at a file, directory, or Cargo.toml — one command, CI-ready exit code.
  • trust.toml config: project-level rules selection + allow (disable) / warn (relax to non-failing) — no more inline #[allow] sprinkling.
  • SARIF output: --format sarif for GitHub code-scanning (inline annotations + Security tab).
  • trust fix --safety: mechanically rewrites .unwrap()/.expect(…)? inside Result-returning functions.
  • LSP: surfaces advisory findings in-editor on plain Rust.
  • MSRV lowered 1.95 → 1.85 (verified, CI-guarded) — adopting Trust no longer drags your toolchain forward.
  • Activation: [package.metadata.trust] is the recommended project opt-in (invisible to stock cargo); #![strict] is documented as not valid stock Rust.

Install: cargo install trust-lang (advisory CLI) — see the README for the full build-gate setup.