-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Description
When attempting to develop a plugin for SWC following the documentation, I encountered the following error while creating a new project:
❯ swc plugin new --target-type wasm32-wasip1 my-first-plugin
error: "wasm32-wasip1" isn't a valid value for '--target-type <TARGET_TYPE>'
[possible values: wasm32-unknown-unknown, wasm32-wasi]
Did you mean "wasm32-wasi"?Additionally, the latest version of rustup cannot add wasm32-wasi as a target:
❯ rustup -V
rustup 1.28.1 (f9edccde0 2025-03-05)
❯ rustup target add wasm32-wasi
error: toolchain 'stable-x86_64-pc-windows-msvc' does not support target 'wasm32-wasi'; did you mean 'wasm32-wasip1'?I tried using the nightly-2024-10-07 version that the SWC project uses, and was able to successfully add wasm32-wasi as a target.
However, the steps in the documentation clearly lead to errors when creating a new project. I found this related issue:
My question is: Was this an oversight when updating the documentation without simultaneously updating the command-line tool, or is this intentional for compatibility reasons until the Rust version is upgraded?
If it's the former, I would like to attempt to fix this.
SWC Version
16.0.0
Metadata
Metadata
Assignees
Labels
No labels