mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-21 08:41:35 +00:00
feat(js) Implement the WebAssembly.validate
binding.
This commit is contained in:
14
src/js.rs
14
src/js.rs
@ -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" {
|
||||
|
Reference in New Issue
Block a user