<p dir="auto">Your conversions between Rust Futures and JS Promises is probably mature, but thought I'd make you aware of this new crate owned by Rust team members Alex Crichton and Nick Fitzgerald, <a href="https://crates.io/crates/wasm-bindgen-futures" rel="nofollow">wasm-bindgen-futures</a>.  It might allow you to remove code so you don't duplicate work, or improve your existing.</p>
<p dir="auto">API Docs <a href="https://rustwasm.github.io/wasm-bindgen/api/wasm_bindgen_futures/" rel="nofollow">here</a>, GitHub Repo <a href="https://github.com/rustwasm/wasm-bindgen/tree/master/crates/futures">here</a>.</p>
<p dir="auto">Crate description:</p>
<blockquote>
<p dir="auto">This crate bridges the gap between a Rust Future and a JavaScript Promise. It provides two conversions:</p>
<ol dir="auto">
<li>From a JavaScript Promise into a Rust Future.</li>
<li>From a Rust Future into a JavaScript Promise.</li>
</ol>
</blockquote>
<p dir="auto">Running Cargo install deno results in the following error:</p>
<p dir="auto">Compiling deno_runtime v0.117.0<br>
error[E0432]: unresolved import <code class="notranslate">tokio_metrics::RuntimeMonitor</code><br>
--&gt; /home/justdave/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_runtime-0.117.0/tokio_util.rs:6:5<br>
|<br>
6 | use tokio_metrics::RuntimeMonitor;<br>
|     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no <code class="notranslate">RuntimeMonitor</code> in the root</p>
<p dir="auto">For more information about this error, try <code class="notranslate">rustc --explain E0432</code>.<br>
error: could not compile <code class="notranslate">deno_runtime</code> (lib) due to previous error<br>
warning: build failed, waiting for other jobs to finish...<br>
error: failed to compile <code class="notranslate">deno v1.34.3</code>, intermediate artifacts can be found at <code class="notranslate">/tmp/cargo-installj3lO39</code></p>