File tree Expand file tree Collapse file tree 15 files changed +25
-19
lines changed
Expand file tree Collapse file tree 15 files changed +25
-19
lines changed Original file line number Diff line number Diff line change @@ -323,11 +323,17 @@ impl Bindgen {
323323 . context ( "failed getting Wasm module" ) ?,
324324 } ;
325325
326- // Enable reference type transformations if the module is already using it.
327- if let Ok ( true ) = wasm_bindgen_wasm_conventions:: target_feature ( & module, "reference-types" )
328- {
329- self . externref = true ;
330- }
326+ // FIXME: Starting with Rust 1.82 `reference-types` is always present
327+ // in the `target_features` section. The problem is that JS bundlers
328+ // like Webpack can't currently handle the `reference-types` proposal.
329+ // So for now there should not be any automatic detection of the feature
330+ // and instead it should explicitly be enabled by the user.
331+
332+ // // Enable reference type transformations if the module is already using it.
333+ // if let Ok(true) = wasm_bindgen_wasm_conventions::target_feature(&module, "reference-types")
334+ // {
335+ // self.externref = true;
336+ // }
331337
332338 // Enable multivalue transformations if the module is already using it.
333339 if let Ok ( true ) = wasm_bindgen_wasm_conventions:: target_feature ( & module, "multivalue" ) {
Original file line number Diff line number Diff line change 66 (export " memory" (memory 0 ))
77 (export " add_u32" (func $add_u32 ))
88 (export " add_i32" (func $add_i32 ))
9- (@custom " target_features" (after code) " \02 + \ 0f mutable-globals+\08 sign-ext" )
9+ (@custom " target_features" (after code) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
1010)
1111
Original file line number Diff line number Diff line change 77 (export " memory" (memory 0 ))
88 (export " __wbg_classbuilder_free" (func $__wbg_classbuilder_free ))
99 (export " classbuilder_builder" (func $classbuilder_builder ))
10- (@custom " target_features" (after code) " \02 + \ 0f mutable-globals+\08 sign-ext" )
10+ (@custom " target_features" (after code) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
1111)
1212
Original file line number Diff line number Diff line change 77 (export " memory" (memory 0 ))
88 (export " __wbg_classconstructor_free" (func $__wbg_classconstructor_free ))
99 (export " classconstructor_new" (func $classconstructor_new ))
10- (@custom " target_features" (after code) " \02 + \ 0f mutable-globals+\08 sign-ext" )
10+ (@custom " target_features" (after code) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
1111)
1212
Original file line number Diff line number Diff line change 11(module $reference_test.wasm
22 (memory (;0;) 16 )
33 (export " memory" (memory 0 ))
4- (@custom " target_features" (after export ) " \02 + \ 0f mutable-globals+\08 sign-ext" )
4+ (@custom " target_features" (after export ) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
55)
66
Original file line number Diff line number Diff line change 1010 (export " option_enum_echo" (func $option_enum_echo ))
1111 (export " get_name" (func $get_name ))
1212 (export " option_string_enum_echo" (func $option_string_enum_echo ))
13- (@custom " target_features" (after code) " \02 + \ 0f mutable-globals+\08 sign-ext" )
13+ (@custom " target_features" (after code) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
1414)
1515
Original file line number Diff line number Diff line change 99 (export " exported" (func $exported ))
1010 (export " __wbindgen_exn_store" (func $__wbindgen_exn_store ))
1111 (export " __wbindgen_add_to_stack_pointer" (func $__wbindgen_add_to_stack_pointer ))
12- (@custom " target_features" (after code) " \02 + \ 0f mutable-globals+\08 sign-ext" )
12+ (@custom " target_features" (after code) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
1313)
1414
Original file line number Diff line number Diff line change 44 (memory (;0;) 17 )
55 (export " memory" (memory 0 ))
66 (export " nop" (func $nop ))
7- (@custom " target_features" (after code) " \02 + \ 0f mutable-globals+\08 sign-ext" )
7+ (@custom " target_features" (after code) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
88)
99
Original file line number Diff line number Diff line change 66 (export " memory" (memory 0 ))
77 (export " const_pointer" (func $const_pointer ))
88 (export " mut_pointer" (func $mut_pointer ))
9- (@custom " target_features" (after code) " \02 + \ 0f mutable-globals+\08 sign-ext" )
9+ (@custom " target_features" (after code) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
1010)
1111
Original file line number Diff line number Diff line change 1111 (export " __wbg_test_free" (func $__wbg_test_free ))
1212 (export " test_test1" (func $test_test1 ))
1313 (export " test_test2" (func $test_test2 ))
14- (@custom " target_features" (after code) " \02 + \ 0f mutable-globals+\08 sign-ext" )
14+ (@custom " target_features" (after code) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
1515)
1616
You can’t perform that action at this time.
0 commit comments