Skip to content

Instantly share code, notes, and snippets.

@michidk
Last active October 10, 2026 13:22
Show Gist options
  • Select an option

  • Save michidk/86cd97a26c4fe05638340ba9bf8a485c to your computer and use it in GitHub Desktop.

Select an option

Save michidk/86cd97a26c4fe05638340ba9bf8a485c to your computer and use it in GitHub Desktop.
Save as .cargo/config.toml; cargo build --release with Rust 1.98.1: 209 bytes, or 153 with minimal.ld
[build]
target = "x86_64-unknown-linux-gnu"
rustflags = [
"-Cforce-unwind-tables=no",
"-Crelocation-model=static",
"-Clinker-features=-lld",
"-Clink-arg=-nostartfiles",
"-Clink-arg=-static",
"-Clink-arg=-Wl,--build-id=none,-z,noseparate-code,-z,nosectionheader,--no-eh-frame-hdr",
# "-Clink-arg=-Wl,-T,minimal.ld",
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment