chore(deps): update mimalloc submodules to v2.5.0 and v3.5.0, fix wasi build - #92
Merged
Merged
Conversation
Pin both submodules to upstream release tags: - mimalloc fef6b0dd (v2.3.2-19) -> 989c8ebc (v2.5.0) - mimalloc3 d7d90c6f (v3.3.2-33) -> 18b08671 (v3.5.0) The v2 option enum is unchanged, so every `mi_option_*` constant in `libmimalloc-sys/src/extended.rs` still matches index for index. v3 renames `mi_option_visit_abandoned` to `mi_option_deprecated_visit_abandoned` at the same index. No other index moves. v3 marks `MI_TLS_MODEL_LOCAL` and `MI_TLS_RECURSE_GUARD` as deprecated aliases of `MI_TLS_MODEL=LOCAL`, but still honors them. The macOS TLS fix in `build.rs` stays active. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnyHZkCmxccwr16H9H3WtS
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_3d2911a7-004a-4579-9f96-a158d0abd500) |
`napi-build` 2.4.1 asks `wasm-ld` to export `emnapi_create_env` and
`emnapi_delete_env` with a hard `--export`. The `emnapi` 1.11.1 static
library does not define either symbol, so the
`wasm32-wasip1-threads` link fails:
wasm-ld: error: symbol exported via --export not found: emnapi_create_env
wasm-ld: error: symbol exported via --export not found: emnapi_delete_env
`emnapi` 2.0.0-alpha.4 defines both. The example now declares `emnapi`
directly, because the static library it ships is what the linker needs.
`@napi-rs/cli` must move to 3.8.6 as well. Version 3.7.2 hard-depends on
`emnapi@^1.11.1`, so a nested 1.11.1 copy stays in `node_modules` and the
CLI stops with `emnapi version mismatch`. In 3.8.6 `emnapi` is an optional
peer dependency, so exactly one copy remains.
Verified locally with wasi-sdk and the `wasm32-wasip1-threads` target.
Both profiles link, and the output wasm exports the two symbols.
The native `aarch64-apple-darwin` builds still pass, with and without `v3`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnyHZkCmxccwr16H9H3WtS
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_1635ad37-7010-432f-b308-e6ca30e99f76) |
Merged
Brooooooklyn
pushed a commit
that referenced
this pull request
Aug 24, 2026
## 🤖 New release * `libmimalloc-sys2`: 0.1.60 -> 0.1.61 (✓ API compatible changes) * `mimalloc-safe`: 0.1.64 -> 0.1.65 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> ## `libmimalloc-sys2` <blockquote> ## [0.1.61] - 2026-08-24 ### Chore - *(deps)* Update mimalloc submodules to v2.5.0 and v3.5.0, fix wasi build ([#92](#92)) </blockquote> ## `mimalloc-safe` <blockquote> ## [0.1.65] - 2026-08-24 ### Chore - *(deps)* Update actions/setup-node action to v7 ([#89](#89)) - *(deps)* Update yarn to v4.18.0 ([#87](#87)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes.
1. Submodules pinned to release tags
libmimalloc-sys/c_src/mimallocfef6b0dd(v2.3.2-19)989c8ebc(v2.5.0)libmimalloc-sys/c_src/mimalloc3d7d90c6f(v3.3.2-33)18b08671(v3.5.0)Runtime check of the linked library:
Upstream API review
v2 option enum is unchanged. Every
mi_option_*constant inlibmimalloc-sys/src/extended.rsstill matchesv2.5.0index for index.v3 renamed one option.
mi_option_visit_abandonedbecamemi_option_deprecated_visit_abandonedat the same index 28. No other index moved.v3 cmake options still work.
MI_TLS_MODEL_LOCALandMI_TLS_RECURSE_GUARDare now deprecated aliases ofMI_TLS_MODEL=LOCAL, butv3.5.0still honors them. The macOS TLS fix inbuild.rsstays active:MI_SECURE=ONalso still maps toMI_SECURE=4in v3.2. emnapi bumped to 2.0 alpha to fix the wasi build
Build example wasm32-wasip1-threadswas failing. The cause is not the submodule bump — it breaks onmaintoo.napi-build2.4.1 askswasm-ldto export two symbols with a hard--export:I checked both static libraries directly:
emnapi_create_env/emnapi_delete_envinlibemnapi-napi-rs-mt.aemnapi@1.11.1emnapi@2.0.0-alpha.4So
example/package.jsonnow declares:emnapibecomes a direct dependency because the static library it ships is what the linker consumes.@napi-rs/clihas to move to 3.8.6 as well. Version 3.7.2 hard-depends onemnapi@^1.11.1, so a nested 1.11.1 copy stays innode_modulesand the CLI stops withemnapi version mismatch: emnapi@1.11.1, @emnapi/core@2.0.0-alpha.4, @emnapi/runtime@2.0.0-alpha.4. In 3.8.6emnapiis an optional peer dependency, so exactly one copy remains.Verification
I reproduced the wasi failure locally with wasi-sdk, then confirmed the fix.
Rust side, every CI command passes on macOS arm64:
Known issues, not touched by this PR
cargo test -p libmimalloc-sys2 --features extendedfails onruntime_stable_option(libmimalloc-sys/src/extended.rs:1088). The same failure reproduces on the old pinfef6b0dd. The cause isMI_SHOW_ERRORS=ONin debug builds. CI never runs this command, so it stays hidden.v3feature, 11 constants point at the wrong v3 option. This offset existed before this bump and did not grow.index.wasi.cjs,browser.js,wasi-worker.mjsand three more files intoexample/. They are not inexample/.gitignore. I removed them by hand instead of widening the ignore list here.🤖 Generated with Claude Code
https://claude.ai/code/session_01SnyHZkCmxccwr16H9H3WtS
Note
Medium Risk
Example-only dependency bump, but it pins pre-release emnapi 2.0 alphas, so the example build may be less stable than the previous 1.x line.
Overview
Updates the mimalloc NAPI example to emnapi 2.0.0-alpha.4 (
@emnapi/core,@emnapi/runtime, and a new directemnapidep) and@napi-rs/cli3.8.6.The lockfile follows those bumps, including wasm-tools 1.1.0 and optional TypeScript 6 pulled in by the CLI.
Reviewed by Cursor Bugbot for commit d1c6764. Bugbot is set up for automated code reviews on this repo. Configure here.