Skip to content
github-actions[bot] edited this page Nov 30, 2026 · 12 revisions

Ferrous Logo

Ferrous Wiki

Welcome to the Ferrous documentation!

Ferrous brings Rust's compile-time guarantees, zero-allocation primitives, and ergonomic diagnostics to .NET (net10.0 and net11.0, with .NET 11 C# 15 [Union] / closed light-up and runtime-async=on).

Each guide walks through realistic usage examples and explains what Rust and Ferrous add over vanilla .NET—turning subtle runtime bugs, races, and hidden allocations into compile-time checks.

Quick Links

  • Getting Started — Install Ferrous, individual packages, dotnet fe, or scaffold with dotnet new ferrous
  • Scope Guards — Zero-allocation ref struct RAII defer/rollback guards
  • Results & Options — Allocation-free Result<T, TError>, Option<T>, ContextError/.WithContext(...), CheckedMath, NonZero<T>, NonEmptyString, NonEmptyList<T>, and .Get(...)
  • Concurrency & Analyzers — Data-owning Mutex<T>, AsyncMutex<T>, RwLock<T>, AsyncRwLock<T>, OnceLock<T>, LazyLock<T>, TypedChannel, TaskScope + FE0500–FE0503
  • Discriminated Unions — Zero-boxing [DiscriminatedUnion] (.NET 11 [Union] light-up, [ErrorMessage], JSON), validated [Newtype] structs, and [Instrument] Activity spans
  • MustUse Analyzer — FE0001 [MustUse] enforcement
  • Ownership Analyzer — FE0200–FE0203 CFG-based move semantics, inter-procedural forwarding, & borrowing exclusivity/escape
  • Typestate Protocol — FE0300–FE0303 linear state machines & terminal-state leak checks
  • Pedantic Analyzers — FE0400–FE0427 Clippy-style lints, bounds-aware indexing, & inter-procedural summaries + <FerrousPedantic>true</FerrousPedantic>
  • Testing & Docs — Ferrous.Testing (CompileAssert, PropAssert/Gen<T>, AllocAssert, AssertOk/AssertErr), dotnet fe doctest, dotnet fe doc, and dotnet new ferrous
  • Web & Data (ASP.NET Core / EF Core) — Ferrous.AspNetCore Minimal API ProblemDetails & endpoint filters, Ferrous.EntityFrameworkCore value converters & Result queries
  • CLI Tool — dotnet fe (expand, graph, init, audit, doctest, test, doc, migrate) & IDE migration refactorings
  • Project Site & Live API Reference — Auto-generated by dotnet fe doc
  • Roadmap — Now / Next / Later roadmap

Clone this wiki locally