File tree 15 files changed +25
-19
lines changed
15 files changed +25
-19
lines changed Original file line number Diff line number Diff line change @@ -323,11 +323,17 @@ impl Bindgen {
323
323
. context ( "failed getting Wasm module" ) ?,
324
324
} ;
325
325
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
+ // }
331
337
332
338
// Enable multivalue transformations if the module is already using it.
333
339
if let Ok ( true ) = wasm_bindgen_wasm_conventions:: target_feature ( & module, "multivalue" ) {
Original file line number Diff line number Diff line change 6
6
(export " memory" (memory 0 ))
7
7
(export " add_u32" (func $add_u32 ))
8
8
(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" )
10
10
)
11
11
Original file line number Diff line number Diff line change 7
7
(export " memory" (memory 0 ))
8
8
(export " __wbg_classbuilder_free" (func $__wbg_classbuilder_free ))
9
9
(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" )
11
11
)
12
12
Original file line number Diff line number Diff line change 7
7
(export " memory" (memory 0 ))
8
8
(export " __wbg_classconstructor_free" (func $__wbg_classconstructor_free ))
9
9
(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" )
11
11
)
12
12
Original file line number Diff line number Diff line change 1
1
(module $reference_test.wasm
2
2
(memory (;0;) 16 )
3
3
(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" )
5
5
)
6
6
Original file line number Diff line number Diff line change 10
10
(export " option_enum_echo" (func $option_enum_echo ))
11
11
(export " get_name" (func $get_name ))
12
12
(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" )
14
14
)
15
15
Original file line number Diff line number Diff line change 9
9
(export " exported" (func $exported ))
10
10
(export " __wbindgen_exn_store" (func $__wbindgen_exn_store ))
11
11
(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" )
13
13
)
14
14
Original file line number Diff line number Diff line change 4
4
(memory (;0;) 17 )
5
5
(export " memory" (memory 0 ))
6
6
(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" )
8
8
)
9
9
Original file line number Diff line number Diff line change 6
6
(export " memory" (memory 0 ))
7
7
(export " const_pointer" (func $const_pointer ))
8
8
(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" )
10
10
)
11
11
Original file line number Diff line number Diff line change 11
11
(export " __wbg_test_free" (func $__wbg_test_free ))
12
12
(export " test_test1" (func $test_test1 ))
13
13
(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" )
15
15
)
16
16
Original file line number Diff line number Diff line change 10
10
(export " exported" (func $exported ))
11
11
(export " __wbindgen_add_to_stack_pointer" (func $__wbindgen_add_to_stack_pointer ))
12
12
(export " __wbindgen_free" (func $__wbindgen_free ))
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" )
14
14
)
15
15
Original file line number Diff line number Diff line change 20
20
(export " test_self_Self" (func $test_self_Self ))
21
21
(export " test_self_ref_Self" (func $test_self_ref_Self ))
22
22
(export " test_self_ref_mut_Self" (func $test_self_ref_mut_Self ))
23
- (@custom " target_features" (after code) " \02 + \ 0f mutable-globals+\08 sign-ext" )
23
+ (@custom " target_features" (after code) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
24
24
)
25
25
Original file line number Diff line number Diff line change 6
6
(export " memory" (memory 0 ))
7
7
(export " docme" (func $docme ))
8
8
(export " i_has_docs" (func $i_has_docs ))
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" )
10
10
)
11
11
Original file line number Diff line number Diff line change 10
10
(export " foo" (func $foo ))
11
11
(export " __wbindgen_malloc" (func $__wbindgen_malloc ))
12
12
(export " __wbindgen_realloc" (func $__wbindgen_realloc ))
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" )
14
14
)
15
15
Original file line number Diff line number Diff line change 15
15
(export " __wbindgen_exn_store" (func $__wbindgen_exn_store ))
16
16
(export " __wbindgen_malloc" (func $__wbindgen_malloc ))
17
17
(export " __wbindgen_realloc" (func $__wbindgen_realloc ))
18
- (@custom " target_features" (after code) " \02 + \ 0f mutable-globals+\08 sign-ext" )
18
+ (@custom " target_features" (after code) " \04 + \0a multivalue+ \ 0f mutable-globals+ \0f reference-types +\08 sign-ext" )
19
19
)
20
20
You can’t perform that action at this time.
0 commit comments