Hacker News new | ask | show | jobs
by recursivedoubts 1651 days ago
would be interesting to know the total size of the program including deps

sounds extremely tight given the functionality

1 comments

If I understood your point correctly you are talking about the binary size? Me naively compiling with `nim c -d:release` and running `strip` on it gives the server binary to be around 700kb, and it's dynamically linked to glibc. There are tricks and stuff to make this smaller [1], but it's already small enough and easy enough to deploy.

Plus Nim is fast! I can load the index page of this application at 90k requests per second single-threaded on a laptop from a few years ago.

[1]: https://hookrace.net/blog/nim-binary-size/

That is a pretty neat result, it looks like with that custom linking magic you can make binaries even smaller. Makes sense if you consider the vast majority of standard libraries isn't actually used regardless of how you link.