When users invoke this run function from JS, it acts just like a JavaScript asynchronous function, which means that it returns a JS promise. This is possible because wasm-bindgen includes the ability to interconvert between JS and Rust promises. You can see this at play also within the run function, which invokes fetch and then converts the result into a Rust future: Note the JsFuture::from call i