WASM binding (#114)

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2024-01-27 22:14:29 -08:00
committed by GitHub
parent 0af97840f7
commit 055bdd295f
7 changed files with 223 additions and 0 deletions

23
.github/workflows/publish-wasm.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: publish-wasm
permissions:
pull-requests: write
contents: write
on: workflow_dispatch
jobs:
publish-wasm:
name: publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build
run: wasm-pack build --target nodejs -r
- name: Publish
run: # TODO

View File

@@ -37,3 +37,11 @@ jobs:
- name: Run tests (OPA Conformance)
run: >-
cargo test -r --test opa -- $(tr '\n' ' ' < tests/opa.passing)
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Run wasm binding tests
run: |
cd bindings/wasm
wasm-pack test --node -r