The new inter-language interoperability in .NET 5 and 6
summary
Walks through concrete .NET 5/6 tooling and demos that replace hand‑written P/Invoke and C++/CLI: a cswin32 source generator produces P/Invokes for Win32, C++/WinRT projection exposes a native window‑enumeration component (returns ivectorview of titles) consumed from C#, Rust and C++; a Rust consumer using the WinRT bindings runs and prints alarms and queries; native hosting loads CoreCLR on Linux/WSL2 and invokes managed methods. Performance measures show WinRT projections are similar to P/Invoke and the demos all run successfully.
AI-written summary · about
