3 ms·
I think what he means is that C# apps would have a smaller size if AOT compiled to wasm instead of shipping the mono runtime with .NET assemblies. (sorry for my
by yougane 9y ago
I think what he means is that C# apps would have a smaller size if AOT compiled to wasm instead of shipping the mono runtime with .NET assemblies. (sorry for my English)
- steveklabnik 9y agoYour English is fine! I don’t know enough about how C# is AOTd to really answer that. I mean, some runtime code would still need to be in there, I assume?
- pjmlp 9y agoYes, the approach is similar to all major AOT compilers on .NET space. NGEN, .NET Native, CoreRT, Mono, Xamarin, IL2CPP, HPC#. A minimal runtime is always needed, for some of the language semantics, FFI and memory management.
- pjmlp 9y agoC# has been AOT compiled since the early days. Just that only dynamic linking was supported on the regular .NET Framework. Unity(with IL2CPP), Mono and Windows 8 store apps also support static linking. So the approach is the same as Xamarin for iOS or .NETbon the Windows store. There is an additional phase that generates the native code, using MSIL as just yet another compiler phase. As for the runtime, yes there needs to be a minimal set of services. But even C, C++, Go, ... need to have some kind of runtime if you want to use all language features.