Skip to content

Instantly share code, notes, and snippets.

@0atman
Last active February 27, 2020 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0atman/a97288e975fc7257f194b85ce929c4e6 to your computer and use it in GitHub Desktop.
Save 0atman/a97288e975fc7257f194b85ce929c4e6 to your computer and use it in GitHub Desktop.
Building static, compressed binaries with Haskell
hello:
ghc -static -optl-static -o hello hello.hs
upx --best --ultra-brute hello
install:
sudo apt install upx haskell-stack
stack upgrade --binary-only
stack setup
@0atman
Copy link
Author

0atman commented Feb 18, 2020

@0atman
Copy link
Author

0atman commented Feb 18, 2020

maybe stack ghc --package scotty -- -static -optl-static -fPIC hello.hs

@0atman
Copy link
Author

0atman commented Feb 27, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment