From 5c321d98c79f4e5270a881325f460445d247c006 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 23 Nov 2019 02:35:20 -0500 Subject: i don't think rlib is necessary? i thiiiiink that's just if the crate is supposed to be for both native code and wasm --- teleterm-web/Cargo.toml | 2 +- teleterm/static/teleterm_web.js | 81 ++++++++++++++++++----------------- teleterm/static/teleterm_web_bg.wasm | Bin 729758 -> 721128 bytes 3 files changed, 42 insertions(+), 41 deletions(-) diff --git a/teleterm-web/Cargo.toml b/teleterm-web/Cargo.toml index 9468353..01a10a3 100644 --- a/teleterm-web/Cargo.toml +++ b/teleterm-web/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" publish = false [lib] -crate-type = ["cdylib", "rlib"] +crate-type = ["cdylib"] [dependencies] console_log = "0.1" diff --git a/teleterm/static/teleterm_web.js b/teleterm/static/teleterm_web.js index 32aadec..c8880b2 100644 --- a/teleterm/static/teleterm_web.js +++ b/teleterm/static/teleterm_web.js @@ -1,6 +1,13 @@ let wasm; +function __wbg_elem_binding0(arg0, arg1) { + wasm.__wbg_function_table.get(228)(arg0, arg1); +} +function __wbg_elem_binding1(arg0, arg1, arg2) { + wasm.__wbg_function_table.get(81)(arg0, arg1, arg2); +} + const heap = new Array(32); heap.fill(undefined); @@ -17,32 +24,26 @@ function addHeapObject(obj) { heap[idx] = obj; return idx; } -function __wbg_elem_binding0(arg0, arg1, arg2) { - wasm.__wbg_function_table.get(76)(arg0, arg1, addHeapObject(arg2)); -} -function __wbg_elem_binding1(arg0, arg1, arg2) { - wasm.__wbg_function_table.get(80)(arg0, arg1, arg2); -} -function __wbg_elem_binding2(arg0, arg1) { - wasm.__wbg_function_table.get(227)(arg0, arg1); +function __wbg_elem_binding2(arg0, arg1, arg2) { + wasm.__wbg_function_table.get(77)(arg0, arg1, addHeapObject(arg2)); } function __wbg_elem_binding3(arg0, arg1, arg2) { - wasm.__wbg_function_table.get(296)(arg0, arg1, addHeapObject(arg2)); + wasm.__wbg_function_table.get(77)(arg0, arg1, addHeapObject(arg2)); } function __wbg_elem_binding4(arg0, arg1, arg2) { - wasm.__wbg_function_table.get(76)(arg0, arg1, addHeapObject(arg2)); + wasm.__wbg_function_table.get(297)(arg0, arg1, addHeapObject(arg2)); } function __wbg_elem_binding5(arg0, arg1, arg2) { - wasm.__wbg_function_table.get(76)(arg0, arg1, addHeapObject(arg2)); + wasm.__wbg_function_table.get(77)(arg0, arg1, addHeapObject(arg2)); } function __wbg_elem_binding6(arg0, arg1, arg2) { - wasm.__wbg_function_table.get(76)(arg0, arg1, addHeapObject(arg2)); + wasm.__wbg_function_table.get(77)(arg0, arg1, addHeapObject(arg2)); } function __wbg_elem_binding7(arg0, arg1, arg2, arg3, arg4) { - wasm.__wbg_function_table.get(323)(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4)); + wasm.__wbg_function_table.get(324)(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4)); } function __wbg_elem_binding8(arg0, arg1, arg2, arg3) { - wasm.__wbg_function_table.get(327)(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); + wasm.__wbg_function_table.get(328)(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); } /** */ @@ -236,9 +237,6 @@ function init(module) { const ret = getObject(arg0); return addHeapObject(ret); }; - imports.wbg.__wbindgen_cb_forget = function(arg0) { - takeObject(arg0); - }; imports.wbg.__wbindgen_cb_drop = function(arg0) { const obj = takeObject(arg0).original; if (obj.cnt-- == 1) { @@ -248,6 +246,9 @@ function init(module) { const ret = false; return ret; }; + imports.wbg.__wbindgen_cb_forget = function(arg0) { + takeObject(arg0); + }; imports.wbg.__wbindgen_json_parse = function(arg0, arg1) { const ret = JSON.parse(getStringFromWasm(arg0, arg1)); return addHeapObject(ret); @@ -884,16 +885,16 @@ function init(module) { imports.wbg.__wbindgen_throw = function(arg0, arg1) { throw new Error(getStringFromWasm(arg0, arg1)); }; - imports.wbg.__wbindgen_closure_wrapper1077 = function(arg0, arg1, arg2) { + imports.wbg.__wbindgen_closure_wrapper290 = function(arg0, arg1, arg2) { const state = { a: arg0, b: arg1, cnt: 1 }; const real = (arg0) => { state.cnt++; const a = state.a; state.a = 0; try { - return __wbg_elem_binding3(a, state.b, arg0); + return __wbg_elem_binding6(a, state.b, arg0); } finally { - if (--state.cnt === 0) wasm.__wbg_function_table.get(297)(a, state.b); + if (--state.cnt === 0) wasm.__wbg_function_table.get(78)(a, state.b); else state.a = a; } } @@ -902,16 +903,16 @@ function init(module) { const ret = real; return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper303 = function(arg0, arg1, arg2) { + imports.wbg.__wbindgen_closure_wrapper292 = function(arg0, arg1, arg2) { const state = { a: arg0, b: arg1, cnt: 1 }; const real = (arg0) => { state.cnt++; const a = state.a; state.a = 0; try { - return __wbg_elem_binding6(a, state.b, arg0); + return __wbg_elem_binding2(a, state.b, arg0); } finally { - if (--state.cnt === 0) wasm.__wbg_function_table.get(77)(a, state.b); + if (--state.cnt === 0) wasm.__wbg_function_table.get(78)(a, state.b); else state.a = a; } } @@ -920,16 +921,16 @@ function init(module) { const ret = real; return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper297 = function(arg0, arg1, arg2) { + imports.wbg.__wbindgen_closure_wrapper286 = function(arg0, arg1, arg2) { const state = { a: arg0, b: arg1, cnt: 1 }; const real = (arg0) => { state.cnt++; const a = state.a; state.a = 0; try { - return __wbg_elem_binding4(a, state.b, arg0); + return __wbg_elem_binding5(a, state.b, arg0); } finally { - if (--state.cnt === 0) wasm.__wbg_function_table.get(77)(a, state.b); + if (--state.cnt === 0) wasm.__wbg_function_table.get(78)(a, state.b); else state.a = a; } } @@ -938,16 +939,16 @@ function init(module) { const ret = real; return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper305 = function(arg0, arg1, arg2) { + imports.wbg.__wbindgen_closure_wrapper288 = function(arg0, arg1, arg2) { const state = { a: arg0, b: arg1, cnt: 1 }; const real = (arg0) => { state.cnt++; const a = state.a; state.a = 0; try { - return __wbg_elem_binding0(a, state.b, arg0); + return __wbg_elem_binding1(a, state.b, arg0); } finally { - if (--state.cnt === 0) wasm.__wbg_function_table.get(77)(a, state.b); + if (--state.cnt === 0) wasm.__wbg_function_table.get(78)(a, state.b); else state.a = a; } } @@ -956,16 +957,16 @@ function init(module) { const ret = real; return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper301 = function(arg0, arg1, arg2) { + imports.wbg.__wbindgen_closure_wrapper653 = function(arg0, arg1, arg2) { const state = { a: arg0, b: arg1, cnt: 1 }; - const real = (arg0) => { + const real = () => { state.cnt++; const a = state.a; state.a = 0; try { - return __wbg_elem_binding5(a, state.b, arg0); + return __wbg_elem_binding0(a, state.b, ); } finally { - if (--state.cnt === 0) wasm.__wbg_function_table.get(77)(a, state.b); + if (--state.cnt === 0) wasm.__wbg_function_table.get(229)(a, state.b); else state.a = a; } } @@ -974,16 +975,16 @@ function init(module) { const ret = real; return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper299 = function(arg0, arg1, arg2) { + imports.wbg.__wbindgen_closure_wrapper294 = function(arg0, arg1, arg2) { const state = { a: arg0, b: arg1, cnt: 1 }; const real = (arg0) => { state.cnt++; const a = state.a; state.a = 0; try { - return __wbg_elem_binding1(a, state.b, arg0); + return __wbg_elem_binding3(a, state.b, arg0); } finally { - if (--state.cnt === 0) wasm.__wbg_function_table.get(77)(a, state.b); + if (--state.cnt === 0) wasm.__wbg_function_table.get(78)(a, state.b); else state.a = a; } } @@ -992,16 +993,16 @@ function init(module) { const ret = real; return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper657 = function(arg0, arg1, arg2) { + imports.wbg.__wbindgen_closure_wrapper1073 = function(arg0, arg1, arg2) { const state = { a: arg0, b: arg1, cnt: 1 }; - const real = () => { + const real = (arg0) => { state.cnt++; const a = state.a; state.a = 0; try { - return __wbg_elem_binding2(a, state.b, ); + return __wbg_elem_binding4(a, state.b, arg0); } finally { - if (--state.cnt === 0) wasm.__wbg_function_table.get(228)(a, state.b); + if (--state.cnt === 0) wasm.__wbg_function_table.get(298)(a, state.b); else state.a = a; } } diff --git a/teleterm/static/teleterm_web_bg.wasm b/teleterm/static/teleterm_web_bg.wasm index 7f9a695..a9a4f41 100644 Binary files a/teleterm/static/teleterm_web_bg.wasm and b/teleterm/static/teleterm_web_bg.wasm differ -- cgit v1.2.3-54-g00ecf