All notable changes to wasm-cxx-shim are documented here.
The shim follows semantic versioning, with the caveat that for the v0.x series symbol additions are minor bumps and breaking changes are also minor (we're explicitly volatile until v1.0).
The shim's wasm_cxx_shim_add_manifold() helper bundles a known-good
pin of manifold + Clipper2 with the carry-patches that make them link
on wasm32-unknown-unknown. Each tagged shim release verifies the
combination in CI:
| Shim version | manifold | Clipper2 | Patches shipped |
|---|---|---|---|
| v0.5.0 | v3.5.0 |
inherits manifold's pin | 0 |
| v0.4.0 | 3ce9622b (master, includes elalish/manifold#1690) |
inherits manifold's pin (manifold owns the FetchContent_Declare) | 0 |
| v0.4.0-alpha.1 | 5f95a3ac (master + vendored elalish/manifold#1690) |
inherits manifold's pin (manifold owns the FetchContent_Declare) | 1 (verbatim diff of #1690) |
| v0.3.0 | v3.4.1 |
46f639177fe418f9689e8ddb74f08a870c71f5b4 |
0001 + 0002 + 0003 |
| v0.2.0 | v3.4.1 |
46f639177fe418f9689e8ddb74f08a870c71f5b4 |
0001 + 0002 + 0003 (carried in test/manifold-link/patches/; helper not yet present) |
Consumers calling wasm_cxx_shim_add_manifold() (introduced in v0.3.0)
with no arguments get the row matching their installed shim version.
Pinning to other refs is supported via MANIFOLD_GIT_TAG /
EXTRA_MANIFOLD_PATCHES parameters; see
cmake/WasmCxxShimManifold.cmake.
When upstream PRs land for the carry-patches, the corresponding patch drops from a future shim release and the table notes the upstream version where the macro guard appears natively.
(no changes since v0.5.0)
Bumps the manifold pin to v3.5.0 (the upstream release, 20 commits
past v0.4.0's pin). Two symbol gaps surfaced and were closed; no
carry-patches were reintroduced.
libc/include/assert.h— minimal freestanding implementation (__builtin_trap()on failure,static_assert→_Static_assertfor C). Surfaced by manifold v3.5.0's newdisjoint_sets.hwhich includes<cassert>; libc++'s<cassert>falls through to<assert.h>via__has_include, and the shim previously didn't ship one. Generally useful — not manifold-specific.test/manifold-link/include/memory—#include_next <memory>+ stubs for thestd::atomic_load/store/exchange/is_lock_free(shared_ptr*)free function family. libc++ gates these behind#if _LIBCPP_HAS_THREADS(which__config_sitesets to 0). Manifold v3.5.0 attachesExecutionContexttoManifoldviastd::shared_ptr<ExecutionContext> ctx_and accesses it with these atomic-for-shared_ptr free functions; without the stubs, the compile fails with "no matching function for call to atomic_load". Same pattern as the existing<mutex>stub: single-threaded freestanding code is correct without atomicity.
- Default
MANIFOLD_GIT_TAGbumped from3ce9622btov3.5.0. - Inner manifold-tests count: 121 → 120. The dropped test is
Smooth.SineSurface, removed upstream in v3.5.0 (git diff 3ce9622b..v3.5.0 -- test/smooth_test.cpp). Not consumer-facing churn. manifold-tests.wasmsize: 1.07 MB → 1.16 MB (still under the 1.40 MB budget; growth is the new ExecutionContext infrastructure).manifold-link-probe.wasmsize: 339 KB → 391 KB (under the 450 KB budget; same cause).
- Callers using
wasm_cxx_shim_add_manifold()with defaults will be onv3.5.0automatically. Override withMANIFOLD_GIT_TAG <ref>if you need to stay on a v3.4.x pin. - The
<memory>stub attest/manifold-link/include/memoryis consumer-copyable (alongside the existing<mutex>stub) for out-of-tree integrations. The upstream-friendly fix is aMANIFOLD_NO_THREADSflag on manifold that gates the atomic_*(&ctx_) usage; until then, the stub.
Manifold's MANIFOLD_NO_IOSTREAM build option is now upstream
(merged in elalish/manifold#1690). The shim drops its
single carry-patch entirely and bumps the manifold pin to a master
commit past the merge. From here, the helper is just a thin wrapper
that sets MANIFOLD_NO_IOSTREAM=ON and lets manifold's own option
chain propagate the macros.
cmake/manifold-patches/0001-manifold-no-iostream.patchand the wholecmake/manifold-patches/directory. The vendored #1690 diff is no longer needed; manifold owns the option upstream.SKIP_BUILTIN_PATCHESargument fromwasm_cxx_shim_add_manifold(). There are no builtin patches to skip. Callers that were passing it can drop the argument; callers usingEXTRA_MANIFOLD_PATCHEScontinue to work unchanged.- The
install(DIRECTORY .../manifold-patches ...)rule (the directory no longer exists).
- Default
MANIFOLD_GIT_TAGbumped to3ce9622b(upstream master HEAD at release time, includes #1690 + one downstream commit). - Helper smoke test updated for the new file layout.
Pre-release. Pins manifold to a current upstream master commit and
folds the three shim-side iostream patches into a single vendored
diff of elalish/manifold#1690 (the upstream PR that adds
MANIFOLD_NO_IOSTREAM natively). Once #1690 lands and the shim's
manifold pin moves past it, the carry-patch drops entirely and a
v0.4.0 (non-alpha) release follows.
cmake/manifold-patches/0001-manifold-no-iostream.patch— verbatim diff of #1690 against the pinned upstream manifold commit. Replaces the three previously-shipped patches.- Six additional manifold test files now run on the shim:
boolean_complex_test,manifoldc_test,smooth_test(plus the existingboolean_test,cross_section_test,sdf_test). Total test count: 121 (up from 71).
wasm_cxx_shim_add_manifold(): refactored for the post-#1690 world. Drops the Clipper2 pre-declaration, setsMANIFOLD_NO_IOSTREAM=ONas a CMake cache var, and lets manifold's carry-patched option chain propagateMANIFOLD_NO_FILESYSTEMandCLIPPER2_NO_IOSTREAMas PUBLIC compile defs.- API: removed
CLIPPER2_GIT_TAGandEXTRA_CLIPPER2_PATCHESparameters (manifold owns the Clipper2 declaration; shim no longer has a say).MANIFOLD_GIT_TAG,EXTRA_MANIFOLD_PATCHES, andSKIP_BUILTIN_PATCHEScontinue to work. - Default
MANIFOLD_GIT_TAGbumped fromv3.4.1to a master commit (5f95a3ac) so the carry-patch applies cleanly. manifold_tests_size_budgetraised from 1.10 MB to 1.40 MB to accommodate the expanded test set.
- The three shim-side iostream patches
(
0001-clipper2-strip-iostream,0002-manifold-ifdef-iostream,0003-manifold-test-main-ifdef-filesystem). Replaced by the single vendored #1690 diff.
- This is an alpha pre-release pinned to a specific manifold commit. The carry-patch may be re-rolled if #1690 evolves in review (would land as alpha.2, alpha.3, etc.). The non-alpha v0.4.0 ships once #1690 merges.
- Consumers calling
wasm_cxx_shim_add_manifold()without overrides will be on the bumped pin automatically. Override withMANIFOLD_GIT_TAG <ref>if you need to stay on the v0.3.0 combination — pair withEXTRA_MANIFOLD_PATCHESto supply your own iostream patches in that case.
cmake/WasmCxxShimManifold.cmake—wasm_cxx_shim_add_manifold()helper that captures the high-change-rate parts of the manifold-on-shim integration cocktail (FetchContent pins, three carry-patches, manifold + Clipper2 CMake options, base compile flags) in one function call. Loaded automatically byfind_package(wasm-cxx-shim). Installed to${LIBDIR}/cmake/wasm-cxx-shim/alongside the integration patches.cmake/manifold-patches/— canonical home for the three integration patches. Previously undertest/manifold-link/patches/; moved so the helper resolves them via${CMAKE_CURRENT_LIST_DIR}/uniformly across source-tree and install-tree consumption.cmake/check-manifold-helper.cmake—cmake -Pscript that loads the helper and asserts the API surface (command registered, defaults populated, shipped patches resolve). Wired as thewasm_cxx_shim_helper_api_smokectest entry; runs on the lightweight matrix too.- Shipped
find_package(wasm-cxx-shim)config now auto-loads the helper via the package's optional include — no extrainclude()step required at the consumer side.
test/manifold-link/CMakeLists.txtrefactored to dogfood the helper. ~70 lines of inline FetchContent_Declare + patch commands- manifold options + base compile flags collapse to a single
wasm_cxx_shim_add_manifold()call. The dir continues to handle shim-side specifics (libcxx headers detection + the-isystemchain pointing at__config_site/<mutex>stub).
- manifold options + base compile flags collapse to a single
test/consumer/external/CMakeLists.txtnow asserts the helper command is registered afterfind_package, end-to-end-testing the auto-load against the install tree.
- Backwards compatible with v0.2.0 consumers. The helper is
additive. Existing consumers that wired up the integration
manually (manifold-csg's build.rs, the inline cocktail in older
test/manifold-link/CMakeLists.txtshapes) continue to work byte-equivalently. Migration to the helper is opt-in. - The helper supports overrides for arbitrary refs + custom patch
sets:
MANIFOLD_GIT_TAG,CLIPPER2_GIT_TAG,EXTRA_MANIFOLD_PATCHES,EXTRA_CLIPPER2_PATCHES,SKIP_BUILTIN_PATCHES. Seecmake/WasmCxxShimManifold.cmake's docstring.
- Phase 7-B1: manifold v3.4.1's library + C-API link against the shim
with zero unexpected wasm imports.
test/manifold-link/ships a probe ctest entry plus the carry-patches needed for the link. - Phase 7-B2: manifold's own GoogleTest-based tests
(
boolean_test.cpp+sdf_test.cpp+cross_section_test.cpp) run on the shim under Node — 71/71 passing. Generictools/wasm-test-harness/mechanism (registry + log buffer + GoogleTest adapter) lets unmodified consumer test sources compile against an adapter header. - libm correctness probes (
test/libm-check/), negative-link gate (test/negative-link/), wasm size budgets across all shipped wasms. - CI: new
manifoldjob mirroring the lightweight matrix; 8 required status checks total.
libcaddsstrlen(musl/wasi-libc); transitively pulled by manifold'sstd::stringuse.
- Three independently-buildable CMake components:
libc(dlmalloc + muslmem*),libm(musl/wasi-libc),libcxx(C++ ABI + runtime stubs). - Smoke test exercising vector + unordered_map + virtual dispatch + libm — produces a 13.5 KB wasm with zero imports.
- Consumer test validating
find_package(wasm-cxx-shim COMPONENTS …)against an installed prefix. - CI matrix: {Ubuntu, macOS} × {LLVM 20, 21}.