Skip to content

Commit 693f5c6

Browse files
authored
Always download wasm opt from the binary (#4247)
* always download wasm opt from the binary * clean up and pass clippy * fix playwright commands * don't cache dx target folder
1 parent c2a6c14 commit 693f5c6

File tree

6 files changed

+226
-110
lines changed

6 files changed

+226
-110
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ jobs:
221221
npm ci
222222
npm install -D @playwright/test
223223
npx playwright install --with-deps
224+
rm -rf ./target/dx
224225
npx playwright test
225226
- uses: actions/upload-artifact@v4
226227
if: always()

.github/workflows/publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ jobs:
112112
checksum: sha256
113113
manifest_path: packages/cli/Cargo.toml
114114
ref: refs/tags/${{ env.RELEASE_POST }}
115-
features: optimizations
116115
zip: "all"
117116

118117
# todo: these things

packages/cli/Cargo.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,6 @@ tokio-console = ["dep:console-subscriber"]
154154
bundle = []
155155
no-downloads = []
156156

157-
# when releasing dioxus, we want to enable wasm-opt
158-
# and then also maybe developing it too.
159-
# making this optional cuts workspace deps down from 1000 to 500, so it's very nice for workspace adev
160-
optimizations = ["wasm-opt", "asset-opt"]
161-
asset-opt = []
162-
wasm-opt = ["dep:wasm-opt"]
163-
164157
[[bin]]
165158
path = "src/main.rs"
166159
name = "dx"

packages/cli/src/build/request.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3210,8 +3210,7 @@ impl BuildRequest {
32103210
//
32113211
// We leave demangling to false since it's faster and these tools seem to prefer the raw symbols.
32123212
// todo(jon): investigate if the chrome extension needs them demangled or demangles them automatically.
3213-
let will_wasm_opt = (self.release || self.wasm_split)
3214-
&& (self.workspace.wasm_opt.is_some() || cfg!(feature = "optimizations"));
3213+
let will_wasm_opt = self.release || self.wasm_split;
32153214
let keep_debug = self.config.web.wasm_opt.debug
32163215
|| self.debug_symbols
32173216
|| self.wasm_split
@@ -3259,7 +3258,7 @@ impl BuildRequest {
32593258

32603259
if !will_wasm_opt {
32613260
return Err(anyhow::anyhow!(
3262-
"Bundle splitting requires wasm-opt to be installed or the CLI to be built with `--features optimizations`. Please install wasm-opt and try again."
3261+
"Bundle splitting should automatically enable wasm-opt, but it was not enabled."
32633262
)
32643263
.into());
32653264
}

0 commit comments

Comments
 (0)