File tree Expand file tree Collapse file tree 5 files changed +24
-6
lines changed Expand file tree Collapse file tree 5 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 3737 uses : actions-rs/toolchain@v1
3838 with :
3939 toolchain : stable
40- target : wasm32-wasi
40+ target : wasm32-wasip1
4141
4242 - name : Check Rust Version
4343 run : rustc --version
Original file line number Diff line number Diff line change @@ -33,6 +33,6 @@ case $1 in
3333 echo " building '$PLUGIN_NAME '..."
3434 xtp plugin build --path $PLUGIN_NAME
3535 echo " testing '$PLUGIN_NAME '..."
36- xtp plugin test $PLUGIN_NAME /target/wasm32-wasi /release/plugin.wasm --with test.wasm --mock-host mock.wasm
36+ xtp plugin test $PLUGIN_NAME /target/wasm32-wasip1 /release/plugin.wasm --with test.wasm --mock-host mock.wasm
3737 ;;
3838esac
Original file line number Diff line number Diff line change 11[build]
2- target = "wasm32-wasi "
2+ target = "wasm32-wasip1 "
Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ if ! (command_exists cargo); then
2828 echo " "
2929fi
3030
31+ if ! (command_exists rustup); then
32+ missing_deps=1
33+ echo " ❌ rustup is missing. Check your rust installation."
34+ echo " "
35+ fi
36+
3137# Exit with a bad exit code if any dependencies are missing
3238if [ " $missing_deps " -ne 0 ]; then
3339 echo " Install the missing dependencies and ensure they are on your path. Then run this command again."
@@ -36,5 +42,17 @@ if [ "$missing_deps" -ne 0 ]; then
3642 exit 1
3743fi
3844
45+ if ! (rustup target list --installed | grep -q ' ^wasm32-wasip1$' ); then
46+ if ! (rustup target add wasm32-wasip1); then
47+ echo " ❌ error encountered while adding target \" wasm32-wasip1\" "
48+ echo " "
49+ echo " Update rustup with:"
50+ echo " 👉 rustup update"
51+ echo " "
52+ exit 1
53+ fi
54+ fi
3955
40-
56+ if ! (rustup target list --installed | grep -q ' ^wasm32-unknown-unknown$' ); then
57+ rustup target add wasm32-unknown-unknown
58+ fi
Original file line number Diff line number Diff line change 11app_id = "<%= project .appId %> "
22
33# This is where 'xtp plugin push' expects to find the wasm file after the build script has run.
4- bin = "target/wasm32-wasi /release/plugin.wasm"
4+ bin = "target/wasm32-wasip1 /release/plugin.wasm"
55extension_point_id = "<%= project .extensionPointId %> "
66# This is the 'binding' name used for the plugin.
77name = "<%= project .name %> "
88
99[scripts]
1010# xtp plugin build runs this script to generate the wasm file
11- build = "cargo build --release --target wasm32-wasi "
11+ build = "cargo build --release --target wasm32-wasip1 "
1212
1313# xtp plugin init runs this script to format the code
1414format = "cargo fmt"
You can’t perform that action at this time.
0 commit comments