expression
Recognize historical WASI target names
Rust introduced the explicit WASI 0.1 target name in 1.78 and removed the old stable target name in 1.84. WASI 0.2 reached tier 2 in 1.82. The 1.85 curriculum uses the explicit names. This string mapping is migration guidance, not a toolchain inventory. Expected host stdout (not executed): target: wasm32-wasip1 Common mistake: Using the obsolete wasm32-wasi name with Rust 1.85 or treating WASI 0.1 and 0.2 as interchangeable.
Formal Syntax & Structure
rust syntaxrust
wasm32-wasi → wasm32-wasip1Working Example
Example Snippetrust
fn main() { let target = "wasm32-wasi"; let replacement = match target { "wasm32-wasi" => "wasm32-wasip1", other => other }; println!("target: {replacement}");}