Skip to content
This repository was archived by the owner on Dec 12, 2020. It is now read-only.

[RFC] Statically linked binaries #31

@chshersh

Description

@chshersh

I'm opening this issue to start a discussion around the ability to build statically linked binaries for Haskell projects. I think it will be extremely beneficial for the whole Haskell community if developers could produce such binaries easily with GitHub Actions workflows.

The following blog post describes in detail how to produce binaries for Haskell applications on all three operating systems using the setup-haskell action:

Cabal has the --enable-executable-static flag (mentioned in the blog post about the latest changes in HLS) which allows building statically linked binaries. Still, since they are built on Ubuntu, they are not truly statically linked. I expressed my concerns in the comments under the blog post:

For real static binaries, you need to build them inside the Alpine-based Docker container. I've used the ghc-musl in the past, and I find it quite pleasant and easy to use, but I had to do everything manually on my laptop. It would be nice to automate this process somehow.

I'm going to mention a few people, who might be interested in this discussion (sorry for notifications, feel free to unsubscribe from this conversation):

  • @vrom911 (author of the GitHub binaries releases blog post)
  • @bubba (author of producing statically linked binaries for HLS)
  • @utdemir (author of the ghc-musl project)
  • @hasufell (author of statically linked binaries for ghcup-hs)

I would like to hear your thoughts on how we can proceed with this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions