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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user