From 64b8c6af95eea687cd74e6e87719fb6bc9c27b59 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sun, 5 May 2024 23:04:09 +0100 Subject: [PATCH] feat: justfile for experimenting with smaller binaries --- justfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..d9a9d97 --- /dev/null +++ b/justfile @@ -0,0 +1,15 @@ +set export +RUSTFLAGS := "-Zlocation-detail=none" + +target := `rustc -Vv | awk 'FNR == 5 {print $2}'` + +# Build for a small executable +tiny: + cargo +nightly build \ + -Z build-std=std,panic_abort \ + -Z build-std-features=panic_immediate_abort \ + --target {{target}} --release + +# Normal build, in this file for no good reason +build: + cargo build --release