Skip to content

Commit e44cffe

Browse files
committed
fix(phase1): Update wit-bindgen to 0.46.0 across all sources
Phase 1 complete - Synchronized wit-bindgen versions: Changes: 1. checksums/tools/wit-bindgen.json - Updated latest_version: 0.43.0 → 0.46.0 - Added all platform checksums for 0.46.0: * linux_arm64: 37879138d170... * linux_amd64: 8f426d9b0ed0... * darwin_arm64: dc96da8f3d12... * darwin_amd64: 98767eb96f2a... * windows_amd64: 95c6380ec7c1... - Kept 0.43.0 for backwards compatibility 2. rust/rust_wasm_component_bindgen.bzl - Added comprehensive compatibility documentation - Documented compatible CLI versions: 0.44.0 - 0.46.0 - Listed required API: Cleanup, CleanupGuard, run_ctors_once, etc. - Added warning about verifying compatibility when updating 3. tools/checksum_updater/Cargo.toml - Updated wit-bindgen: 0.47.0 → 0.46.0 - Added comment: MUST match CLI version in wasm_toolchain.bzl Result: All three version sources now synchronized to 0.46.0 - CLI binary (wasm_toolchain.bzl): 0.46.0 ✅ - Proc macro (Cargo.toml): 0.46.0 ✅ - Registry (wit-bindgen.json): 0.46.0 ✅ This prevents the version mismatch that caused the recent bug.
1 parent 938a2b3 commit e44cffe

File tree

3 files changed

+48
-7
lines changed

3 files changed

+48
-7
lines changed

checksums/tools/wit-bindgen.json

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
11
{
22
"tool_name": "wit-bindgen",
33
"github_repo": "bytecodealliance/wit-bindgen",
4-
"latest_version": "0.43.0",
5-
"last_checked": "2025-08-04T13:07:43.252225Z",
4+
"latest_version": "0.46.0",
5+
"last_checked": "2025-11-14T00:00:00.000000Z",
66
"versions": {
7+
"0.46.0": {
8+
"release_date": "2025-11-01",
9+
"platforms": {
10+
"linux_arm64": {
11+
"sha256": "37879138d1703f4063d167e882d3ecef24abd2df666d92a95bc5f8338644bfb4",
12+
"url_suffix": "aarch64-linux.tar.gz"
13+
},
14+
"linux_amd64": {
15+
"sha256": "8f426d9b0ed0150c71feea697effe4b90b1426a49e22e48bc1d4f4c6396bf771",
16+
"url_suffix": "x86_64-linux.tar.gz"
17+
},
18+
"darwin_arm64": {
19+
"sha256": "dc96da8f3d12bf5e2e3e3b00ce1474d2a8e77e36088752633380f0c85e18632c",
20+
"url_suffix": "aarch64-macos.tar.gz"
21+
},
22+
"darwin_amd64": {
23+
"sha256": "98767eb96f2a181998fa35a1df932adf743403c5f621ed6eedaa7d7c0533d543",
24+
"url_suffix": "x86_64-macos.tar.gz"
25+
},
26+
"windows_amd64": {
27+
"sha256": "95c6380ec7c1e385be8427a2da1206d90163fd66b6cbb573a516390988ccbad2",
28+
"url_suffix": "x86_64-windows.zip"
29+
}
30+
}
31+
},
732
"0.43.0": {
833
"release_date": "2025-06-24",
934
"platforms": {

rust/rust_wasm_component_bindgen.bzl

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,31 @@ def _generate_wrapper_impl(ctx):
5555
"""Generate a wrapper that includes both bindings and runtime shim"""
5656
out_file = ctx.actions.declare_file(ctx.label.name + ".rs")
5757

58-
# Create wrapper content - embedded runtime compatible with wit-bindgen CLI 0.47.0
58+
# Create wrapper content - embedded runtime compatible with wit-bindgen CLI
5959
# The wit-bindgen CLI generates code that expects: crate::wit_bindgen::rt
6060
# The CLI also generates the export! macro with --pub-export-macro flag
61+
#
62+
# COMPATIBILITY: This embedded runtime is compatible with wit-bindgen CLI versions:
63+
# - 0.44.0, 0.45.0, 0.46.0 (tested and verified)
64+
# - Requires API: Cleanup, CleanupGuard, run_ctors_once(), maybe_link_cabi_realloc()
65+
# - Uses: --runtime-path crate::wit_bindgen::rt, --pub-export-macro flags
66+
#
67+
# IMPORTANT: When updating wit-bindgen CLI version (in wasm_toolchain.bzl),
68+
# verify this embedded runtime still provides the required API.
69+
# Check generated bindings for any new runtime requirements.
6170
wrapper_content = """// Generated wrapper for WIT bindings
6271
//
63-
// This wrapper provides a wit_bindgen::rt module compatible with wit-bindgen CLI 0.47.0
64-
// The runtime provides allocation helpers and cleanup guards expected by generated code
72+
// COMPATIBILITY: wit-bindgen CLI 0.44.0 - 0.46.0
73+
// This wrapper provides a wit_bindgen::rt module compatible with the CLI-generated code.
74+
// The runtime provides allocation helpers and cleanup guards expected by generated bindings.
6575
//
66-
// The export! macro is generated by wit-bindgen CLI (via --pub-export-macro)
76+
// The export! macro is generated by wit-bindgen CLI (via --pub-export-macro flag).
77+
//
78+
// API provided:
79+
// - Cleanup::new(layout) -> (*mut u8, Option<CleanupGuard>)
80+
// - CleanupGuard (with Drop impl for deallocation)
81+
// - run_ctors_once() - no-op for WASM components
82+
// - maybe_link_cabi_realloc() - ensures cabi_realloc is linked
6783
6884
// Suppress clippy warnings for generated code
6985
#![allow(clippy::all)]

tools/checksum_updater/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tracing = "0.1"
3131
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
3232
tempfile = "3.23"
3333
async-trait = "0.1"
34-
wit-bindgen = "0.47.0" # WIT binding generation for macro usage
34+
wit-bindgen = "0.46.0" # WIT binding generation for macro usage (MUST match CLI version in wasm_toolchain.bzl)
3535
uuid = { version = "1.18", default-features = false } # UUID generation for user service (deterministic, no getrandom dependency)
3636

3737
[dev-dependencies]

0 commit comments

Comments
 (0)