mirror of
https://github.com/signalapp/libsignal.git
synced 2024-09-20 20:03:07 +02:00
2d059643e1
Neon provides a way to expose *synchronous* JavaScript functions from Rust. This means that if Rust wants to wait for the result of a JavaScript promise, it can at best return a callback to continue its work when the promise resolves. This does not naturally compose with Rust's `async`, which works in terms of Futures. This commit adds a new crate, signal-neon-futures, that provides functionality for (1) wrapping JavaScript futures so they can be awaited on in Rust, and (2) producing a JavaScript promise that wraps a Rust future. It does so by synchronously resuming execution of the Rust future whenever an awaited JavaScript promise is resolved.
26 lines
329 B
Plaintext
26 lines
329 B
Plaintext
/.idea
|
|
/target
|
|
/swift/.build
|
|
/node/dist
|
|
/node_modules
|
|
/build
|
|
|
|
/rust/bridge/node/futures/tests/node-tests/node_modules
|
|
|
|
*.orig
|
|
*.rej
|
|
|
|
*~
|
|
\#*\#
|
|
.\#*
|
|
|
|
java/build
|
|
java/android/build/
|
|
java/java/build
|
|
java/tests/build
|
|
java/.gradle
|
|
java/gradle.properties
|
|
java/local.properties
|
|
java/android/src/main/jniLibs
|
|
java/java/src/main/resources
|