Skip to content

Commit

Permalink
Workaround to make it compile in WASM (#9)
Browse files Browse the repository at this point in the history
* Increase carton version

* Work around for avoiding maximum locals
  • Loading branch information
fjtrujy authored Oct 6, 2022
1 parent e02e67f commit 2cff6df
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ on:

jobs:
test:
name: BezierKit WASM support
name: WASM support
runs-on: ubuntu-latest
container: ghcr.io/swiftwasm/carton:0.16.0
container: ghcr.io/swiftwasm/carton:0.17.0

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

# Work around to avoid this issue: https://github.com/ChimeHQ/SwiftTreeSitter/issues/8
# We are running wasm-opt -O before execute the test for avoiding maximum of locals
- name: Test WebAssembly
run: carton test
run: |
swift build -c debug --product SwiftTreeSitterPackageTests -Xswiftc -color-diagnostics --triple wasm32-unknown-wasi
wasm-opt -O .build/wasm32-unknown-wasi/debug/SwiftTreeSitterPackageTests.wasm -o SwiftTreeSitterPackageTests.wasm
wasmer SwiftTreeSitterPackageTests.wasm

0 comments on commit 2cff6df

Please sign in to comment.