You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run "cargo install c2rust" on my Windows 11 64-bit laptop I get the following errors:
Compiling c2rust-build-paths v0.18.0
err
or[E0433]: failed to resolve: could not find unix in os
--> C:\Users\murra.cargo\registry\src\index.crates.io-6f17d22bba15001f\c2rust-build-paths-0.18.0\src\lib.rs:35:26
|
35 | use std::os::unix::ffi::OsStrExt;
| ^^^^ could not find unix in os
Compiling env_logger v0.10.0
error[E0599]: no function or associated item named from_bytes found for struct OsStr in the current scope
--> C:\Users\murra.cargo\registry\src\index.crates.io-6f17d22bba15001f\c2rust-build-paths-0.18.0\src\lib.rs:37:20
|
37 | OsStr::from_bytes(path)
| ^^^^^^^^^^ function or associated item not found in OsStr
Can someone PLEASE fix these errors, I KNOW that running on Windows is not you first or highest priorities but these errors (to me) are SO ELEMENTARY that the SHOULD be fixed, regardless of the O/S clients are running on.
I don't believe that the "fix" for this issue is that convoluted or complex, I just don't think any appreciation is being given to this problem.
IMO, it is simply BAD FORM to reference specific O/S's (such as 'unix') when functions ALREADY EXIST to identify the O/S and take the appropriate action.
In MY case, I have a proposed task to rewrite some Windows DLLs into rust code, for the obvious reasons of improved safety and the other benefits that rust provides.
Thanks for listening to my coments.
Murray
The text was updated successfully, but these errors were encountered:
The issues you ran into may seem elementary but they would in all likelihood surface many more issues that would need to be resolved in order to support Windows natively. For instance, we'd need a way to generate compile commands on Windows, we'd need to make sure we handle MSVC-specific extensions, and many more issues that I'm not even aware of.
You write that you're running Windows 11 on a 64-bit laptop so in all likelihood you'll be able to successfully compile c2rust if you enable Windows Subsystem for Linux (WSL). Of course that will not let you transpile C code written for Windows – so I realize that WSL might not be a viable workaround for your situation.
Hi @MurraySobol, that above error (#708) was just fixed by #1036, though there are still much deeper issues with Windows. Just wanted to let you know that that trivial error has at least been fixed now.
When I run "cargo install c2rust" on my Windows 11 64-bit laptop I get the following errors:
Compiling c2rust-build-paths v0.18.0
err
or[E0433]: failed to resolve: could not find
unix
inos
--> C:\Users\murra.cargo\registry\src\index.crates.io-6f17d22bba15001f\c2rust-build-paths-0.18.0\src\lib.rs:35:26
|
35 | use std::os::unix::ffi::OsStrExt;
| ^^^^ could not find
unix
inos
Compiling env_logger v0.10.0
error[E0599]: no function or associated item named
from_bytes
found for structOsStr
in the current scope--> C:\Users\murra.cargo\registry\src\index.crates.io-6f17d22bba15001f\c2rust-build-paths-0.18.0\src\lib.rs:37:20
|
37 | OsStr::from_bytes(path)
| ^^^^^^^^^^ function or associated item not found in
OsStr
Can someone PLEASE fix these errors, I KNOW that running on Windows is not you first or highest priorities but these errors (to me) are SO ELEMENTARY that the SHOULD be fixed, regardless of the O/S clients are running on.
I don't believe that the "fix" for this issue is that convoluted or complex, I just don't think any appreciation is being given to this problem.
IMO, it is simply BAD FORM to reference specific O/S's (such as 'unix') when functions ALREADY EXIST to identify the O/S and take the appropriate action.
In MY case, I have a proposed task to rewrite some Windows DLLs into rust code, for the obvious reasons of improved safety and the other benefits that rust provides.
Thanks for listening to my coments.
Murray
The text was updated successfully, but these errors were encountered: