Running WebAssembly and WASI with .Net
ericsink.com
ericsink.com
There's a bunch of language extensions which let you access C# heap, string types etc from C++. You may want to define a "shim" layer to do the translation, but the bulk of your existing C++ can just compile straight across.
https://ericsink.com/Abstraction_Pile.html
A particularly good quote:
> I stop whenever I get to Physics or Chemistry. For my purposes, light is real, not an abstraction.
> Whatever you call it, what this project does is take a WebAssembly module and convert it into a .NET assembly on disk.
So running such code should be no different than any other .Net code in that regard.
As such I don't see how it wouldn't play nice, unlike PInvoke/COM stuff, which is native code doing whatever native code feels like.
I wonder thought if one could just build CIL backend for LLVM.