jacobdeichert / mask

🎭 A CLI task runner defined by a simple markdown file
MIT License
1.11k stars 55 forks source link

Support for musl #93

Closed 8Mobius8 closed 1 year ago

8Mobius8 commented 1 year ago

Add support for musl linked executable for distributions that use it (ie. Alpine). I would think this would be done by adding another asset on release that would be named mask-vX.XX.X-x86_64-unknown-linux-musl.zip or something like it.

I have limited knowledge of rust, but seems like this could be achieved by adding another release job in .github/workflows/release.yml that could make use of an Alpine to build and target. I believe cargo needs use the target x86_64-unknown-linux-musl.

8Mobius8 commented 1 year ago

@jacobdeichert If you don't mind I would like to attempt the suggestion above.

I believe I should be able to test this out on a fork of this repo without affecting this one.

I will say this will be my first foray into github actions, so any advice would be welcome.

jacobdeichert commented 1 year ago

@8Mobius8 that would be great!

Yes, modifying release.yml is all you need to do I think.

I'd copy/paste the release-linux block, name the new one release-linux-musl and then figure out how to tell cargo to target musl. My memory is a bit fuzzy on compiling for musl, but I think you can probably still use runs-on: ubuntu-latest and it should let you cross-compile to musl. Or, GitHub might support alpine runners, so up to you if that's easier to get cargo to target musl with.

jacobdeichert commented 1 year ago

@8Mobius8 just a heads up that I released v0.11.3

You can find the musl binary attached here: https://github.com/jacobdeichert/mask/releases/tag/v0.11.3