mono-wasm icon indicating copy to clipboard operation
mono-wasm copied to clipboard

Generating Code using C# Compiler or Reflection.Emit

Open MichaelPeter opened this issue 6 years ago • 0 comments

What are the plans for generating code for serializers, CodeDom (using C# compiler or Reflection.Emit) etc?

From my naive standpoint a Reflection.Emit Implementation shouldn't be toooooo complicated I guess, since you only would have to send it through the Compiler Pipeline (which already exists if you compile the DLL to wasm on the client side)?

Or will there be no generation support (like I think it is in MonoTouch) and generating will only be possible if you use AoT (Ahead of Time)-Compiliation? My goal is mostly for generating Implementations for Interfaces/Abstract classes, less for performance optimizations (but since the code should be used both on server and (javascript) client side it would be nice).

One alternative option I thought of is sending the instructions for generating the code to the server, which compiles a DLL (using for example the C# Compiler), which is then again downloaded by the mono-wasm. Is this maybe already possible?

MichaelPeter avatar Apr 16 '18 09:04 MichaelPeter