{"repo":"clux/muslrust","free":true,"listed":false,"github":"https://github.com/clux/muslrust","clone":"git clone https://github.com/clux/muslrust.git","description":"Docker environment for building musl based static rust binaries","language":"Dockerfile","stars":1102,"topics":["musl","rust","docker","build","linux"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"muslrust A docker environment for building static rust binaries for x86 64 and arm64 environments using musl . Built daily via github actions. Binaries compiled with muslrust are light-weight , call straight into the kernel without other dynamic system library dependencies, can be shipped to most distributions without compatibility issues, and can be inserted as-is into lightweight docker images such as static distroless, scratch, or alpine. The goal is to simplify the creation of small and efficient cloud containers , or stand-alone linux binary releases . This image includes some hard-to-avoid C libraries compiled with musl-gcc , enabling static builds even when these libraries are used. Usage Pull and run from a rust project root: You should have a static executable in the target folder: Examples - Kubernetes controller with actix-web using plain distroless/static - Kubernetes reflector with axum using builder pattern - Kubernetes controller using cargo-chef for caching layers - Github release assets uploaded via github actions - Using muslrust with sccache & github actions The binaries and images for small apps generally end up make instructions. We are unlikely to include other C libraries herein unless they are very popular. Extra Rustup components You can install extra components distributed via Rustup like normal: Binaries distributed via Cargo If you need to install a binary crate such as ripgrep on a CI build image, you need to build it against the GNU toolchain (se","default_branch":null,"files":null,"tree":[],"storefront":"/r/clux","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/clux/muslrust/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}