Skip to content
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-wasip1"
target = "wasm32-wasip2"
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1
targets: wasm32-wasip2
components: rustfmt, clippy

- name: Cache cargo
Expand All @@ -33,19 +33,19 @@ jobs:
run: cargo fmt --check

- name: Clippy (WASM target)
run: cargo clippy --target wasm32-wasip1 -- -D warnings
run: cargo clippy --target wasm32-wasip2 -- -D warnings

- name: Unit tests (host target)
run: cargo test --target x86_64-unknown-linux-gnu

- name: Build WASM component
run: cargo build --release --target wasm32-wasip1
run: cargo build --release --target wasm32-wasip2

- name: Upload plugin artifact
uses: actions/upload-artifact@v4
with:
name: plugin-wasm
path: target/wasm32-wasip1/release/unity_format_plugin.wasm
path: target/wasm32-wasip2/release/unity_format_plugin.wasm

- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v5
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1
targets: wasm32-wasip2

- name: Build WASM component
run: cargo build --release --target wasm32-wasip1
run: cargo build --release --target wasm32-wasip2

- name: Prepare release archive
run: |
mkdir -p release-staging
cp target/wasm32-wasip1/release/unity_format_plugin.wasm release-staging/plugin.wasm
cp target/wasm32-wasip2/release/unity_format_plugin.wasm release-staging/plugin.wasm
cp plugin.toml release-staging/
cp README.md release-staging/
cp LICENSE release-staging/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Use this repo as a starting point for building your own plugins. Fork it, change
## Prerequisites

- [Rust](https://rustup.rs/) (stable)
- The `wasm32-wasip1` target (installed automatically via `rust-toolchain.toml`)
- The `wasm32-wasip2` target (installed automatically via `rust-toolchain.toml`)

## Build

Expand All @@ -27,7 +27,7 @@ cd artifact-keeper-example-plugin
# Build the WASM component
cargo build --release

# Output: target/wasm32-wasip1/release/unity_format_plugin.wasm
# Output: target/wasm32-wasip2/release/unity_format_plugin.wasm
```

## Test
Expand Down
4 changes: 2 additions & 2 deletions docs/TEST_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

The artifact-keeper example plugin is a Rust WASM plugin template using wit-bindgen. It compiles to wasm32-wasip1 and implements the FormatHandler WIT contract.
The artifact-keeper example plugin is a Rust WASM plugin template using wit-bindgen. It compiles to wasm32-wasip2 and implements the FormatHandler WIT contract.

## Test Inventory

Expand Down Expand Up @@ -32,7 +32,7 @@ cargo test --target $(rustc -vV | grep host | awk '{print $2}')
### Build WASM
```bash
cargo build --release
# Output: target/wasm32-wasip1/release/unity_format_plugin.wasm
# Output: target/wasm32-wasip2/release/unity_format_plugin.wasm
```

## Gaps and Roadmap
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "stable"
targets = ["wasm32-wasip1"]
targets = ["wasm32-wasip2"]
Loading