Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/playerony/wasm-loader
Wrapper for @assemblyscript/loader package to support older versions of Safari (desktop [3.1 - 14.1] / mobile [11 - 14.7])
https://github.com/playerony/wasm-loader
Last synced: 4 days ago
JSON representation
Wrapper for @assemblyscript/loader package to support older versions of Safari (desktop [3.1 - 14.1] / mobile [11 - 14.7])
- Host: GitHub
- URL: https://github.com/playerony/wasm-loader
- Owner: playerony
- Created: 2021-08-26T14:24:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-28T15:37:18.000Z (over 3 years ago)
- Last Synced: 2024-11-19T13:52:18.838Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 109 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wasm-loader
Wrapper for [@assemblyscript/loader](https://www.npmjs.com/package/@assemblyscript/loader) package to support older versions of Safari (desktop [3.1 - 14.1] / mobile [11 - 14.7])
- [API Docs](https://playerony.github.io/wasm-loader)
- [can I use - instantiate](https://caniuse.com/?search=instantiate)
- [can I use - instantiateStreaming](https://caniuse.com/?search=instantiateStreaming)
# Installation ([npm](https://www.npmjs.com/package/@playerony/wasm-loader))
```
npm i @playerony/wasm-loader
``````
yarn add @playerony/wasm-loader
```# Usage
```js
import getWasmLoader from '@playerony/wasm-loader';const defaultImports = {
index: {
log(valueA, valueB) {
console.log(valueA, valueB);
},
},
};const wasmLoader = getWasmLoader(defaultImports);
const { memory, ...otherPropsYouDefinedInWasmFile } = await wasmLoader('/build/optimized.wasm');
```