diff --git a/Cargo.toml b/Cargo.toml index 3f7de4c..f46e5bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,3 +7,16 @@ members = [ "rln-wasm", "utils", ] + +# Compilation profile for any non-workspace member. +# Dependencies are optimized, even in a dev build. This improves dev performance +# while having neglible impact on incremental build times. +[profile.dev.package."*"] +opt-level = 3 + +[profile.release.package."rln-wasm"] +# Tell `rustc` to optimize for small code size. +opt-level = "s" + +[profile.release.package."semaphore"] +codegen-units = 1 \ No newline at end of file diff --git a/rln-wasm/Cargo.toml b/rln-wasm/Cargo.toml index 4aa6dc3..6b61812 100644 --- a/rln-wasm/Cargo.toml +++ b/rln-wasm/Cargo.toml @@ -31,6 +31,3 @@ console_error_panic_hook = { version = "0.1.7", optional = true } wasm-bindgen-test = "0.3.13" wasm-bindgen-futures = "0.4.33" -[profile.release] -# Tell `rustc` to optimize for small code size. -opt-level = "s" diff --git a/semaphore/Cargo.toml b/semaphore/Cargo.toml index 9f06fed..58104a4 100644 --- a/semaphore/Cargo.toml +++ b/semaphore/Cargo.toml @@ -47,4 +47,4 @@ opt-level = 3 # Dependencies are optimized, even in a dev build. This improves dev performance # while having neglible impact on incremental build times. [profile.dev.package."*"] -opt-level = 3 +opt-level = 3 \ No newline at end of file