A Self-Baked Async FFI Framework for Rust C# Interop
Aug 31, 2026Cynthia Dunlop

Summary
This post details the development of a custom asynchronous FFI framework for Rust and C# interop, specifically to enable a Rust-based C# driver. It highlights the limitations of existing bindgen tools (uniffi-rs, csbindgen) for async operations and the decision to build a custom solution. The approach leverages .NET 5+'s `UnmanagedCallersOnly` attribute and focuses on enabling communication between Rust's Tokio runtime and .NET's async runtime over the C ABI.