mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-05-06 11:02:18 +00:00
647 B
647 B
Converting Between JavaScript Promise
s and Rust Future
s
The wasm-bindgen-futures
crate bridges the gap between JavaScript Promise
s
and Rust Future
s. Its JsFuture
type provides conversion from a JavaScript
Promise
into a Rust Future
, and its future_to_promise
function converts a
Rust Future
into a JavaScript Promise
and schedules it to be driven to
completion.
Learn more: