Building static executables with Stack

To build static executables for command line or server applications from Haskell for Mac projects on both OS X and Linux (e.g., to deploy to hosts without a Haskell toolchain), please follow the instructions in this article.

Have more questions? Submit a request

3 Comments

  • 0
    Avatar
    Can Akçura

    Now getting excited . Does the article means that we can develop an executable in Haskell for mac that can run in Raspberry pi  without the need of haskell environment to be installed there too ? Can you please describe a little bit dependent system libraries that is needed for newbies?

  • 0
    Avatar
    Manuel Chakravarty

    I believe, the main problem in compiling for Raspberry Pi is that this involves cross-compiling (i.e., the compiler running on an Intel architecture needs to generate ARM code for the Raspberry Pi). As far as I know, Stack does not have build in support for cross-compilation. So, I am sorry, I don't think there is an easy way to get this working.

  • 0
    Avatar
    Eric Zoerner

    This is possible with Docker, but instead of the Haskell environment you would need to have Docker installed on the Pi (or whatever the target machine is).

Please sign in to leave a comment.
Powered by Zendesk