Repository: RustPython/RustPython (language: rust)

Issue:
sys.platform of wasm32-wasi build to `wasi` instead of `unknown`
CPython part: https://github.com/RustPython/RustPython/pull/4537/files#diff-d925268c057737ba320c489ca302fd5125f14840d22e50cfe226bdb5bb88ba8dR517-R518


actual:
```
$ cargo build --release --target wasm32-wasi --no-default-features --features stdlib,encodings,threading,freeze-stdlib
$ wasmer run --env RUST_BACKTRACE=full --dir . target/wasm32-wasi/release/rustpython.wasm -- -c 'import sys; print(sys.platform)'
unknown
```

expected:
```
wasi
```


Discussion / hints:
@jhowww how about this one?
Thanks! I can give it a shot.

Fix patch:
diff --git a/vm/src/stdlib/sys.rs b/vm/src/stdlib/sys.rs
index f72f496a1b..86d6f44fcd 100644
--- a/vm/src/stdlib/sys.rs
+++ b/vm/src/stdlib/sys.rs
@@ -60,6 +60,8 @@ mod sys {
                 "darwin"
             } else if #[cfg(windows)] {
                 "win32"
+            } else if #[cfg(target_os = "wasi")] {
+                "wasi"
             } else {
                 "unknown"
             }


Test patch: