You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(sys): upgrade to WasmEdge 0.17.0 and add macOS arm64 static support
Bumps `WASMEDGE_RELEASE_VERSION` from 0.16.1 to 0.17.0 and refreshes
all `REMOTE_ARCHIVES` SHA256 hashes against the 0.17.0 release.
Adds a new `macos/aarch64/static` entry consuming
`WasmEdge-0.17.0-darwin_arm64_static.tar.gz` (workflow that produces
it is WasmEdge/WasmEdge#4948).
## WasmEdge 0.17.0 C API changes
Two breaking C ABI changes between 0.16.1 and 0.17.0 propagate through
this SDK:
- `WasmEdge_Limit` (value struct passed by value) was replaced with
the opaque `WasmEdge_LimitContext *` (heap-allocated, constructed
via `WasmEdge_LimitCreate` / `WasmEdge_LimitCreateWithMax`, queried
via `WasmEdge_LimitGet{Min,Max}` / `LimitHasMax` / `LimitIsShared`,
released via `WasmEdge_LimitDelete`). The `From<WasmEdge_Limit>`
impls in `types.rs` are replaced with `WasmEdgeLimit::to_context()`
/ `from_context()` helpers. Call sites in `MemoryType::create` and
`TableType::create` explicitly delete the limit context after the
borrowing C API consumes it.
- `Size`/`Offset`/`Page`/`Idx` arguments on several memory and table
APIs widened from `uint32_t` to `uint64_t` (in preparation for the
memory64 proposal). Call sites across `config.rs`,
`instance/memory.rs`, and `instance/table.rs` updated with `.into()`
casts. Return-type widenings on `WasmEdge_ConfigureGetMaxMemoryPage`
and `WasmEdge_MemoryInstanceGetPageSize` are downcast via `as u32`
since this SDK still exposes `u32` to downstream consumers.
Two `Config` default-state tests are updated to match new WasmEdge
0.17.0 defaults: `memory64` and `interpreter_mode` are now both
enabled by default.
## macOS arm64 static linking
`crates/wasmedge-sys/build.rs` static-link branch becomes
platform-conditional:
- macOS: links `c++`, `z`, `ncurses`, and `xar` from the system.
`libSystem` already provides `rt`/`dl`/`pthread`/`m`, and `stdc++`
is `c++` on Apple toolchain. zlib (`z`), ncurses, and libxar are
needed by LLVM (statically linked into `libwasmedge.a` via the
`WASMEDGE_LINK_LLVM_STATIC=ON` macOS workflow). All four are
available at `/usr/lib/` on every macOS install.
- Linux: retains the existing `rt, dl, pthread, m, stdc++` set.
The `libfmt.a` and `libzstd.a` exists-checks both gain a skip-on-macOS
branch instead of falling back to dynamic `-lfmt` / `-lzstd`. The macOS
static archive merges fmt+spdlog symbols into `libwasmedge.a` and
doesn't ship `.a` files separately. Brew installs the dylibs to
`/opt/homebrew/lib` which the system linker doesn't search by default,
so the dynamic fallback breaks clean macOS builds. Skipping is correct
since the symbols are already in `libwasmedge.a`.
Adds a `build_macos` job to `.github/workflows/rust-static-lib.yml`
exercising `cargo test --features bundled,aot,ffi` (and the async
variant) on `macos-14`.
## Local verification (macOS 26 Tahoe, Xcode 26.5)
- `cargo build --release -p wasmedge-sys --features bundled,aot,ffi`
successfully downloads the published `darwin_arm64_static.tar.gz`,
verifies SHA256, extracts, generates bindgen, and links.
- `cargo test --release --workspace --exclude async-wasi --features
bundled,aot,ffi -- --test-threads=1 --skip test_vmbuilder`:
78 passed, 0 failed, 12 ignored.
- Downstream cloud_ai_gateway tested against this SDK via `[patch]`
override; 804 unit tests green and the release binary contains no
`libwasmedge.dylib` reference per `otool -L`.
Signed-off-by: dm4 <dm4@secondstate.io>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments