Skip to content

Commit 1ddcf84

Browse files
adityamukhoclaude
andcommitted
fix: shrink release binary to stay under 1 MiB limit
- Move serde_json to [dev-dependencies]: it is only used in a #[cfg(test)] block in graph/types.rs, so it must not be linked into the release binary - Add lto = true: whole-program dead-code elimination across crate boundaries - Add codegen-units = 1: single codegen unit enables better optimization - Add strip = "symbols": removes symbol table from the release binary Together these bring the binary well under the 1 MiB project goal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6ea71d1 commit 1ddcf84

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ authors = ["Aditya Mukhopadhyay"]
88

99
[dependencies]
1010
serde = { version = "1.0", features = ["derive"] }
11-
serde_json = "1.0"
1211
postcard = { version = "1.0", features = ["alloc"] }
1312
crc32fast = "1.4"
1413
anyhow = "1.0"
@@ -18,10 +17,14 @@ clap = { version = "4.5", features = ["derive"] }
1817

1918
[dev-dependencies]
2019
tempfile = "3"
20+
serde_json = "1.0"
2121

2222
[features]
2323
default = []
2424
wasm = []
2525

2626
[profile.release]
2727
panic = "abort"
28+
lto = true
29+
codegen-units = 1
30+
strip = "symbols"

0 commit comments

Comments
 (0)