From 2b66b8a03e4f81cc158be40d07534f26fa762c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 7 May 2020 20:43:27 +0200 Subject: BREAKING: Remove support for .wasm imports (#5135) Importing .wasm files is non-standardized therefore deciding to support current functionality past 1.0 release is risky. Besides that .wasm import posed many challenges in our codebase due to complex interactions with TS compiler which spawned thread for each encountered .wasm import. This commit removes: - cli/compilers/wasm.rs - cli/compilers/wasm_wrap.js - two integration tests related to .wasm imports --- cli/compilers/wasm_wrap.js | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 cli/compilers/wasm_wrap.js (limited to 'cli/compilers/wasm_wrap.js') diff --git a/cli/compilers/wasm_wrap.js b/cli/compilers/wasm_wrap.js deleted file mode 100644 index 98892b8e0..000000000 --- a/cli/compilers/wasm_wrap.js +++ /dev/null @@ -1,20 +0,0 @@ -// @ts-nocheck -const importObject = Object.create(null); -//IMPORTS - -function base64ToUint8Array(data) { - const binString = window.atob(data); - const size = binString.length; - const bytes = new Uint8Array(size); - for (let i = 0; i < size; i++) { - bytes[i] = binString.charCodeAt(i); - } - return bytes; -} - -const buffer = base64ToUint8Array("BASE64_DATA"); -const compiled = await WebAssembly.compile(buffer); - -const instance = new WebAssembly.Instance(compiled, importObject); - -//EXPORTS -- cgit v1.2.3