News for hackers. Stuff that matters.
Re:JavaScript to Rust and Back Again: A Wasm-Bindgen Tale by yougane on Wednesday April 04, 2018 @08:09PM (#16760570)
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)
Re:JavaScript to Rust and Back Again: A Wasm-Bindgen Tale by pjmlp on Thursday April 05, 2018 @01:30AM (#16762064)
C# 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.

Re:JavaScript to Rust and Back Again: A Wasm-Bindgen Tale by steveklabnik on Wednesday April 04, 2018 @08:42PM (#16760753)
Your 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?

Re:JavaScript to Rust and Back Again: A Wasm-Bindgen Tale by pjmlp on Thursday April 05, 2018 @01:34AM (#16762075)
Yes, 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.