diff --git a/Cargo.toml b/Cargo.toml index a5a87bd3e..442d3fe9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,6 +45,10 @@ wasm-opt = ['-Oz', '-g'] # Tell cargo to run `rustc` with `-Oz` - ie, to optimize for size. # https://doc.rust-lang.org/cargo/reference/profiles.html#opt-level opt-level = 'z' +# Use a single codegen-unit to enable better optimizations +codegen-units = 1 +# Enable fat link time optimization +lto = true [lib] crate-type = ["cdylib"]