3 ms·
Fundamentally, to "require host runtime" is not the same thing. There's zero reality where the combination of jars, classpath, system JVM version, system JDK ve
by 15155 3y ago
Fundamentally, to "require host runtime" is not the same thing. There's zero reality where the combination of jars, classpath, system JVM version, system JDK version is the same in developer or end-user experience.
C# tooling that statically bundles a massive runtime or JIT compiler where most of the host functionality lives is also fundamentally different in internal implementation than what Go or Rust gives you.
GraalVM is a true native binary and is the closest thing mentioned here - the tooling still sucks compared to Rust, Go, or .NET.
- neonsunset 3y agoThe "massive runtime" is on average a 20-60MB executable binary (JIT) if you apply trimming (a single flag or build property). It is no different to Go which too includes async runtime with its own threadpool, type system facilities to do reflection and a GC. If you do AOT publish instead (which is about 9MB size for a full web server + threadpool and more) - it will actually outperform Go at trimming unreferenced code once you start adding dependencies (hello 200MB binary sizes or worse in the Go world - it is almost as if there is no free lunch in programming). Do not conveniently ignore these facts - NativeAOT produces true native binaries. If you look at them with Ghidra (with symbols not stripped) - they resemble something like C++ with garbage collector (write barrier calls) and a couple of interface dispatch calls. (I still find it shortsighted and ironic because coming from worse ecosystems to Go naturally feels like a breath of fresh air yet results in developers being stuck in local maxima, ignoring far better options. And it also ends up being the discussion about the publishing model over language merits which Go has few.)