Repository: RustPython/RustPython (language: rust)

Issue:
How can I fix this : could not find `profileapi` in `um`
## Summary

When I use RustPython under WIndows 11, following problem occured:
![image](https://github.com/RustPython/RustPython/assets/38280800/a0dcfa17-3c64-436f-a092-6f000235b53f)

[dependencies] of my Cargo.toml is:
[dependencies]
rustpython-vm = "0.3.0"
malachite-bigint = { version = "=0.1.0" }
malachite-q = "0.3.2"
malachite-base = "0.3.2"

How can I fix this problem?



Discussion / hints:
The code here in the error messages (and in other places) most likely needs to be fixed so that it uses APIs from the `windows` crate instead of the `winapi` crate. Since you indicated that you're running Windows 11, would you be able to help with this? Feel free to create a pull request.
probably due to mismatching winapi versions or features of our CI run and your project.
We'd better to update it.
got the reason. profileapi feature must be place in `stdlib` crate, but it is now in `vm` crate.

Fix patch:
diff --git a/stdlib/Cargo.toml b/stdlib/Cargo.toml
index 1cd6f09b5e..cd04f47b83 100644
--- a/stdlib/Cargo.toml
+++ b/stdlib/Cargo.toml
@@ -112,9 +112,8 @@ widestring = { workspace = true }
 [target.'cfg(windows)'.dependencies.winapi]
 version = "0.3.9"
 features = [
-  "winsock2", "handleapi", "ws2def", "std", "winbase", "wincrypt", "fileapi", "processenv",
-  "namedpipeapi", "winnt", "processthreadsapi", "errhandlingapi", "winuser", "synchapi", "wincon",
-  "impl-default", "vcruntime", "ifdef", "netioapi"
+  "winsock2", "ws2def", "std", "wincrypt", "fileapi",
+  "impl-default", "vcruntime", "ifdef", "netioapi", "profileapi",
 ]
 
 [target.'cfg(target_os = "macos")'.dependencies]
diff --git a/vm/Cargo.toml b/vm/Cargo.toml
index 7ba9a44f14..c8fd0174ca 100644
--- a/vm/Cargo.toml
+++ b/vm/Cargo.toml
@@ -139,9 +139,9 @@ features = [
 [target.'cfg(windows)'.dependencies.winapi]
 version = "0.3.9"
 features = [
-  "winsock2", "handleapi", "ws2def", "std", "winbase", "wincrypt", "fileapi", "processenv",
-  "namedpipeapi", "winnt", "processthreadsapi", "errhandlingapi", "winuser", "synchapi", "wincon",
-  "impl-default", "vcruntime", "ifdef", "netioapi", "memoryapi", "profileapi", "sysinfoapi"
+  "winsock2", "handleapi", "std", "winbase", "processenv",
+  "winnt", "processthreadsapi", "errhandlingapi", "wincon",
+  "impl-default", "vcruntime", "sysinfoapi",
 ]
 
 [target.'cfg(target_arch = "wasm32")'.dependencies]


Test patch: