-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #5 This PR adds a WASM bundle with an (_unpublished_) NPM `package.json` so that it can be used on the Web. An example web page is included in the `wasm/example` sub-directory (see `wasm/README.md` for instructions). As a design choice, the source is bundled into a single file, which includes base-64 encoded WASM binary blob and uses `Blob` URLs for the worker. This allows the worker to be bundled without requiring additional HTTP requests for additional resources.
- Loading branch information
Nicholas Rodrigues Lordello
authored
Jun 30, 2023
1 parent
4bb4c51
commit cb5bb6c
Showing
21 changed files
with
702 additions
and
62 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,34 @@ | ||
name: WASM | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: "-Dwarnings" | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Requirements | ||
run: | | ||
sudo apt-get update && sudo apt-get install binaryen | ||
curl -fsSL https://rustwasm.github.io/wasm-pack/installer/init.sh | sh | ||
curl -fsSL https://deno.land/x/install/install.sh | sh | ||
echo "${HOME}/.deno/bin" >> "${GITHUB_PATH}" | ||
- name: Versions | ||
run: | | ||
wasm-opt --version | ||
wasm-pack --version | ||
deno --version | ||
- name: Tests | ||
run: | | ||
cd wasm | ||
make test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
members = [ | ||
"cli", | ||
"core", | ||
"wasm", | ||
] |
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 @@ | ||
../LICENSE |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE |
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.