From c09ab3a911e05f297a3f18fa0fc24a64aefcff4d Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Sat, 29 Jun 2024 11:54:33 -0400 Subject: [PATCH] wasm32-wasi -> wasm32-wasip1 --- .cargo/config.toml | 2 +- .github/workflows/build.yml | 20 ++++++++++---------- .vscode/launch.json | 3 ++- README.md | 6 +++--- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index f360cb40..971017a3 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -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", diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0defec62..06cec4f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,13 +30,13 @@ 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: | @@ -44,11 +44,11 @@ jobs: - 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 @@ -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 @@ -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 diff --git a/.vscode/launch.json b/.vscode/launch.json index 2181c24a..1c02bd91 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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}" } diff --git a/README.md b/README.md index 386f6112..cea77ec8 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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: @@ -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.