From d55a27873ec3d7e10c4a60ca4102591c2c6f982f Mon Sep 17 00:00:00 2001 From: Oleksandr Kozachuk <201152+ok2@users.noreply.github.com> Date: Thu, 6 Aug 2026 20:16:41 +0200 Subject: [PATCH] fix(build): exempt build scripts and proc-macros from release strip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `wasm-pack build --release` died with "can't find crate" for rustversion, then thiserror_impl, then every other proc-macro. Cargo strips debuginfo from release artifacts by default and on macOS that takes the metadata proc-macro dylibs need to be loadable with it, so rustc could no longer open them. Debug builds are unstripped, which is why the whole test suite stayed green while the browser REPL could not be built for production at all. Stripping buys nothing for build scripts and proc-macros, so [profile.release.build-override] exempts them; release binaries stay stripped. Also pins wafer-core to 0.2.3 in wafer-web and wafer-cli — both still asked for 0.2.1. The caret requirement resolved, so nothing broke. --- CHANGELOG.md | 18 ++++++++++++++++++ Cargo.lock | 6 +++--- Cargo.toml | 10 +++++++++- crates/cli/Cargo.toml | 2 +- crates/web/Cargo.toml | 2 +- 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 173855b..f329e4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,24 @@ All notable changes to WAFER are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.3] - 2026-08-06 + +### Fixed + +- **Release builds of `wafer-web` no longer fail on proc-macro loading.** + Cargo strips debuginfo from release artifacts by default, and on macOS + that also strips the metadata proc-macro dylibs need to be loadable, so + `wasm-pack build --release` died with `can't find crate` for + `rustversion`, `thiserror_impl` and every other proc-macro. Build + scripts and proc-macros gain nothing from stripping, so + `[profile.release.build-override]` now exempts them; release binaries + stay stripped. Debug builds were never affected, which is why the test + suite stayed green while the browser REPL could not be built for + production. +- `wafer-web` and `wafer-cli` requested `wafer-core` version `0.2.1` + while the workspace had moved to `0.2.2`. The caret requirement still + resolved, so nothing broke, but the pin is now kept in step. + ## [0.2.2] - 2026-08-06 ### Added diff --git a/Cargo.lock b/Cargo.lock index 06fbdf7..085ca10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1589,7 +1589,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wafer" -version = "0.2.2" +version = "0.2.3" dependencies = [ "anyhow", "clap", @@ -1600,7 +1600,7 @@ dependencies = [ [[package]] name = "wafer-core" -version = "0.2.2" +version = "0.2.3" dependencies = [ "anyhow", "insta", @@ -1615,7 +1615,7 @@ dependencies = [ [[package]] name = "wafer-web" -version = "0.2.2" +version = "0.2.3" dependencies = [ "anyhow", "js-sys", diff --git a/Cargo.toml b/Cargo.toml index 8693619..e40ac09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "2" [workspace.package] -version = "0.2.2" +version = "0.2.3" edition = "2024" license = "MIT OR Apache-2.0" repository = "https://github.com/ok2/wafer" @@ -51,3 +51,11 @@ insta = "1" sha1 = "0.10" sha2 = "0.10" send_wrapper = "0.6" + +# Cargo strips debuginfo from release artifacts by default, and on macOS that +# also strips the metadata proc-macro dylibs need to be loadable — release +# builds then fail with "can't find crate" for every proc-macro (rustversion, +# thiserror_impl, ...). Build scripts and proc-macros gain nothing from +# stripping, so exempt them; the release binaries stay stripped. +[profile.release.build-override] +strip = false diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 421bcab..8ec3a57 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -9,7 +9,7 @@ license.workspace = true workspace = true [dependencies] -wafer-core = { path = "../core", version = "0.2.1" } +wafer-core = { path = "../core", version = "0.2.3" } wasmtime = { workspace = true } anyhow = { workspace = true } clap = { version = "4", features = ["derive"] } diff --git a/crates/web/Cargo.toml b/crates/web/Cargo.toml index ea7ca59..e12f155 100644 --- a/crates/web/Cargo.toml +++ b/crates/web/Cargo.toml @@ -12,7 +12,7 @@ workspace = true crate-type = ["cdylib", "rlib"] [dependencies] -wafer-core = { path = "../core", version = "0.2.1", default-features = false, features = ["crypto"] } +wafer-core = { path = "../core", version = "0.2.3", default-features = false, features = ["crypto"] } wasm-bindgen = "0.2" js-sys = "0.3" send_wrapper = { workspace = true }