Skip to content

Commit

Permalink
Add WebAssembly.compileStreaming to js-sys (rustwasm#2944)
Browse files Browse the repository at this point in the history
  • Loading branch information
allsey87 committed Jun 17, 2022
1 parent 0e541c9 commit 8a18913
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/js-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3961,6 +3961,16 @@ pub mod WebAssembly {
#[wasm_bindgen(js_namespace = WebAssembly)]
pub fn compile(buffer_source: &JsValue) -> Promise;

/// The `WebAssembly.compileStreaming()` function compiles a
/// `WebAssembly.Module` module directly from a streamed underlying
/// source. This function is useful if it is necessary to a compile a
/// module before it can be instantiated (otherwise, the
/// `WebAssembly.instantiateStreaming()` function should be used).
///
/// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming)
#[wasm_bindgen(js_namespace = WebAssembly, js_name = compileStreaming)]
pub fn compile_streaming(response: &Promise) -> Promise;

/// The `WebAssembly.instantiate()` function allows you to compile and
/// instantiate WebAssembly code.
///
Expand Down

0 comments on commit 8a18913

Please sign in to comment.