build: static musl release build capability

rust-toolchain.toml gains the x86_64-unknown-linux-musl target; the
flake devShell gains a musl cc (pkgsCross.musl64) + CC/linker env so a
`cargo build --target …-musl` compiles rusqlite's bundled SQLite C and
links fully static (D2: single static binary, no runtime deps). Cargo
release profile strips symbols (13MB -> 10MB). Verified locally: the
musl binary is static-pie, statically linked, stripped, runs standalone.
This commit is contained in:
claude@clouddev1
2026-06-12 21:43:23 +00:00
parent 9d8161218a
commit 8e3208528e
3 changed files with 28 additions and 2 deletions
+6
View File
@@ -68,6 +68,12 @@ tempfile = "3.27.0"
incremental = false
debug = "line-tables-only"
# Release builds back the distributed binaries (D2: single static binary).
# strip = "symbols" drops the symbol table at link time so the shipped artifact
# is lean (≈13 MB → 10 MB for the musl build) without a separate strip step.
[profile.release]
strip = "symbols"
[lints.rust]
unsafe_code = "forbid"
unreachable_pub = "warn"