Skip to content

Commit 1c23a33

Browse files
Fix wit-bindgen's bad codegen for resource-drop
1 parent b836b33 commit 1c23a33

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/ruby_wasm/build/toolchain/wit_bindgen.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class WitBindgen
44

55
def initialize(
66
build_dir:,
7-
revision: "v0.24.0"
7+
revision: "2e8fb8ede8242288d4cc682cd9dff3057ef09a57"
88
)
99
@build_dir = build_dir
1010
@tool_dir = File.join(@build_dir, "toolchain", "wit-bindgen-#{revision}")

packages/gems/js/ext/js/bindgen/ext.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void ruby_js_js_runtime_list_borrow_js_abi_value_free(ruby_js_js_runtime_list_bo
150150
}
151151
}
152152

153-
__attribute__((__import_module__("ruby:js/ruby-runtime"), __import_name__("[resource-drop]rb-iseq")))
153+
__attribute__((__import_module__("[export]ruby:js/ruby-runtime"), __import_name__("[resource-drop]rb-iseq")))
154154
extern void __wasm_import_exports_ruby_js_ruby_runtime_rb_iseq_drop(int32_t handle);
155155

156156
void exports_ruby_js_ruby_runtime_rb_iseq_drop_own(exports_ruby_js_ruby_runtime_own_rb_iseq_t handle) {
@@ -176,7 +176,7 @@ void __wasm_export_exports_ruby_js_ruby_runtime_rb_iseq_dtor(exports_ruby_js_rub
176176
exports_ruby_js_ruby_runtime_rb_iseq_destructor(arg);
177177
}
178178

179-
__attribute__((__import_module__("ruby:js/ruby-runtime"), __import_name__("[resource-drop]rb-abi-value")))
179+
__attribute__((__import_module__("[export]ruby:js/ruby-runtime"), __import_name__("[resource-drop]rb-abi-value")))
180180
extern void __wasm_import_exports_ruby_js_ruby_runtime_rb_abi_value_drop(int32_t handle);
181181

182182
void exports_ruby_js_ruby_runtime_rb_abi_value_drop_own(exports_ruby_js_ruby_runtime_own_rb_abi_value_t handle) {
Binary file not shown.

0 commit comments

Comments
 (0)