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

Update Rust target from 'wasm32-wasi' to 'wasm32-wasip1' in CI #4050

Merged
merged 3 commits into from
Feb 1, 2025
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 .github/workflows/compilation_on_android_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ jobs:

- name: install dependencies
run: |
rustup target add wasm32-wasi
rustup target add wasm32-wasip1
sudo apt update && sudo apt-get install -y lld ninja-build
npm install
working-directory: test-tools/wamr-ide/VSCode-Extension
Expand Down
10 changes: 5 additions & 5 deletions doc/build_wasm_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ For [AssemblyScript](https://github.com/AssemblyScript/assemblyscript), please r

For Rust, please refer to [Install Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) to install *cargo*, *rustc* and *rustup*. By default they are under ~/.cargo/bin.

And then run such a command to install `wasm32-wasi` target.
And then run such a command to install `wasm32-wasip1` target.

``` bash
$ rustup target add wasm32-wasi
$ rustup target add wasm32-wasip1
```

To build WASM applications, run

``` bash
$ cargo build --target wasm32-wasi
$ cargo build --target wasm32-wasip1
```

The output files are under `target/wasm32-wasi`.
The output files are under `target/wasm32-wasip1`.

To build a release version

``` bash
$ cargo build --release --target wasm32-wasi
$ cargo build --release --target wasm32-wasip1
```


Expand Down
2 changes: 1 addition & 1 deletion samples/debug-tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
include(ExternalProject)

# wasm32-wasi
ExternalProject_Add(wasm33-wasi
ExternalProject_Add(wasm32-wasi
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/wasm-apps"
CONFIGURE_COMMAND ${CMAKE_COMMAND} -S ${CMAKE_CURRENT_SOURCE_DIR}/wasm-apps -B build
-DWASI_SDK_PREFIX=${WASISDK_HOME}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# compile with debug symbols and no optimization
rustc --target wasm32-wasi ./test.rs -g -C opt-level=0
rustc --target wasm32-wasip1 ./test.rs -g -C opt-level=0
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function setBpAtMarker(file: string, bpMarker: string): void {
export function compileRustToWasm(): void {
const testResourceFolder = `${EXTENSION_PATH}/resource/test`;
// compile with debug symbols and no optimization
const cmd = `rustc --target wasm32-wasi ${testResourceFolder}/test.rs -g -C opt-level=0 -o ${testResourceFolder}/test.wasm`;
const cmd = `rustc --target wasm32-wasip1 ${testResourceFolder}/test.rs -g -C opt-level=0 -o ${testResourceFolder}/test.wasm`;

try {
cp.execSync(cmd, { stdio: [null, null, process.stderr] });
Expand Down
Loading