diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-05-07 20:43:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-07 20:43:27 +0200 |
| commit | 2b66b8a03e4f81cc158be40d07534f26fa762c2b (patch) | |
| tree | bdeb6b1e6737bd839c87e2d6d178da42d9004ca4 /cli/tests/051_wasm_import | |
| parent | 93cf3bd5341d5985201ea0905280082d5a3310f9 (diff) | |
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
Diffstat (limited to 'cli/tests/051_wasm_import')
| -rw-r--r-- | cli/tests/051_wasm_import/remote.ts | 3 | ||||
| -rw-r--r-- | cli/tests/051_wasm_import/simple.wasm | bin | 226 -> 0 bytes | |||
| -rw-r--r-- | cli/tests/051_wasm_import/simple.wat | 31 | ||||
| -rw-r--r-- | cli/tests/051_wasm_import/wasm-dep.js | 17 |
4 files changed, 0 insertions, 51 deletions
diff --git a/cli/tests/051_wasm_import/remote.ts b/cli/tests/051_wasm_import/remote.ts deleted file mode 100644 index 761a5248e..000000000 --- a/cli/tests/051_wasm_import/remote.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function jsRemoteFn(): number { - return 2019; -} diff --git a/cli/tests/051_wasm_import/simple.wasm b/cli/tests/051_wasm_import/simple.wasm Binary files differdeleted file mode 100644 index 8e544fe30..000000000 --- a/cli/tests/051_wasm_import/simple.wasm +++ /dev/null diff --git a/cli/tests/051_wasm_import/simple.wat b/cli/tests/051_wasm_import/simple.wat deleted file mode 100644 index 5e73db97b..000000000 --- a/cli/tests/051_wasm_import/simple.wat +++ /dev/null @@ -1,31 +0,0 @@ -;; From https://github.com/nodejs/node/blob/bbc254db5db672643aad89a436a4938412a5704e/test/fixtures/es-modules/simple.wat -;; MIT Licensed -;; $ wat2wasm simple.wat -o simple.wasm - -(module - (import "./wasm-dep.js" "jsFn" (func $jsFn (result i32))) - (import "./wasm-dep.js" "jsInitFn" (func $jsInitFn)) - (import "http://127.0.0.1:4545/cli/tests/051_wasm_import/remote.ts" "jsRemoteFn" (func $jsRemoteFn (result i32))) - (export "add" (func $add)) - (export "addImported" (func $addImported)) - (export "addRemote" (func $addRemote)) - (start $startFn) - (func $startFn - call $jsInitFn - ) - (func $add (param $a i32) (param $b i32) (result i32) - local.get $a - local.get $b - i32.add - ) - (func $addImported (param $a i32) (result i32) - local.get $a - call $jsFn - i32.add - ) - (func $addRemote (param $a i32) (result i32) - local.get $a - call $jsRemoteFn - i32.add - ) -) diff --git a/cli/tests/051_wasm_import/wasm-dep.js b/cli/tests/051_wasm_import/wasm-dep.js deleted file mode 100644 index 70b16348b..000000000 --- a/cli/tests/051_wasm_import/wasm-dep.js +++ /dev/null @@ -1,17 +0,0 @@ -function assertEquals(actual, expected, msg) { - if (actual !== expected) { - throw new Error(msg || ""); - } -} - -export function jsFn() { - state = "WASM JS Function Executed"; - return 42; -} - -export let state = "JS Function Executed"; - -export function jsInitFn() { - assertEquals(state, "JS Function Executed", "Incorrect state"); - state = "WASM Start Executed"; -} |
