Update Rust target from 'wasm32-wasi' to 'wasm32-wasip1' in CI (#4050)
- update Rust target from 'wasm32-wasi' to 'wasm32-wasip1' in ci
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
```
|
||||
|
||||
|
||||
|
||||
@ -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}
|
||||
|
||||
@ -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
|
||||
@ -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] });
|
||||
|
||||
Reference in New Issue
Block a user