Skip to content

Commit 96b6f1b

Browse files
committed
Optimize functions in farmer stack overflow for code size
1 parent 408f792 commit 96b6f1b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ blake2 = { opt-level = 3 }
312312
blake3 = { opt-level = 3 }
313313
blake2b_simd = { opt-level = 3 }
314314
blst = { opt-level = 3 }
315-
rust-kzg-blst = { opt-level = 3 }
316315
chacha20 = { opt-level = 3 }
317316
chacha20poly1305 = { opt-level = 3 }
318317
cranelift-codegen = { opt-level = 3 }
@@ -360,6 +359,15 @@ x25519-dalek = { opt-level = 3 }
360359
yamux = { opt-level = 3 }
361360
zeroize = { opt-level = 3 }
362361

362+
# These crates are always compiled with small code size, to mitigate farmer stack overflows.
363+
# For details, see: https://github.com/autonomys/subspace/issues/3698
364+
rust-kzg-blst = { opt-level = "s" }
365+
rayon-core = { opt-level = "s" }
366+
367+
[profile.release.package]
368+
rust-kzg-blst = { opt-level = "s" }
369+
rayon-core = { opt-level = "s" }
370+
363371
[profile.release]
364372
# Substrate runtime requires unwinding.
365373
panic = "unwind"

0 commit comments

Comments
 (0)