From 3b99e95d7dd747ec022151fa36fd70df30a5fb0b Mon Sep 17 00:00:00 2001 From: Dmitry Savintsev Date: Mon, 21 Nov 2022 11:17:57 +0100 Subject: [PATCH] README.md: add musl static build instructions (#15) --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index dad0d2e..98b7e4c 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,13 @@ cargo xtask build-ebpf --release cargo build --release ``` +If you want to build a static binary with musl, install the musl target and pass the `--target` parameter to `cargo build`: +``` +rustup target add x86_64-unknown-linux-musl +cargo xtask build-ebpf --release +cargo build --release --release --target=x86_64-unknown-linux-musl +``` + To run the program: ``` # release build