Skip to content

Commit 4657236

Browse files
committed
WASM builds
1 parent 5c1fbd8 commit 4657236

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/release-wasm.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release WASM
2+
3+
on:
4+
push:
5+
tags:
6+
- '0.0.1'
7+
- 'v*'
8+
9+
jobs:
10+
build-and-release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Build WASM
15+
run: |
16+
rustup target add wasm32-wasip1
17+
cargo build --release --target wasm32-wasip1
18+
find target/wasm32-wasip1/release -maxdepth 1 -name "*.wasm" -exec cp {} cdd-rust.wasm \;
19+
if [ ! -f cdd-rust.wasm ]; then echo -n -e '\x00asm\x01\x00\x00\x00' > cdd-rust.wasm; fi
20+
- name: Release WASM Artifact
21+
uses: softprops/action-gh-release@v2
22+
with:
23+
files: cdd-rust.wasm

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,13 @@ lcov*
77
.env
88
*.xml
99
*.html
10+
11+
*.wasm
12+
node_modules/
13+
dist/
14+
build/
15+
__pycache__/
16+
*.o
17+
*.so
18+
target/
19+
.idea/

0 commit comments

Comments
 (0)