Bringing Rust to .NET
summary
rustc_codegen_clr compiles Rust to .NET assemblies and presents concrete interop: Rust code holds references to .NET classes, calls virtual methods, accesses fields, constructs instances and emits CIL so the CLR treats it like unsafe C#. It runs as a rustc backend plugin with unmodified rustc, preserves layout across assemblies, and currently rejects shared generics (uses hashed type names) while experimenting with macros and compiler tricks to let Rust define net-friendly classes. Diagnostics catch common misuse.
AI-written summary · about








