Skip to content

Commit 12a8bfc

Browse files
committed
Bump wasm-cxx-shim to v0.4.0 + manifold pin to 3ce9622b
Shim's v0.4.0 dropped the iostream carry-patch (upstream manifold#1690 merged) and moved its tested pin to upstream master `3ce9622b`. We pin host to the same commit so the wasm-uu lane and host build see the same C API surface. No version bump — sys/safe versions stay at 3.4.107 / 0.1.8 (already pre-bumped, not yet released). Verified: - All 222 host integration tests pass against the new manifold pin - wasm-uu CI-equivalent build clean, produced wasm has zero unexpected imports - 13 playground node tests pass against the new build - cargo fmt + clippy clean
1 parent 62dff9e commit 12a8bfc

4 files changed

Lines changed: 18 additions & 18 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The sys crate clones manifold3d (pinned to a specific commit on master, post-v3.
4949

5050
Things to revisit whenever the manifold pin moves OR `wasm-cxx-shim` cuts a new release:
5151

52-
- **Re-evaluate wasm32-unknown-unknown cfg-gates.** Any FFI declaration / safe wrapper / test gated on `not(all(target_arch = "wasm32", target_os = "unknown"))` exists because that surface postdates the shim's tested manifold pin. When the shim's tested pin moves up to (or past) our host pin, those gates can be dropped and the surface unified across targets. Current gated surface: `manifold_*_obj` (OBJ I/O — gated for a different reason: iostream patches strip it; this stays regardless). Ray casting is **no longer gated** as of shim v0.4.0-alpha.1, whose tested pin matches our host pin. Grep for `target_os = "unknown"` to enumerate.
52+
- **Re-evaluate wasm32-unknown-unknown cfg-gates.** Any FFI declaration / safe wrapper / test gated on `not(all(target_arch = "wasm32", target_os = "unknown"))` exists because that surface postdates the shim's tested manifold pin. When the shim's tested pin moves up to (or past) our host pin, those gates can be dropped and the surface unified across targets. Current gated surface: `manifold_*_obj` (OBJ I/O — gated for a different reason: iostream patches strip it; this stays regardless). The shim's tested pin currently matches our host pin (no extra gating needed). Grep for `target_os = "unknown"` to enumerate.
5353
- **Re-evaluate carry-patches.** For each patch in `crates/manifold-csg-sys/patches/` (if any), check whether it's merged upstream and included in the new pin; if so, delete it.
5454

5555
## Carry-patches

crates/manifold-csg-sys/build.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn find_lib_recursive(dir: &Path, name: &str) -> Option<PathBuf> {
2525
}
2626

2727
/// Pinned upstream version — can be a tag (e.g., "v3.4.1"), branch, or commit SHA.
28-
const MANIFOLD_VERSION: &str = "5f95a3ac0e906f596bb2d27a52d005ef60de58f3";
28+
const MANIFOLD_VERSION: &str = "3ce9622b851f3d459566bf5ab55adacd93708b5d";
2929

3030
fn main() {
3131
// docs.rs builds with --network=none, so we can't clone manifold3d.
@@ -404,11 +404,11 @@ fn main() {
404404
// build.rs instead of a cmake file).
405405

406406
const WASM_CXX_SHIM_GIT: &str = "https://github.com/zmerlynn/wasm-cxx-shim.git";
407-
// v0.4.0-alpha.1 pins manifold to the same commit as our host build
408-
// (`5f95a3ac`), so the wasm-uu lane sees the same C API surface (including
409-
// ray_cast). Will move to non-alpha v0.4.0 once upstream manifold#1690
410-
// (the iostream gating PR the alpha vendors as a carry-patch) merges.
411-
const WASM_CXX_SHIM_TAG: &str = "v0.4.0-alpha.1+5f95a3ac";
407+
// v0.4.0 dropped the iostream carry-patch (upstream manifold#1690 merged)
408+
// and pins manifold to `3ce9622b`, the same commit our host build pins.
409+
// The wasm-uu lane sees the same C API surface as the host, no cfg-gating
410+
// of new APIs needed.
411+
const WASM_CXX_SHIM_TAG: &str = "v0.4.0";
412412

413413
fn build_wasm_unknown_unknown() {
414414
println!("cargo:rerun-if-changed=build.rs");

crates/manifold-csg-sys/wasm32-uu/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ add_compile_options(
6565
-nostdlibinc
6666
)
6767

68-
# FetchContent + patches + manifold/Clipper2 options + base compile flags.
69-
# Uses the helper's tested-pin default. As of shim v0.4.0-alpha.1 the
70-
# helper's default pin matches our host pin (`5f95a3ac`), so the wasm-uu
71-
# lane sees the same C API surface as the host build (including ray_cast).
72-
# When the host pin moves past the helper's tested pin again, either
73-
# override via `MANIFOLD_GIT_TAG` here or cfg-gate the new surface on
74-
# this target — see the "Pin / shim follow-ups" section in CLAUDE.md.
68+
# FetchContent + manifold/Clipper2 options + base compile flags.
69+
# Uses the helper's tested-pin default. As of shim v0.4.0 the helper's
70+
# default pin matches our host pin (`3ce9622b`), so the wasm-uu lane sees
71+
# the same C API surface as the host build. When the host pin moves past
72+
# the helper's tested pin again, either override via `MANIFOLD_GIT_TAG`
73+
# here or cfg-gate the new surface on this target — see the "Pin / shim
74+
# follow-ups" section in CLAUDE.md.
7575
wasm_cxx_shim_add_manifold()
7676

7777
# Force the manifold + Clipper2 archives to build by default. Without

docs/plans/wasm-unknown-unknown.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ ecosystem (Bevy, Leptos, Yew, etc.). Supporting `wasm32-unknown-unknown`
1414
directly unblocks those consumers.
1515

1616
The C++ runtime gap (`wasm32-unknown-unknown` ships no libc, no libcxx,
17-
no libcxxabi) is filled by `wasm-cxx-shim` (pinned to v0.4.0-alpha.1) — a small,
17+
no libcxxabi) is filled by `wasm-cxx-shim` (pinned to v0.4.0) — a small,
1818
independently-maintained library providing exactly the C/C++ runtime
1919
subset that manifold3d (and similar C++-via-Rust crates) need. See the
2020
shim's [`docs/context.md`](https://github.com/zmerlynn/wasm-cxx-shim/blob/main/docs/context.md) for the design background.
2121

22-
Since v0.4.0-alpha.1 the shim ships a `wasm_cxx_shim_add_manifold()` CMake helper
22+
Since v0.4.0 the shim ships a `wasm_cxx_shim_add_manifold()` CMake helper
2323
that owns the high-change-rate parts of the integration cocktail
2424
(FetchContent of manifold + Clipper2 with tested-pin defaults, the three
2525
carry-patches, and manifold/Clipper2 CMake options). We invoke it from a
@@ -59,7 +59,7 @@ A separate `build_wasm_unknown_unknown()` function dispatched early when
5959
Steps:
6060

6161
1. Sanity-check `cmake` and `clang` on PATH.
62-
2. Clone `wasm-cxx-shim` (pinned to `v0.4.0-alpha.1`) into `OUT_DIR` and build its
62+
2. Clone `wasm-cxx-shim` (pinned to `v0.4.0`) into `OUT_DIR` and build its
6363
three components (libc, libm, libcxx) via cmake using the shim's own
6464
wasm32 toolchain file.
6565
3. cmake-configure + build manifold + Clipper2 via our wrapper at
@@ -210,7 +210,7 @@ mention:
210210

211211
- New target supported: `wasm32-unknown-unknown` (bare-wasm browser
212212
target compatible with `wasm-bindgen`).
213-
- Build dependency: `wasm-cxx-shim` v0.4.0-alpha.1 (cloned via build.rs into
213+
- Build dependency: `wasm-cxx-shim` v0.4.0 (cloned via build.rs into
214214
`OUT_DIR`; no Cargo dependency). The integration uses the shim's
215215
`wasm_cxx_shim_add_manifold()` CMake helper, so manifold/Clipper2
216216
pins, patches, and CMake options live upstream now.

0 commit comments

Comments
 (0)