Ferrous.Ownership
3.0.0
dotnet add package Ferrous.Ownership --version 3.0.0
NuGet\Install-Package Ferrous.Ownership -Version 3.0.0
<PackageReference Include="Ferrous.Ownership" Version="3.0.0" />
<PackageVersion Include="Ferrous.Ownership" Version="3.0.0" />
<PackageReference Include="Ferrous.Ownership" />
paket add Ferrous.Ownership --version 3.0.0
#r "nuget: Ferrous.Ownership, 3.0.0"
#:package Ferrous.Ownership@3.0.0
#addin nuget:?package=Ferrous.Ownership&version=3.0.0
#tool nuget:?package=Ferrous.Ownership&version=3.0.0
Ferrous.Ownership
Flow-sensitive Roslyn diagnostic analyzer built on Roslyn's ControlFlowGraph enforcing Rust-style affine move semantics in C#:
FE0200(Error): Definite use of a moved/consumed variable ([Consuming]parameter or[ConsumesSelf]receiver).FE0201(Error): Use of a possibly moved variable across conditional branches (if/else,switch) or loop iterations.FE0202(Error): Conflicting mutable borrow (aliasing-XOR-mutability) on[Borrow],[BorrowMut], orref/in/outarguments.FE0203(Error):[Borrow]or[BorrowMut]parameter escaping its lexical scope via return, field/property store, or closure capture.FE0204(Warning): Mutating a collection while aCollectionsMarshal.AsSpan/GetValueRefOrNullRefborrow orforeachenumerator is live (RustE0502).
Installation
dotnet add package Ferrous.Ownership
Quick Example
using Ferrous;
void Send([Consuming] Packet packet) { /* takes ownership */ }
var packet = new Packet();
Send(packet);
_ = packet.Size; // error FE0200: Value 'packet' was already consumed and cannot be used again
See the Ownership Analyzer Guide and ferrous.westness.cc for full documentation.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Ferrous.Core (>= 3.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Ferrous.Ownership:
| Package | Downloads |
|---|---|
|
Ferrous
Rust-grade compile-time safety, zero-allocation primitives, source generators, and Clippy-style Roslyn analyzers for .NET (polyfilling on .NET 10 and lighting up natively on .NET 11 / C# 15). |
|
|
Ferrous.Testing
Rust-grade testing utilities for .NET: in-memory compile-fail assertions (CompileAssert, like Rust's trybuild), framework-agnostic Result/Option assertions, and zero-allocation assertions (AllocAssert). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 0 | 11/30/2026 |
| 2.8.1 | 0 | 11/30/2026 |
| 2.8.0 | 0 | 11/30/2026 |
| 2.7.0 | 0 | 11/30/2026 |
| 2.6.0 | 0 | 11/30/2026 |
| 2.4.2 | 0 | 11/30/2026 |
| 2.4.1 | 0 | 11/30/2026 |
| 2.4.0 | 0 | 11/30/2026 |
| 2.3.0 | 0 | 11/30/2026 |
| 2.2.0 | 0 | 11/30/2026 |
| 2.1.0 | 0 | 11/30/2026 |
| 2.0.0 | 0 | 11/30/2026 |
| 1.7.4 | 0 | 11/30/2026 |
| 1.7.3 | 0 | 11/30/2026 |
| 1.7.2 | 0 | 11/30/2026 |
| 1.7.1 | 0 | 11/30/2026 |
| 1.7.0 | 0 | 11/30/2026 |
| 1.6.0 | 0 | 11/30/2026 |
| 1.5.0 | 0 | 11/30/2026 |
| 1.4.0 | 35 | 11/30/2026 |