Adding in wrapper file to fix circular dependency with Webpack 5 (#2110)

* Adding in wrapper file to fix circular dependency with Webpack 5

* Running rustfmt

* Fixing unit tests
This commit is contained in:
Pauan
2020-04-29 17:55:28 +02:00
committed by GitHub
parent a521c9012c
commit e16f7e41bf
9 changed files with 55 additions and 19 deletions

View File

@ -112,7 +112,7 @@ fn runtest(test: &Path) -> Result<()> {
let wat = sanitize_wasm(&wasm)?;
assert_same(&wat, &test.with_extension("wat"))?;
} else {
let js = fs::read_to_string(td.path().join("reference_test.js"))?;
let js = fs::read_to_string(td.path().join("reference_test_bg.js"))?;
assert_same(&js, &test.with_extension("js"))?;
let wat = sanitize_wasm(&td.path().join("reference_test_bg.wasm"))?;
assert_same(&wat, &test.with_extension("wat"))?;

View File

@ -11,5 +11,3 @@ export const __wbindgen_init_anyref_table = function() {
;
};
wasm.__wbindgen_start();

View File

@ -1,6 +1,6 @@
(module
(type (;0;) (func))
(import "./reference_test.js" "__wbindgen_init_anyref_table" (func (;0;) (type 0)))
(import "./reference_test_bg.js" "__wbindgen_init_anyref_table" (func (;0;) (type 0)))
(table (;0;) 32 anyref)
(memory (;0;) 16)
(export "memory" (memory 0))

View File

@ -64,5 +64,3 @@ export const __wbindgen_init_anyref_table = function() {
;
};
wasm.__wbindgen_start();

View File

@ -2,7 +2,7 @@
(type (;0;) (func))
(type (;1;) (func (result i32)))
(type (;2;) (func (param i32)))
(import "./reference_test.js" "__wbindgen_init_anyref_table" (func (;0;) (type 0)))
(import "./reference_test_bg.js" "__wbindgen_init_anyref_table" (func (;0;) (type 0)))
(func $__wbindgen_exn_store (type 2) (param i32))
(func $__anyref_table_alloc (type 1) (result i32))
(func $exported (type 0))

View File

@ -17,5 +17,3 @@ export const __wbindgen_init_anyref_table = function() {
;
};
wasm.__wbindgen_start();

View File

@ -1,6 +1,6 @@
(module
(type (;0;) (func))
(import "./reference_test.js" "__wbindgen_init_anyref_table" (func (;0;) (type 0)))
(import "./reference_test_bg.js" "__wbindgen_init_anyref_table" (func (;0;) (type 0)))
(func $foo (type 0))
(table (;0;) 32 anyref)
(memory (;0;) 17)