Building a Fully Static Linux Executable in 2021

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • SaaSHub - Software Alternatives and Reviews
  • ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

    Hello everyone. With all the development going on in the Rust compiler, many advice pertaining to outputting a static Linux executable is outdated or replaced by ugly hacks. Many Rust CLI tools distribute static executables, a good example of this is ripgrep (in its musl binary).

  • Cargo

    The Rust package manager

    I was going to say "just use a script", but it appears to be an issue when --target is specified. Your best bet is keeping your invocation and wrapping it in a shell script or something.

  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts