Skip to content

Commit

Permalink
wasm32-wasi -> wasm32-wasip1
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Jun 29, 2024
1 parent 77be0c1 commit c09ab3a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build]
target = "wasm32-wasi"
target = "wasm32-wasip1"
rustflags = [
# The auto splitting runtime supports all the following WASM features.
"-C", "target-feature=+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext,+simd128",
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ jobs:
features: '"unstable"'
steps:
- name: Checkout Commit
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust
uses: hecrj/setup-rust-action@v1
uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
targets: wasm32-wasi
targets: wasm32-wasip1

- name: Build
run: |
cargo release --locked --features ${{ matrix.features }}
- name: Prepare Release
run: |
cp target/wasm32-wasi/release/hollowknight_autosplit_wasm.wasm hollowknight_autosplit_wasm${{ matrix.postfix }}.wasm
cp target/wasm32-wasip1/release/hollowknight_autosplit_wasm.wasm hollowknight_autosplit_wasm${{ matrix.postfix }}.wasm
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: hollowknight_autosplit_wasm*.wasm
Expand All @@ -58,13 +58,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust
uses: hecrj/setup-rust-action@v1
uses: hecrj/setup-rust-action@v2
with:
components: clippy
targets: wasm32-wasi
targets: wasm32-wasip1

- name: Run Clippy
run: cargo clippy --all-features
Expand All @@ -74,10 +74,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust
uses: hecrj/setup-rust-action@v1
uses: hecrj/setup-rust-action@v2
with:
components: rustfmt

Expand Down
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// cargo install --locked --git https://github.com/LiveSplit/asr-debugger
"program": "asr-debugger",
"args": [
"target${pathSeparator}wasm32-wasi${pathSeparator}debug${pathSeparator}hollowknight_autosplit_wasm.wasm"
"--debug",
"target${pathSeparator}wasm32-wasip1${pathSeparator}debug${pathSeparator}hollowknight_autosplit_wasm.wasm"
],
"cwd": "${workspaceFolder}"
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ An auto splitter for Hollow Knight that supports Windows, Mac, and Linux.

Download the `hollowknight_autosplit_wasm_stable.wasm` file from the [Latest Release](https://github.com/AlexKnauth/hollowknight-autosplit-wasm/releases/latest).

Or follow the steps in [Compilation](#compilation) and use `target/wasm32-wasi/release/hollowknight_autosplit_wasm.wasm`.
Or follow the steps in [Compilation](#compilation) and use `target/wasm32-wasip1/release/hollowknight_autosplit_wasm.wasm`.

To configure LiveSplit or a LiveSplit One prototype to use this, see:
- [Instructions for LiveSplit Windows](#instructions-for-livesplit-windows)
Expand All @@ -21,7 +21,7 @@ install the Rust compiler: [Install Rust](https://www.rust-lang.org/tools/instal

Afterwards install the WebAssembly target:
```sh
rustup target add wasm32-wasi --toolchain stable
rustup target add wasm32-wasip1 --toolchain stable
```

The auto splitter can now be compiled:
Expand All @@ -31,7 +31,7 @@ cargo release

The auto splitter is then available at:
```
target/wasm32-wasi/release/hollowknight_autosplit_wasm.wasm
target/wasm32-wasip1/release/hollowknight_autosplit_wasm.wasm
```

Make sure too look into the [API documentation](https://livesplit.org/asr/asr/) for the `asr` crate.
Expand Down

0 comments on commit c09ab3a

Please sign in to comment.