From 8047e3eb6ae52e4ee484d386e3fb404b908a9e01 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Wed, 14 Jul 2021 13:54:50 -0700 Subject: [PATCH] Addressed feedback --- .github/workflows/js.yaml | 18 +++++++++++------- lib/js-api/src/lib.rs | 35 ----------------------------------- 2 files changed, 11 insertions(+), 42 deletions(-) diff --git a/.github/workflows/js.yaml b/.github/workflows/js.yaml index 484b13f548f..d05e21ce80f 100644 --- a/.github/workflows/js.yaml +++ b/.github/workflows/js.yaml @@ -1,17 +1,21 @@ on: push: branches: - - '**' - - '!master' + - 'master' + - 'staging' + - 'trying' + tags: + # this is _not_ a regex, see: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet + - '[0-9]+.[0-9]+.[0-9]+*' -name: wasmerjs +name: wasmer-js tests env: RUST_BACKTRACE: 1 jobs: - wasmerjs: - name: Wasmer-JS + wasmer-js: + name: wasmer-js runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -20,8 +24,8 @@ jobs: with: profile: minimal override: true - - name: Install WasmPack + - name: Install wasm-pack run: | curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - - name: Test Wasmer-JS + - name: Test wasmer-js run: make test-js diff --git a/lib/js-api/src/lib.rs b/lib/js-api/src/lib.rs index 9f69a909354..91414d7cd54 100644 --- a/lib/js-api/src/lib.rs +++ b/lib/js-api/src/lib.rs @@ -146,38 +146,3 @@ pub use wat::parse_bytes as wat2wasm; /// Version number of this crate. pub const VERSION: &str = env!("CARGO_PKG_VERSION"); - -// #[cfg(test)] -// wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); - -// use wasm_bindgen::prelude::*; - -// #[wasm_bindgen] -// #[no_mangle] -// /// example doc -// pub fn example() -> bool { -// let store = Store::default(); -// let module = Module::new( -// &store, -// br#"(module -// (func $add (import "env" "sum") (param i32 i32) (result i32)) -// (func (export "add_one") (param i32) (result i32) -// (call $imported (local.get 0)) -// ) -// )"#) -// .unwrap(); - -// fn sum(a: i32, b: i32) -> i32 { -// a+b -// } - -// let import_object = imports! { -// "env" => { -// "sum" => Function::new_native(&store, sum), -// } -// }; -// let instance = Instance::new(&module, &import_object).unwrap(); - -// let add_one: NativeFunc = instance.exports.get_native_function("add_one").unwrap(); -// assert_eq!(add_one(1), 2) -// }