Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cargo): update target name to wasm32-wasip1 #23

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build]
target = "wasm32-wasi"
target = "wasm32-wasip1"
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
toolchain: stable
override: true
components: cargo
target: wasm32-wasi
target: wasm32-wasip1

- name: install wasm-opt optimizer
uses: actions-rs/cargo@v1
Expand All @@ -37,4 +37,4 @@ runs:
uses: actions-rs/cargo@v1
with:
command: build
args: --target wasm32-wasi
args: --target wasm32-wasip1
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:

- name: optimize
run: |
if ! test -f target/wasm32-wasi/release/datakit.wasm; then
if ! test -f target/wasm32-wasip1/release/datakit.wasm; then
echo "missing output binary"
exit 1
fi

wasm-opt -O4 \
./target/wasm32-wasi/release/datakit.wasm \
./target/wasm32-wasip1/release/datakit.wasm \
-o ./datakit.wasm

- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: cargo test
# for some reason cargo won't run unit tests against the default wasm32-wasi target
# for some reason cargo won't run unit tests against the default wasm32-wasip1 target
run: cargo test --target x86_64-unknown-linux-gnu

check:
Expand Down
4 changes: 2 additions & 2 deletions test/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ message "Building the filter using cargo..."

(
cd ..
cargo build --target=wasm32-wasi --release || exit 1
cargo build --target=wasm32-wasip1 --release || exit 1
) || exit 1

### Copy filter to wasm/ #######################################################

mkdir -p wasm

cp -a ../target/wasm32-wasi/release/*.wasm wasm/
cp -a ../target/wasm32-wasip1/release/*.wasm wasm/
cp ../*.meta.json wasm/

script_dir=$(dirname $(realpath $0))
Expand Down
Loading