Closed azihassan closed 1 year ago
There are many ways to decrease size of the executable. Many of them presented in Discord group: https://discord.com/channels/242094594181955585/1069135807648108624 For simple hello world you can also try to use core.stdc.stdio: puts
Writeln is the correct API to use. It matches what is used in https://wiki.dlang.org/Getting_Started and a recommended book as well. See #4 and the rules.
The goal is not to get minimal size (that often requires disabling advertised features), but the canonical experience.
Thank you @azihassan!
Thanks, interesting benchmark. I considered using dmd-latest at first, but ended up changing it to a hardcoded version since I noticed that the echo lines of the other language setups display hardcoded versions of the compiler. Then again they also use the latest compiler versions
@cyrusmsk agreed, I intended to submit a betterC version but decided against it after realizing that the repo is asking for regular hello world code snippets with regular compiler flags.
Looks like D produces a ~500 kb executable on Windows
Edit: with -release because
dmd
creates debug builds by default