Skip to content

Commit 001041f

Browse files
authored
Update wasm-opt invocation defaults for debug builds
1 parent 410da2f commit 001041f

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Subheadings to categorize changes are `added, changed, deprecated, removed, fixe
66

77
## Unreleased
88

9+
## 0.12.1
10+
### fixed
11+
- When wasm-opt level is not set explicitly, do not invoke it at all for debug builds, and for release builds invoke with default optimization level.
12+
913
## 0.12.0
1014
### added
1115
- Closed [#139](https://github.com/thedodd/trunk/issues/139): Download and manage external applications (namely `wasm-bindgen` and `wasm-opt`) automatically. If available in the right version, system installed binaries are used but if absent the right version is downloaded and installed. This allows to use trunk without the extra steps of downloading the needed binaries manually.

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "trunk"
3-
version = "0.12.0"
3+
version = "0.12.1"
44
edition = "2018"
55
description = "Build, bundle & ship your Rust WASM application to the web."
66
license = "MIT/Apache-2.0"

src/pipelines/rust_app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl RustApp {
7272
.get("data-wasm-opt")
7373
.map(|val| val.parse())
7474
.transpose()?
75-
.unwrap_or_default();
75+
.unwrap_or_else(|| if cfg.release { Default::default() } else { WasmOptLevel::Off });
7676
let manifest = CargoMetadata::new(&manifest_href).await?;
7777
let id = Some(id);
7878

0 commit comments

Comments
 (0)