feat(js) Implement the WebAssembly.validate binding.

This commit is contained in:
Ivan Enderlin
2018-07-04 15:27:01 +02:00
parent 2694dd4dee
commit fe25a9a268
3 changed files with 45 additions and 0 deletions

View File

@ -1138,6 +1138,20 @@ extern "C" {
pub fn delete(this: &WeakSet, value: Object) -> bool;
}
// WebAssembly
#[wasm_bindgen]
extern "C" {
pub type WebAssembly;
/// The `WebAssembly.validate()` function validates a given typed
/// array of WebAssembly binary code, returning whether the bytes
/// form a valid wasm module (`true`) or not (`false`).
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/validate
#[wasm_bindgen(static_method_of = WebAssembly)]
pub fn validate(bufferSource: JsValue) -> bool;
}
// JsString
#[wasm_bindgen]
extern "C" {