-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: Failed to resolve module specifier "env". Relative references must start with either "/", "./", or "../". #2215
Comments
Ok so from reading Alex's comment from a couple years ago I have a slightly better sense of what So it seems like the issue could be that, for whatever reason, on my CI machine wasm-bindgen isn't modifying this Nothing about my crate is |
Ok so according to this issue comment it might be coming from a dependency that has conditional compilation #1907 Is there an easy way to track this sort of thing down other than git bisecting my app until I find the commit that introduced the dep? |
Importing from |
Oh sweet this is my first time using wasm2wat - cool seeing what a I'm grabbed the lines at the top that started with https://gist.github.com/chinedufn/b691dca4ff4d767399cdbd8a9f425d96 |
It seems like this might be the relevant bit?
Also I'm compiling with |
Ah yep, indeed! I believe that's a bug fixed in nightly, can you try updating rustc and see if it helps? |
Just updated and tried on latest nightly
Worked! I could've sworn I tried the latest nightly. yesterday... I think I must've only installed it but didn't change it to be my default toolchain. Cool - I'm all set!! |
Hello, I'm extremely new to Rust and I'm having the same issue as described in this thread. Apparently it appears when my cargo.toml contains some cool JS bindings:
or
I'm trying to have a WASM script called from a Web Worker to draw on an OffscreenCanvas. The first cargo.toml config was meant to help me pass back the arguments for my JS In either case, adding these features seems to add the I have tried with versions rustc 1.45.2 (d3fb005a3 2020-07-31) and rustc 1.47.0-nightly (6c8927b0c 2020-07-26). Since I don't know what this |
Ok, to save others the headache, wasm-timer 0.2 also triggers this nightmare:
Following your explanation I tried Wasm2wat and it gives this: The function that triggers the horror is this one: |
Hello, I faced the same issue, with the same Tracking down to the caller with (func $instant::wasm::now::hb7af204bf0443e09 (type 3) (result f64)
(local f64)
call $now
local.set 0
local.get 0
return) which bring to the following issue on the Then, adding the following solved my issue: parking_lot = { version = "0.11.1", features = ["wasm-bindgen"]} Hope it can help ! |
29: Make parking_lot compile for wasm r=nikomatsakis a=brson Trying to get dada-web to run I hit an error in the wasm's imports. Per rustwasm/wasm-bindgen#2215 (comment) I turned on the wasm-bindgen feature of parking_lot and now dada-web works for me. Co-authored-by: Brian Anderson <[email protected]>
I had the same issue while using the SWC rust library. A community member helped me via their discord channel, hope it helps! Original message from discord (credit to mischnic!):
|
Describe the Bug
When I build and deploy my application from my dev machine (macos) everything works fine.
When I build and deploy from CI (self hosted GH action running ubuntu 18.04) I'm seeing the following error in my browser's console.
I see this as the first line line my generated wasm-bindgen JS file
And then closer to the bottom of the file:
Both my dev machine and CI run the exact same commands to generate and deploy the build.
Additional Context
wasm-bindgen = 0.2.63
Click to view full generated JS FILE
import * as __wbg_star0 from 'env';let wasm;
const heap = new Array(32).fill(undefined);
heap.push(undefined, null, true, false);
function getObject(idx) { return heap[idx]; }
let heap_next = heap.length;
function dropObject(idx) {
if (idx < 36) return;
heap[idx] = heap_next;
heap_next = idx;
}
function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}
function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
}
function isLikeNone(x) {
return x === undefined || x === null;
}
let cachegetFloat64Memory0 = null;
function getFloat64Memory0() {
if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
}
return cachegetFloat64Memory0;
}
let cachegetInt32Memory0 = null;
function getInt32Memory0() {
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
}
return cachegetInt32Memory0;
}
function debugString(val) {
// primitive types
const type = typeof val;
if (type == 'number' || type == 'boolean' || val == null) {
return
${val}
;}
if (type == 'string') {
return
"${val}"
;}
if (type == 'symbol') {
const description = val.description;
if (description == null) {
return 'Symbol';
} else {
return
Symbol(${description})
;}
}
if (type == 'function') {
const name = val.name;
if (typeof name == 'string' && name.length > 0) {
return
Function(${name})
;} else {
return 'Function';
}
}
// objects
if (Array.isArray(val)) {
const length = val.length;
let debug = '[';
if (length > 0) {
debug += debugString(val[0]);
}
for(let i = 1; i < length; i++) {
debug += ', ' + debugString(val[i]);
}
debug += ']';
return debug;
}
// Test for built-in
const builtInMatches = /[object ([^\]]+)]/.exec(toString.call(val));
let className;
if (builtInMatches.length > 1) {
className = builtInMatches[1];
} else {
// Failed to match the standard '[object ClassName]'
return toString.call(val);
}
if (className == 'Object') {
// we're a user defined class or Object
// JSON.stringify avoids problems with cycles, and is generally much
// easier than looping through ownProperties of
val
.try {
return 'Object(' + JSON.stringify(val) + ')';
} catch (_) {
return 'Object';
}
}
// errors
if (val instanceof Error) {
return
${val.name}: ${val.message}\n${val.stack}
;}
// TODO we could test for more things here, like
Set
s andMap
s.return className;
}
let WASM_VECTOR_LEN = 0;
let cachegetUint8Memory0 = null;
function getUint8Memory0() {
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
}
return cachegetUint8Memory0;
}
let cachedTextEncoder = new TextEncoder('utf-8');
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
? function (arg, view) {
return cachedTextEncoder.encodeInto(arg, view);
}
: function (arg, view) {
const buf = cachedTextEncoder.encode(arg);
view.set(buf);
return {
read: arg.length,
written: buf.length
};
});
function passStringToWasm0(arg, malloc, realloc) {
}
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
function getStringFromWasm0(ptr, len) {
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
function makeMutClosure(arg0, arg1, dtor, f) {
const state = { a: arg0, b: arg1, cnt: 1 };
const real = (...args) => {
// First up with a closure we increment the internal reference
// count. This ensures that the Rust closure environment won't
// be deallocated while we're invoking it.
state.cnt++;
const a = state.a;
state.a = 0;
try {
return f(a, state.b, ...args);
} finally {
if (--state.cnt === 0) wasm.__wbindgen_export_2.get(dtor)(a, state.b);
else state.a = a;
}
};
real.original = state;
return real;
}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1);
getUint8Memory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
function __wbg_adapter_26(arg0, arg1, arg2) {
var ptr0 = passArray8ToWasm0(arg2, wasm.__wbindgen_malloc);
var len0 = WASM_VECTOR_LEN;
wasm.wasm_bindgen__convert__closures__invoke1_mut__hd9999804164ec548(arg0, arg1, ptr0, len0);
}
function __wbg_adapter_29(arg0, arg1, arg2) {
wasm.wasm_bindgen__convert__closures__invoke1_mut__h01ff3aa2e73417f9(arg0, arg1, addHeapObject(arg2));
}
function __wbg_adapter_32(arg0, arg1, arg2) {
wasm.wasm_bindgen__convert__closures__invoke1_mut__h01ff3aa2e73417f9(arg0, arg1, addHeapObject(arg2));
}
function __wbg_adapter_35(arg0, arg1, arg2) {
wasm.wasm_bindgen__convert__closures__invoke1_mut__h01ff3aa2e73417f9(arg0, arg1, addHeapObject(arg2));
}
function __wbg_adapter_38(arg0, arg1) {
wasm.wasm_bindgen__convert__closures__invoke0_mut__ha0c1211a4fd86bd9(arg0, arg1);
}
function __wbg_adapter_41(arg0, arg1, arg2) {
wasm.wasm_bindgen__convert__closures__invoke1_mut__h01ff3aa2e73417f9(arg0, arg1, addHeapObject(arg2));
}
function handleError(f) {
return function () {
try {
return f.apply(this, arguments);
}
function getArrayU8FromWasm0(ptr, len) {
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
}
let cachegetFloat32Memory0 = null;
function getFloat32Memory0() {
if (cachegetFloat32Memory0 === null || cachegetFloat32Memory0.buffer !== wasm.memory.buffer) {
cachegetFloat32Memory0 = new Float32Array(wasm.memory.buffer);
}
return cachegetFloat32Memory0;
}
function getArrayF32FromWasm0(ptr, len) {
return getFloat32Memory0().subarray(ptr / 4, ptr / 4 + len);
}
/**
We expose our
WebClient
to the JS initialization function that happens in ourindex.html
.It essentially calls ::new() and .start()
*/
export class WebClient {
static __wrap(ptr) {
const obj = Object.create(WebClient.prototype);
obj.ptr = ptr;
}
free() {
const ptr = this.ptr;
this.ptr = 0;
}
/**
/
constructor() {
var ret = wasm.webclient_new();
return WebClient.__wrap(ret);
}
/*
*/
start() {
wasm.webclient_start(this.ptr);
}
}
async function load(module, imports) {
if (typeof Response === 'function' && module instanceof Response) {
}
async function init(input) {
if (typeof input === 'undefined') {
input = import.meta.url.replace(/.js$/, '_bg.wasm');
}
const imports = {};
imports.wbg = {};
imports.wbg.__wbindgen_cb_drop = function(arg0) {
const obj = takeObject(arg0).original;
if (obj.cnt-- == 1) {
obj.a = 0;
return true;
}
var ret = false;
return ret;
};
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
takeObject(arg0);
};
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
var ret = getObject(arg0);
return addHeapObject(ret);
};
imports.wbg.__wbg_instanceof_Window_d64060d13377409b = function(arg0) {
var ret = getObject(arg0) instanceof Window;
return ret;
};
imports.wbg.__wbg_requestAnimationFrame_96f88ce2d311332e = handleError(function(arg0, arg1) {
var ret = getObject(arg0).requestAnimationFrame(getObject(arg1));
return ret;
});
imports.wbg.__wbg_document_bcf9d67bc56e8c6d = function(arg0) {
var ret = getObject(arg0).document;
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_body_6209a4fe12ca8a07 = function(arg0) {
var ret = getObject(arg0).body;
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_getElementById_0e0dd6444cdc0602 = function(arg0, arg1, arg2) {
var ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_instanceof_HtmlCanvasElement_308a7fa689ff20ef = function(arg0) {
var ret = getObject(arg0) instanceof HTMLCanvasElement;
return ret;
};
imports.wbg.__wbg_createElement_467bb064d2ae5833 = handleError(function(arg0, arg1, arg2) {
var ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2));
return addHeapObject(ret);
});
imports.wbg.__wbg_setid_7699062cf7a220be = function(arg0, arg1, arg2) {
getObject(arg0).id = getStringFromWasm0(arg1, arg2);
};
imports.wbg.__wbg_appendChild_11200a24a11d9886 = handleError(function(arg0, arg1) {
var ret = getObject(arg0).appendChild(getObject(arg1));
return addHeapObject(ret);
});
imports.wbg.__wbg_performance_d78dfb23cb3aa2b5 = function(arg0) {
var ret = getObject(arg0).performance;
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_now_1a2bf048df058d4a = function(arg0) {
var ret = getObject(arg0).now();
return ret;
};
imports.wbg.__wbg_getContext_554fc171434d411b = handleError(function(arg0, arg1, arg2) {
var ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));
return isLikeNone(ret) ? 0 : addHeapObject(ret);
});
imports.wbg.__wbg_instanceof_WebGlRenderingContext_dca65729c7187d57 = function(arg0) {
var ret = getObject(arg0) instanceof WebGLRenderingContext;
return ret;
};
imports.wbg.__wbg_getParameter_732430a798f2b462 = handleError(function(arg0, arg1) {
var ret = getObject(arg0).getParameter(arg1 >>> 0);
return addHeapObject(ret);
});
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
const obj = getObject(arg1);
var ret = typeof(obj) === 'number' ? obj : undefined;
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
};
imports.wbg.__wbg_location_c5898e25a8ee2172 = function(arg0) {
var ret = getObject(arg0).location;
return addHeapObject(ret);
};
imports.wbg.__wbg_search_475a1fc8c7af6e1c = handleError(function(arg0, arg1) {
var ret = getObject(arg1).search;
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
});
imports.wbg.__wbg_newwithstr_bb3474d1e9122853 = handleError(function(arg0, arg1) {
var ret = new URLSearchParams(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
});
imports.wbg.__wbg_get_284a4fb9dde419d6 = function(arg0, arg1, arg2, arg3) {
var ret = getObject(arg1).get(getStringFromWasm0(arg2, arg3));
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
imports.wbg.__wbg_history_82b6dc62ebba92cf = handleError(function(arg0) {
var ret = getObject(arg0).history;
return addHeapObject(ret);
});
imports.wbg.__wbg_new_f46e6afe0b8a862e = function() {
var ret = new Object();
return addHeapObject(ret);
};
imports.wbg.__wbg_title_23dea888c29354ce = function(arg0, arg1) {
var ret = getObject(arg1).title;
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
imports.wbg.__wbg_replaceState_5d439950cefc03be = handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
getObject(arg0).replaceState(getObject(arg1), getStringFromWasm0(arg2, arg3), arg4 === 0 ? undefined : getStringFromWasm0(arg4, arg5));
});
imports.wbg.__wbg_getExtension_899678856c287080 = handleError(function(arg0, arg1, arg2) {
var ret = getObject(arg0).getExtension(getStringFromWasm0(arg1, arg2));
return isLikeNone(ret) ? 0 : addHeapObject(ret);
});
imports.wbg.__wbg_createBuffer_501da6aef1c4b91c = function(arg0) {
var ret = getObject(arg0).createBuffer();
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_addEventListener_fe52a115589ccc2c = handleError(function(arg0, arg1, arg2, arg3) {
getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
});
imports.wbg.__wbindgen_cb_forget = function(arg0) {
takeObject(arg0);
};
imports.wbg.__wbg_new_59cb74e423758ede = function() {
var ret = new Error();
return addHeapObject(ret);
};
imports.wbg.__wbg_stack_558ba5917b466edd = function(arg0, arg1) {
var ret = getObject(arg1).stack;
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
imports.wbg.__wbg_error_4bb6c2a97407129a = function(arg0, arg1) {
try {
console.error(getStringFromWasm0(arg0, arg1));
} finally {
wasm.__wbindgen_free(arg0, arg1);
}
};
imports.wbg.__wbg_self_944d201f31e01c91 = handleError(function() {
var ret = self.self;
return addHeapObject(ret);
});
imports.wbg.__wbg_window_993fd51731b86960 = handleError(function() {
var ret = window.window;
return addHeapObject(ret);
});
imports.wbg.__wbg_globalThis_8379563d70fab135 = handleError(function() {
var ret = globalThis.globalThis;
return addHeapObject(ret);
});
imports.wbg.__wbg_global_073eb4249a3a8c12 = handleError(function() {
var ret = global.global;
return addHeapObject(ret);
});
imports.wbg.__wbindgen_is_undefined = function(arg0) {
var ret = getObject(arg0) === undefined;
return ret;
};
imports.wbg.__wbg_newnoargs_bfddd41728ab0b9c = function(arg0, arg1) {
var ret = new Function(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_call_20c04382b27a4486 = handleError(function(arg0, arg1) {
var ret = getObject(arg0).call(getObject(arg1));
return addHeapObject(ret);
});
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
var ret = debugString(getObject(arg1));
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
imports.wbg.__wbg_self_1b7a39e3a92c949c = handleError(function() {
var ret = self.self;
return addHeapObject(ret);
});
imports.wbg.__wbg_require_604837428532a733 = function(arg0, arg1) {
var ret = require(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_crypto_968f1772287e2df0 = function(arg0) {
var ret = getObject(arg0).crypto;
return addHeapObject(ret);
};
imports.wbg.__wbg_getRandomValues_a3d34b4fee3c2869 = function(arg0) {
var ret = getObject(arg0).getRandomValues;
return addHeapObject(ret);
};
imports.wbg.__wbg_getRandomValues_f5e14ab7ac8e995d = function(arg0, arg1, arg2) {
getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
};
imports.wbg.__wbg_randomFillSync_d5bd2d655fdf256a = function(arg0, arg1, arg2) {
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
};
imports.wbg.__wbg_createTexture_77f1141b79fa578d = function(arg0) {
var ret = getObject(arg0).createTexture();
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_activeTexture_a4d9c550dcacf795 = function(arg0, arg1) {
getObject(arg0).activeTexture(arg1 >>> 0);
};
imports.wbg.__wbg_bindTexture_998c063ed7315afd = function(arg0, arg1, arg2) {
getObject(arg0).bindTexture(arg1 >>> 0, getObject(arg2));
};
imports.wbg.__wbg_texParameteri_d819847181bb4c5a = function(arg0, arg1, arg2, arg3) {
getObject(arg0).texParameteri(arg1 >>> 0, arg2 >>> 0, arg3);
};
imports.wbg.__wbg_pixelStorei_bec30af179b630a6 = function(arg0, arg1, arg2) {
getObject(arg0).pixelStorei(arg1 >>> 0, arg2);
};
imports.wbg.__wbg_texImage2D_3441b124d44b5416 = handleError(function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) {
getObject(arg0).texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9 === 0 ? undefined : getArrayU8FromWasm0(arg9, arg10));
});
imports.wbg.__wbg_generateMipmap_be29f942c5711bbe = function(arg0, arg1) {
getObject(arg0).generateMipmap(arg1 >>> 0);
};
imports.wbg.__wbg_bindBuffer_c96c99b259d952f4 = function(arg0, arg1, arg2) {
getObject(arg0).bindBuffer(arg1 >>> 0, getObject(arg2));
};
imports.wbg.__wbg_getAttribLocation_659ded06867c4ae1 = function(arg0, arg1, arg2, arg3) {
var ret = getObject(arg0).getAttribLocation(getObject(arg1), getStringFromWasm0(arg2, arg3));
return ret;
};
imports.wbg.__wbg_vertexAttribPointer_5660aa1f2b819de1 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
getObject(arg0).vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6);
};
imports.wbg.__wbg_enableVertexAttribArray_0f8b0b1592940e3f = function(arg0, arg1) {
getObject(arg0).enableVertexAttribArray(arg1 >>> 0);
};
imports.wbg.__wbg_vertexAttribDivisorANGLE_5685bbed4d0917f7 = function(arg0, arg1, arg2) {
getObject(arg0).vertexAttribDivisorANGLE(arg1 >>> 0, arg2 >>> 0);
};
imports.wbg.__wbg_bindVertexArrayOES_b909c084b9b2adff = function(arg0, arg1) {
getObject(arg0).bindVertexArrayOES(getObject(arg1));
};
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
var ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
};
imports.wbg.__wbg_get_fa38f22e54fe1ab1 = handleError(function(arg0, arg1) {
var ret = Reflect.get(getObject(arg0), getObject(arg1));
return addHeapObject(ret);
});
imports.wbg.__wbg_new_a938277eeb06668d = function() {
var ret = new Array();
return addHeapObject(ret);
};
imports.wbg.__wbg_apply_d867294d9cfb22c5 = handleError(function(arg0, arg1, arg2) {
var ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
return addHeapObject(ret);
});
imports.wbg.__wbg_texSubImage2D_cfa75026c4393fb0 = handleError(function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) {
getObject(arg0).texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9 === 0 ? undefined : getArrayU8FromWasm0(arg9, arg10));
});
imports.wbg.__wbg_createFramebuffer_01c472dd3eee0c68 = function(arg0) {
var ret = getObject(arg0).createFramebuffer();
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_bindFramebuffer_d583fcb30e94f137 = function(arg0, arg1, arg2) {
getObject(arg0).bindFramebuffer(arg1 >>> 0, getObject(arg2));
};
imports.wbg.__wbg_framebufferTexture2D_848ce644c8fa502d = function(arg0, arg1, arg2, arg3, arg4, arg5) {
getObject(arg0).framebufferTexture2D(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, getObject(arg4), arg5);
};
imports.wbg.__wbg_createRenderbuffer_34bc571791e437e1 = function(arg0) {
var ret = getObject(arg0).createRenderbuffer();
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_bindRenderbuffer_23b966789a70623f = function(arg0, arg1, arg2) {
getObject(arg0).bindRenderbuffer(arg1 >>> 0, getObject(arg2));
};
imports.wbg.__wbg_renderbufferStorage_f0f9bf3c958e1ad0 = function(arg0, arg1, arg2, arg3, arg4) {
getObject(arg0).renderbufferStorage(arg1 >>> 0, arg2 >>> 0, arg3, arg4);
};
imports.wbg.__wbg_framebufferRenderbuffer_cad4c8d9c455567b = function(arg0, arg1, arg2, arg3, arg4) {
getObject(arg0).framebufferRenderbuffer(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, getObject(arg4));
};
imports.wbg.__wbg_enable_9449adf5ab2510e3 = function(arg0, arg1) {
getObject(arg0).enable(arg1 >>> 0);
};
imports.wbg.__wbg_viewport_18c9d4ac8f2880ac = function(arg0, arg1, arg2, arg3, arg4) {
getObject(arg0).viewport(arg1, arg2, arg3, arg4);
};
imports.wbg.__wbg_clearColor_b9e0f7e215dc534e = function(arg0, arg1, arg2, arg3, arg4) {
getObject(arg0).clearColor(arg1, arg2, arg3, arg4);
};
imports.wbg.__wbg_clear_ec5c1c21ed3b2fe2 = function(arg0, arg1) {
getObject(arg0).clear(arg1 >>> 0);
};
imports.wbg.__wbg_useProgram_c4a6df84383cd1a6 = function(arg0, arg1) {
getObject(arg0).useProgram(getObject(arg1));
};
imports.wbg.__wbg_drawElements_ede2468147fdc77f = function(arg0, arg1, arg2, arg3, arg4) {
getObject(arg0).drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4);
};
imports.wbg.__wbg_blendFuncSeparate_d734831848c198a9 = function(arg0, arg1, arg2, arg3, arg4) {
getObject(arg0).blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
};
imports.wbg.__wbindgen_memory = function() {
var ret = wasm.memory;
return addHeapObject(ret);
};
imports.wbg.__wbg_instanceof_Memory_56d1581563190159 = function(arg0) {
var ret = getObject(arg0) instanceof WebAssembly.Memory;
return ret;
};
imports.wbg.__wbg_buffer_985803c87989344b = function(arg0) {
var ret = getObject(arg0).buffer;
return addHeapObject(ret);
};
imports.wbg.__wbg_new_75cd19a33bebb54e = function(arg0) {
var ret = new Float32Array(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_subarray_8ef12d7b4db8f774 = function(arg0, arg1, arg2) {
var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_bufferData_e135b678b6ef2433 = function(arg0, arg1, arg2, arg3) {
getObject(arg0).bufferData(arg1 >>> 0, getObject(arg2), arg3 >>> 0);
};
imports.wbg.__wbg_drawArraysInstancedANGLE_c0ca554ec8609848 = function(arg0, arg1, arg2, arg3, arg4) {
getObject(arg0).drawArraysInstancedANGLE(arg1 >>> 0, arg2, arg3, arg4);
};
imports.wbg.__wbg_disable_53e208e5c1646215 = function(arg0, arg1) {
getObject(arg0).disable(arg1 >>> 0);
};
imports.wbg.__wbg_readPixels_08a875a194dd79da = handleError(function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
getObject(arg0).readPixels(arg1, arg2, arg3, arg4, arg5 >>> 0, arg6 >>> 0, arg7 === 0 ? undefined : getArrayU8FromWasm0(arg7, arg8));
});
imports.wbg.__wbg_createVertexArrayOES_c7b781c1ecee6607 = function(arg0) {
var ret = getObject(arg0).createVertexArrayOES();
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_newwithbyteoffsetandlength_3c83a6445776097f = function(arg0, arg1, arg2) {
var ret = new Float32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_newwithbyteoffsetandlength_36d42f1c91e7259d = function(arg0, arg1, arg2) {
var ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_newwithbyteoffsetandlength_c8bb08455573d4e5 = function(arg0, arg1, arg2) {
var ret = new Uint16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_createProgram_531dab3c15c28e4f = function(arg0) {
var ret = getObject(arg0).createProgram();
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_attachShader_9958cc9636fc8494 = function(arg0, arg1, arg2) {
getObject(arg0).attachShader(getObject(arg1), getObject(arg2));
};
imports.wbg.__wbg_linkProgram_9e60adcb42d34c3c = function(arg0, arg1) {
getObject(arg0).linkProgram(getObject(arg1));
};
imports.wbg.__wbg_getProgramParameter_c021157c5817259f = function(arg0, arg1, arg2) {
var ret = getObject(arg0).getProgramParameter(getObject(arg1), arg2 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_boolean_get = function(arg0) {
const v = getObject(arg0);
var ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
return ret;
};
imports.wbg.__wbg_getProgramInfoLog_5def5bb3d8d30e1f = function(arg0, arg1, arg2) {
var ret = getObject(arg1).getProgramInfoLog(getObject(arg2));
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
imports.wbg.__wbg_createShader_376b269548a48c7a = function(arg0, arg1) {
var ret = getObject(arg0).createShader(arg1 >>> 0);
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_shaderSource_c208cc7a688e8923 = function(arg0, arg1, arg2, arg3) {
getObject(arg0).shaderSource(getObject(arg1), getStringFromWasm0(arg2, arg3));
};
imports.wbg.__wbg_compileShader_82966bc7f1d070fe = function(arg0, arg1) {
getObject(arg0).compileShader(getObject(arg1));
};
imports.wbg.__wbg_getShaderParameter_d03718a8c98a4d23 = function(arg0, arg1, arg2) {
var ret = getObject(arg0).getShaderParameter(getObject(arg1), arg2 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_getShaderInfoLog_b619769ff40aac70 = function(arg0, arg1, arg2) {
var ret = getObject(arg1).getShaderInfoLog(getObject(arg2));
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
imports.wbg.__wbg_uniform4fv_4cad84f8c8f25fef = function(arg0, arg1, arg2, arg3) {
getObject(arg0).uniform4fv(getObject(arg1), getArrayF32FromWasm0(arg2, arg3));
};
imports.wbg.__wbg_getUniformLocation_d3462c180fd1b8c4 = function(arg0, arg1, arg2, arg3) {
var ret = getObject(arg0).getUniformLocation(getObject(arg1), getStringFromWasm0(arg2, arg3));
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_uniform1i_491fc975f3e97a42 = function(arg0, arg1, arg2) {
getObject(arg0).uniform1i(getObject(arg1), arg2);
};
imports.wbg.__wbg_uniformMatrix4fv_fdf943cdc3c4a3d4 = function(arg0, arg1, arg2, arg3, arg4) {
getObject(arg0).uniformMatrix4fv(getObject(arg1), arg2 !== 0, getArrayF32FromWasm0(arg3, arg4));
};
imports.wbg.__wbg_uniform3fv_ea8847c03339cab4 = function(arg0, arg1, arg2, arg3) {
getObject(arg0).uniform3fv(getObject(arg1), getArrayF32FromWasm0(arg2, arg3));
};
imports.wbg.__wbg_uniform1f_c730f5bf75b95845 = function(arg0, arg1, arg2) {
getObject(arg0).uniform1f(getObject(arg1), arg2);
};
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbg_downloadBytes_0a24cd39b4d3d8e6 = function(arg0, arg1, arg2) {
downloadBytes(getStringFromWasm0(arg0, arg1), getObject(arg2));
};
imports.wbg.__wbg_keyCode_e19b105e5d2d09d5 = function(arg0) {
var ret = getObject(arg0).keyCode;
return ret;
};
imports.wbg.__wbg_fromCharCode_6265c2392e0a786f = function(arg0) {
var ret = String.fromCharCode(arg0 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
const obj = getObject(arg1);
var ret = typeof(obj) === 'string' ? obj : undefined;
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
imports.wbg.__wbg_new_6b86a64d95e1bdda = handleError(function(arg0, arg1) {
var ret = new WebSocket(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
});
imports.wbg.__wbg_setbinaryType_fe6256a114c22d1e = function(arg0, arg1) {
getObject(arg0).binaryType = takeObject(arg1);
};
imports.wbg.__wbg_setonopen_c42258145e762057 = function(arg0, arg1) {
getObject(arg0).onopen = getObject(arg1);
};
imports.wbg.__wbg_setonmessage_9806a486d5f51913 = function(arg0, arg1) {
getObject(arg0).onmessage = getObject(arg1);
};
imports.wbg.__wbg_new_b7e3d6adc8b9377a = function(arg0) {
var ret = new Uint8Array(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_length_32e166b42b85060a = function(arg0) {
var ret = getObject(arg0).length;
return ret;
};
imports.wbg.__wbg_set_66e888cef8f00a73 = function(arg0, arg1, arg2) {
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
};
imports.wbg.__wbg_send_2838823723b1a700 = handleError(function(arg0, arg1, arg2) {
getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
});
imports.wbg.__wbg_offsetX_42ecbe09df498202 = function(arg0) {
var ret = getObject(arg0).offsetX;
return ret;
};
imports.wbg.__wbg_offsetY_70b516768b17990b = function(arg0) {
var ret = getObject(arg0).offsetY;
return ret;
};
imports.wbg.__wbg_preventDefault_2afcdd3f7ec9efa3 = function(arg0) {
getObject(arg0).preventDefault();
};
imports.wbg.__wbg_changedTouches_5046aca41b2d11ba = function(arg0) {
var ret = getObject(arg0).changedTouches;
return addHeapObject(ret);
};
imports.wbg.__wbg_length_4c6909494a0e02f9 = function(arg0) {
var ret = getObject(arg0).length;
return ret;
};
imports.wbg.__wbg_get_285b1c8d05fedf27 = function(arg0, arg1) {
var ret = getObject(arg0)[arg1 >>> 0];
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbg_identifier_a476e15c3a85752c = function(arg0) {
var ret = getObject(arg0).identifier;
return ret;
};
imports.wbg.__wbg_clientX_bc61648c02723dc7 = function(arg0) {
var ret = getObject(arg0).clientX;
return ret;
};
imports.wbg.__wbg_clientY_67b12bba9c15ace2 = function(arg0) {
var ret = getObject(arg0).clientY;
return ret;
};
imports.wbg.__wbindgen_closure_wrapper185 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 64, __wbg_adapter_38);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper1611 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 64, __wbg_adapter_29);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper1613 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 64, __wbg_adapter_26);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper178 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 64, __wbg_adapter_35);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper179 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 64, __wbg_adapter_32);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper180 = function(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 64, __wbg_adapter_41);
return addHeapObject(ret);
};
imports['env'] = __wbg_star0;
}
export default init;
The text was updated successfully, but these errors were encountered: