dbrgn / tealdeer

A very fast implementation of tldr in Rust.
https://dbrgn.github.io/tealdeer/
Apache License 2.0
4.06k stars 123 forks source link

feat: add release build target "linux-aarch64-musl" for platform "linux/arm64" #351

Closed nifr closed 7 months ago

nifr commented 7 months ago

First of all THANK YOU for all the work you put into tealdeer and this awesome open-source project in general ❤️

This PR adds support for the linux/arm64 platform (which is required for i.e. Linux Docker images on Apple M1/M2/M3 Chips). 🚀

I'd love to download the linux/arm64 binary directly from releases in this repository in the future. If possible please create a new release after merge.

I have tested the build process and binary release with a fictional v1.6.2 release in my fork.

You can find the release here: github.com/nifr/tealdeer/releases/tag/v1.6.2

Try it as follows:

# start a arm64 docker image
docker run --rm -it --platform=linux/arm64 debian:bullseye-slim

# download the binary
curl -sL \
 -o /usr/local/bin/tldr \
  https://github.com/nifr/tealdeer/releases/download/v1.6.2/tealdeer-linux-aarch64-musl

 # make it executable
chmod +x /usr/local/bin/tldr

# try "tldr" commands
tldr --update
tldr --version
LANGUAGE=en tldr git
LANGUAGE=de tldr git

# install "file" to inspect the binary
apt-get update
apt-get install -yq file

# show ELF information for the binary
file /usr/local/bin/tldr

Screenshot of my binary test on a MacBook Air 2023 (M2):

Screenshot 2024-01-17 at 00 41 43