Sunday, June 28, 2020

WebAssembly: C# P/Invoke Rust & C++

C# interop with C/C++ and Rust in WebAssembly - Uno Platform

.NET P/Invoke was built to perform dynamic linking with Windows PE Dlls, but has been extended in mono to allow for static linking. This technique is also used by mono on iOS to call native code, and allows for a single executable package to contain the code to execute the application.

.NET for WebAssembly has support for it in the form of static linking of LLVM Bitcode object files... to call ... C/C++ and Rust code from C# in a WebAssembly app.

Uno Platform enables for creation of single-source C# and XAML apps which run natively on iOS, Android, macOS and Web via WebAssembly