This post presupposes a bit of knowledge about C#/WASM and Native code linking in the C# ecosystem. I wrote a post a while back that could be a complement to this that does some more level setting about what's possible these days with compiling C#-based engines to the web for those that don't already have the context:
So You Want To Compile Your C# Game Engine To The Web With WASM
https://kylekukshtel.com/csharp-wasm-game-engine-compile-web...