From d7d2b8f2087e701ce5653adb4121fa525ca5364a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20P=C5=82aczek?= Date: Sat, 7 Sep 2024 17:43:08 +0100 Subject: [PATCH] feat: make static build default --- .cargo/config.toml | 1 + README.md | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 0c1c209..16df86f 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,3 @@ [target.armv7-unknown-linux-gnueabihf] linker = "arm-linux-gnueabihf-gcc" +rustflags = ["-C", "target-feature=+crt-static"] diff --git a/README.md b/README.md index 8b1dcae..7b753f1 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,6 @@ rustup target add armv7-unknown-linux-gnueabihf # Build cargo build --release --target=armv7-unknown-linux-gnueabihf -# ...or statically -RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target=armv7-unknown-linux-gnueabihf ``` You can then copy and run the outputted binary like this: