News for hackers. Stuff that matters.
Re:Ask HN: Who is using the D language and likes/doesn't lik... by schemescape on Saturday September 23, 2023 @11:00AM (#37623858)
C# AOT is down to 1 - 2 MB? Are any tricks required? Is it compressed? Does it have runtime dependencies? How is start up time?

Last time I tried C# AOT (not sure what version, but it was in March of this year) I ended up with a 67 MB (static) executable.

Edit: the docs mention a web app at 8.5 MB (static) on Linux: https://learn.microsoft.com/en-us/aspnet/core/release-notes/...

Re:Ask HN: Who is using the D language and likes/doesn't lik... by neonsunset on Saturday September 23, 2023 @12:08PM (#37624510)
Go's 2MB is just a hello world executable. Same for C# (it's about 1.4ish MB now).

Once you start referencing heavy dependencies like networking stack or bits of async runtime, the binary will get larger. 8.5 MB while very optimistic (it will be usually larger for back-end applications, which is different to parent comment's IoT scenario), it is actually not far off what you'd get with Rust's Tokio + Axum + Serde + Reqwest and auxiliary crates to replicate the functionality that base ASP.NET Core offers.

Re:Ask HN: Who is using the D language and likes/doesn't lik... by schemescape on Saturday September 23, 2023 @04:23PM (#37627134)
Good point, I was thinking of Hello World.

Regardless, < 10 MB for a nontrivial program is a huge improvement. Maybe I need to revisit C#…