File tree 4 files changed +20
-10
lines changed
4 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 14
14
* Add bindings for ` WebAssembly.Tag ` and ` WebAssembly.Exception ` .
15
15
[ #3484 ] ( https://github.com/rustwasm/wasm-bindgen/pull/3484 )
16
16
17
- * Re-export ` wasm-bindgen ` from ` js-sys ` and ` web-sys ` .
17
+ * Re-export ` wasm-bindgen ` from ` js-sys ` , ` web-sys ` and ` wasm-bindgen-futures ` .
18
18
[ #3466 ] ( https://github.com/rustwasm/wasm-bindgen/pull/3466 )
19
+ [ #3601 ] ( https://github.com/rustwasm/wasm-bindgen/pull/3601 )
19
20
20
- * Re-export ` js-sys ` from ` web-sys ` .
21
+ * Re-export ` js-sys ` from ` web-sys ` and ` wasm-bindgen-futures ` .
21
22
[ #3466 ] ( https://github.com/rustwasm/wasm-bindgen/pull/3466 )
23
+ [ #3601 ] ( https://github.com/rustwasm/wasm-bindgen/pull/3601 )
22
24
23
25
* Add bindings for async variants of ` Atomics.wait ` .
24
26
[ #3504 ] ( https://github.com/rustwasm/wasm-bindgen/pull/3504 )
110
112
* Fixed optional parameters in JSDoc.
111
113
[ #3577 ] ( https://github.com/rustwasm/wasm-bindgen/pull/3577 )
112
114
115
+ * Use re-exported ` js-sys ` from ` wasm-bindgen-futures ` to account for
116
+ non-default path specified by the ` crate ` attribute in ` wasm_bindgen_futures `
117
+ proc-macro.
118
+ [ #3601 ] ( https://github.com/rustwasm/wasm-bindgen/pull/3601 )
119
+
113
120
### Removed
114
121
115
122
* Removed ` ReadableStreamByobReader::read_with_u8_array() ` because it doesn't work with Wasm.
Original file line number Diff line number Diff line change @@ -1190,11 +1190,11 @@ impl TryToTokens for ast::ImportFunction {
1190
1190
Some ( ref ty) => {
1191
1191
if self . function . r#async {
1192
1192
abi_ret = quote ! {
1193
- #wasm_bindgen:: convert:: WasmRet <<js_sys:: Promise as #wasm_bindgen:: convert:: FromWasmAbi >:: Abi >
1193
+ #wasm_bindgen:: convert:: WasmRet <<#wasm_bindgen_futures :: js_sys:: Promise as #wasm_bindgen:: convert:: FromWasmAbi >:: Abi >
1194
1194
} ;
1195
1195
let future = quote ! {
1196
1196
#wasm_bindgen_futures:: JsFuture :: from(
1197
- <js_sys:: Promise as #wasm_bindgen:: convert:: FromWasmAbi >
1197
+ <#wasm_bindgen_futures :: js_sys:: Promise as #wasm_bindgen:: convert:: FromWasmAbi >
1198
1198
:: from_abi( #ret_ident. join( ) )
1199
1199
) . await
1200
1200
} ;
@@ -1216,11 +1216,11 @@ impl TryToTokens for ast::ImportFunction {
1216
1216
None => {
1217
1217
if self . function . r#async {
1218
1218
abi_ret = quote ! {
1219
- #wasm_bindgen:: convert:: WasmRet <<js_sys:: Promise as #wasm_bindgen:: convert:: FromWasmAbi >:: Abi >
1219
+ #wasm_bindgen:: convert:: WasmRet <<#wasm_bindgen_futures :: js_sys:: Promise as #wasm_bindgen:: convert:: FromWasmAbi >:: Abi >
1220
1220
} ;
1221
1221
let future = quote ! {
1222
1222
#wasm_bindgen_futures:: JsFuture :: from(
1223
- <js_sys:: Promise as #wasm_bindgen:: convert:: FromWasmAbi >
1223
+ <#wasm_bindgen_futures :: js_sys:: Promise as #wasm_bindgen:: convert:: FromWasmAbi >
1224
1224
:: from_abi( #ret_ident. join( ) )
1225
1225
) . await
1226
1226
} ;
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ mod queue;
46
46
#[ cfg( feature = "futures-core-03-stream" ) ]
47
47
pub mod stream;
48
48
49
+ pub use js_sys;
50
+ pub use wasm_bindgen;
51
+
49
52
mod task {
50
53
use cfg_if:: cfg_if;
51
54
Original file line number Diff line number Diff line change @@ -32,10 +32,10 @@ error[E0277]: the trait bound `wasm_bindgen::JsValue: From<BadType>` is not sati
32
32
<wasm_bindgen::JsValue as From<&'a str>>
33
33
<wasm_bindgen::JsValue as From<*const T>>
34
34
<wasm_bindgen::JsValue as From<*mut T>>
35
- <wasm_bindgen::JsValue as From<JsError >>
36
- <wasm_bindgen::JsValue as From<MyType >>
37
- <wasm_bindgen::JsValue as From<Option<T> >>
38
- and 74 others
35
+ <wasm_bindgen::JsValue as From<Array >>
36
+ <wasm_bindgen::JsValue as From<ArrayBuffer >>
37
+ <wasm_bindgen::JsValue as From<BigInt64Array >>
38
+ and $N others
39
39
= note: required for `BadType` to implement `Into<wasm_bindgen::JsValue>`
40
40
= note: required for `BadType` to implement `IntoJsResult`
41
41
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
You can’t perform that action at this time.
0 commit comments