Linking Smaller Haskell Binaries (2023)

(brandon.si)

24 points | by PaulHoule 6 days ago ago

3 comments

  • internet_points 5 days ago ago

    > This gets the binary down to 64M for me (a further -23%).

    while on my system, /usr/bin/pandoc takes 199M; not bad.

  • ashwinnair99 2 days ago ago

    Haskell binary size has been a running joke for years. Good to see actual progress. The runtime was always the real culprit more than the code itself.

    • whateveracct 2 days ago ago

      With haskell-flake, it's pretty easy to get statically-linked executables. I've got them down to like 20MB with a single Nix stanza.

      https://community.flake.parts/haskell-flake/size I actually am not sure if haskell-flake is even needed here? I just learned about this from its docs, but justStaticExecutables looks like an upstream nixpkgs function.