Open johncalvinyoung opened 4 years ago
From what I understand there are two ways to approach this:
Ahead of time compilation to wasm This is the route Unity takes, see: https://blogs.unity3d.com/2018/08/15/webassembly-is-here/ Unity's is probably the most tested/mature and performant.
Only the runtime is compiled to wasm Mono has a wasm version of the runtime, this is used by Blazor (a SPA framework): https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor You can then run .NET dlls directly in the browser, they don't need to be compiled/transpiled. The main issue is performance, you are basically running a virtual machine (.NET) on top of a virtual machine (the javascript vm).
Thanks for those details! I'm looking into the Unity approach.
Has anyone looked into trying to compile the C# to WASM? This library appears to be well ahead of any non-GPL library in JS, and I'd love to be able to bind it in to some heavy JS geometry work I'm doing. Not sure of the current state of the C#-to-WebAssembly ecosystem though...