@stdlib/wasm-module-wrapper
v0.1.1
Published
WebAssembly module wrapper.
Readme
Module
WebAssembly module wrapper.
Installation
npm install @stdlib/wasm-module-wrapperUsage
var Module = require( '@stdlib/wasm-module-wrapper' );Module( binary, memory[, imports] )
Returns a new WebAssembly module wrapper instance.
// TO-DO: exampleThe function accepts the following arguments:
- binary: WebAssembly binary code.
- memory: WebAssembly memory instance.
- imports: WebAssembly module imports object.
Module.prototype.buffer
Read-only property which returns a WebAssembly memory buffer as a Uint8Array.
// TO-DO: exampleMethods
Module.prototype.isView( arr )
Returns a boolean indicating whether a provided list of values is a view of the underlying memory of the WebAssembly module.
// TO-DO: exampleExamples
var hasWebAssemblySupport = require( '@stdlib/assert-has-wasm-support' );
var Module = require( '@stdlib/wasm-module-wrapper' );
function main() {
if ( !hasWebAssemblySupport() ) {
console.error( 'Environment does not support WebAssembly.' );
return;
}
console.log( typeof Module ); // TO-DO: write example
}
main();Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2026. The Stdlib Authors.
