@polywrap/asyncify-js
Advanced tools
Comparing version 0.0.1-prealpha.90 to 0.0.1-prealpha.91
@@ -15,6 +15,6 @@ declare type WasmMemory = WebAssembly.Memory; | ||
static createMemory(config: { | ||
module: ArrayBuffer; | ||
module: Uint8Array; | ||
}): WasmMemory; | ||
static createInstance(config: { | ||
module: ArrayBuffer; | ||
module: Uint8Array; | ||
imports: WasmImports; | ||
@@ -21,0 +21,0 @@ requiredExports?: readonly string[]; |
@@ -74,3 +74,2 @@ "use strict"; | ||
AsyncWasmInstance.createMemory = function (config) { | ||
var bytecode = new Uint8Array(config.module); | ||
// extract the initial memory page size, as it will | ||
@@ -96,3 +95,3 @@ // throw an error if the imported page size differs: | ||
]); | ||
var sigIdx = utils_1.indexOfArray(bytecode, envMemoryImportSignature); | ||
var sigIdx = utils_1.indexOfArray(config.module, envMemoryImportSignature); | ||
if (sigIdx < 0) { | ||
@@ -105,3 +104,3 @@ throw Error("Unable to find Wasm memory import section. " + | ||
// Extract the initial memory page-range size | ||
var memoryInitalLimits = bytecode[sigIdx + envMemoryImportSignature.length + 1]; | ||
var memoryInitalLimits = config.module[sigIdx + envMemoryImportSignature.length + 1]; | ||
if (memoryInitalLimits === undefined) { | ||
@@ -108,0 +107,0 @@ throw Error("No initial memory number found, this should never happen..."); |
{ | ||
"name": "@polywrap/asyncify-js", | ||
"description": "Async Wasm Imports Support Using Asyncify", | ||
"version": "0.0.1-prealpha.90", | ||
"version": "0.0.1-prealpha.91", | ||
"license": "MIT", | ||
@@ -33,3 +33,3 @@ "repository": { | ||
}, | ||
"gitHead": "835cfa1d13cf7f0d3fb5796112d82acd466c7bbb", | ||
"gitHead": "7346adaf5adb7e6bbb70d9247583e995650d390a", | ||
"publishConfig": { | ||
@@ -36,0 +36,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
23379
11
359