Stebalien / xattr

Extended attribute library for rust.
Apache License 2.0
57 stars 20 forks source link

Fails to compile on win32 #33

Open ctron opened 1 year ago

ctron commented 1 year ago

Trying to compile, with defaults enabled, fails on windows:

Having:

xattr = "1"

Results in:

error[E0433]: failed to resolve: could not find `unix` in `os`
 --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\xattr-1.0.0\src\util.rs:4:14
  |
4 | use std::os::unix::ffi::OsStrExt;
  |              ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\xattr-1.0.0\src\lib.rs:36:14
   |
36 | use std::os::unix::io::AsRawFd;
   |              ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
 --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\xattr-1.0.0\src\sys\unsupported.rs:3:14
  |
3 | use std::os::unix::io::RawFd;
  |              ^^^^ could not find `unix` in `os`

error[E0432]: unresolved import `UnsupportedPlatformError`
 --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\xattr-1.0.0\src\sys\unsupported.rs:6:5
  |
6 | use UnsupportedPlatformError;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^ no external crate `UnsupportedPlatformError`

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `xattr` due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
Stebalien commented 11 months ago

Hm. I didn't really consider windows when I made this crate. I'll see what I can do but it could be a while till I get to it.

damooo commented 10 months ago

It would be helpful to have windows support too, so that one can use same abstraction for native apps.

Stebalien commented 10 months ago

So, I can't support windows as extended attributes aren't a thing there (NTFS has "alternative streams", which is quite different). However, I can let the platform be treated as supported.

I'll bump the priority on this, but, if you have time, a patch would be appreciated.