-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2460: Added Wasmer Js API r=syrusakbary a=syrusakbary <!-- Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test: https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests --> # Description This PR adds support for compiling Wasmer into JS/Wasm via wasm-bindgen, so 3rd party dependencies can use Wasmer to target the web also. Things working: * [x] Type introspection: we have to decide how to do it, either run our own parser on the data or rely on the future APIs for introspect Wasm types (this APIs are yet available in the browser, but a proposal is on the way: [wasm-js-types proposal](https://github.com/WebAssembly/js-types)). * [x] Wasm-pack wasmer-js tests * [x] Assert 0 warnings in lint * [x] Allow for custom JS errors (via `RuntimeError`) * Externals * [x] Functions with and without Environments * [x] Native functions * [x] Dynamic functions * [x] Memory * [x] Globals * [x] Tables # Review - [ ] Add a short description of the change to the CHANGELOG.md file Co-authored-by: Syrus Akbary <[email protected]>
- Loading branch information
Showing
96 changed files
with
9,856 additions
and
2,051 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
on: | ||
push: | ||
branches: | ||
- '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: wasmer-js tests | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
|
||
jobs: | ||
wasmer-js: | ||
name: wasmer-js | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
override: true | ||
- name: Install wasm-pack | ||
run: | | ||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
- name: Test wasmer-js | ||
run: make test-js |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.