opendal icon indicating copy to clipboard operation
opendal copied to clipboard

ofs: support MacOS platform target

Open oowl opened this issue 3 months ago • 3 comments

Current states:

╰─$ cargo build
    Updating crates.io index
  Downloaded cstr v0.2.11
  Downloaded http-body v1.0.0
  Downloaded trait-make v0.1.0
  Downloaded trim-in-place v0.1.7
  Downloaded tower-layer v0.3.2
  Downloaded cfg_aliases v0.1.1
  Downloaded async-notify v0.3.0
  Downloaded memoffset v0.9.0
  Downloaded parking v2.2.0
  Downloaded http-body-util v0.1.1
  Downloaded which v6.0.1
  Downloaded zeroize v1.7.0
  Downloaded rust-ini v0.21.0
  Downloaded bincode v1.3.3
  Downloaded async-trait v0.1.79
  Downloaded rustls-pki-types v1.4.0
  Downloaded concurrent-queue v2.4.0
  Downloaded errno v0.3.8
  Downloaded either v1.9.0
  Downloaded bitflags v2.4.2
  Downloaded tokio-rustls v0.25.0
  Downloaded event-listener v4.0.3
  Downloaded crossbeam-utils v0.8.19
  Downloaded smallvec v1.13.2
  Downloaded hyper-rustls v0.26.0
  Downloaded fuse3 v0.7.1
  Downloaded hyper-util v0.1.3
  Downloaded reqsign v0.15.0
  Downloaded http v1.1.0
  Downloaded base64 v0.22.0
  Downloaded tower v0.4.13
  Downloaded hyper v1.2.0
  Downloaded reqwest v0.12.2
  Downloaded rustls-webpki v0.102.2
  Downloaded webpki-roots v0.26.1
  Downloaded rustls v0.22.3
  Downloaded rustix v0.38.31
  Downloaded nix v0.28.0
  Downloaded nix v0.27.1
  Downloaded chrono v0.4.35
  Downloaded 40 crates (3.2 MB) in 1.97s
   Compiling libc v0.2.153
   Compiling syn v2.0.48
   Compiling rustls-pki-types v1.4.0
   Compiling http v1.1.0
   Compiling rustls v0.22.3
   Compiling zeroize v1.7.0
   Compiling smallvec v1.13.2
   Compiling tower-layer v0.3.2
   Compiling crossbeam-utils v0.8.19
   Compiling bitflags v2.4.2
   Compiling memoffset v0.9.0
   Compiling rustix v0.38.31
   Compiling cfg_aliases v0.1.1
   Compiling async-trait v0.1.79
   Compiling http-body v1.0.0
   Compiling hashbrown v0.14.3
   Compiling http-body-util v0.1.1
   Compiling ordered-multimap v0.7.1
   Compiling nix v0.28.0
   Compiling webpki-roots v0.26.1
   Compiling parking v2.2.0
   Compiling trim-in-place v0.1.7
   Compiling rust-ini v0.21.0
   Compiling chrono v0.4.35
   Compiling concurrent-queue v2.4.0
   Compiling base64 v0.22.0
   Compiling event-listener v4.0.3
   Compiling tokio-macros v2.2.0
   Compiling futures-macro v0.3.30
   Compiling serde_derive v1.0.196
   Compiling tracing-attributes v0.1.27
   Compiling pin-project-internal v1.1.4
   Compiling signal-hook-registry v1.4.1
   Compiling getrandom v0.2.12
   Compiling num_cpus v1.16.0
   Compiling socket2 v0.5.5
   Compiling mio v0.8.10
   Compiling futures-util v0.3.30
   Compiling ring v0.17.7
   Compiling tokio v1.36.0
   Compiling rand_core v0.6.4
   Compiling cpufeatures v0.2.12
   Compiling pin-project v1.1.4
   Compiling rand_chacha v0.3.1
   Compiling errno v0.3.8
   Compiling rand v0.8.5
   Compiling tracing v0.1.40
   Compiling rustls-webpki v0.102.2
   Compiling serde v1.0.196
   Compiling sha1 v0.10.6
   Compiling sha2 v0.10.8
   Compiling either v1.9.0
   Compiling clap_derive v4.5.0
   Compiling futures v0.3.30
   Compiling which v6.0.1
   Compiling trait-make v0.1.0
   Compiling async-notify v0.3.0
   Compiling cstr v0.2.11
   Compiling nix v0.27.1
   Compiling clap v4.5.1
   Compiling hyper v1.2.0
   Compiling tower v0.4.13
   Compiling tokio-rustls v0.25.0
   Compiling tokio-util v0.7.10
   Compiling backon v0.4.3
   Compiling serde_urlencoded v0.7.1
   Compiling quick-xml v0.31.0
   Compiling hyper-util v0.1.3
   Compiling serde_json v1.0.113
   Compiling uuid v1.7.0
   Compiling bincode v1.3.3
   Compiling fuse3 v0.7.1
   Compiling hyper-rustls v0.26.0
   Compiling reqwest v0.12.2
   Compiling reqsign v0.15.0
error[E0432]: unresolved import `helper::mode_from_kind_and_perm`
  --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/lib.rs:30:18
   |
30 | pub use helper::{mode_from_kind_and_perm, perm_from_mode_and_kind};
   |                  ^^^^^^^^^^^^^^^^^^^^^^^
   |                  |
   |                  no `mode_from_kind_and_perm` in `helper`
   |                  help: a similar name exists in the module: `perm_from_mode_and_kind`
   |
note: found an item that was configured out
  --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/helper.rs:30:14
   |
30 | pub const fn mode_from_kind_and_perm(kind: FileType, perm: u16) -> u32 {
   |              ^^^^^^^^^^^^^^^^^^^^^^^
   = note: the item is gated behind the `linux` feature
note: found an item that was configured out
  --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/helper.rs:39:14
   |
39 | pub const fn mode_from_kind_and_perm(kind: FileType, perm: u16) -> u32 {
   |              ^^^^^^^^^^^^^^^^^^^^^^^

error[E0432]: unresolved import `crate::helper::mode_from_kind_and_perm`
  --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/reply.rs:9:5
   |
9  | use crate::helper::mode_from_kind_and_perm;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `mode_from_kind_and_perm` in `helper`
   |
note: found an item that was configured out
  --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/helper.rs:30:14
   |
30 | pub const fn mode_from_kind_and_perm(kind: FileType, perm: u16) -> u32 {
   |              ^^^^^^^^^^^^^^^^^^^^^^^
   = note: the item is gated behind the `linux` feature
note: found an item that was configured out
  --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/helper.rs:39:14
   |
39 | pub const fn mode_from_kind_and_perm(kind: FileType, perm: u16) -> u32 {
   |              ^^^^^^^^^^^^^^^^^^^^^^^
help: a similar name exists in the module
   |
9  | use crate::helper::perm_from_mode_and_kind;
   |                    ~~~~~~~~~~~~~~~~~~~~~~~
help: consider importing this unresolved item through its public re-export instead
   |
9  | use crate::mode_from_kind_and_perm;
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0599]: no method named `mount_with_unprivileged` found for struct `raw::session::Session` in the current scope
   --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/path/session.rs:38:14
    |
37  | /         raw::Session::new(self.mount_options)
38  | |             .mount_with_unprivileged(bridge, mount_path)
    | |             -^^^^^^^^^^^^^^^^^^^^^^^ method not found in `Session<_>`
    | |_____________|
    |
    |
   ::: /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/session.rs:216:1
    |
216 |   pub struct Session<FS> {
    |   ---------------------- method `mount_with_unprivileged` not found for this struct

error[E0599]: no method named `mount` found for struct `raw::session::Session` in the current scope
   --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/path/session.rs:52:14
    |
51  | /         raw::Session::new(self.mount_options)
52  | |             .mount(bridge, mount_path)
    | |             -^^^^^ method not found in `Session<_>`
    | |_____________|
    |
    |
   ::: /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/session.rs:216:1
    |
216 |   pub struct Session<FS> {
    |   ---------------------- method `mount` not found for this struct

error[E0004]: non-exhaustive patterns: type `&ConnectionMode` is non-empty
   --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/connection/tokio.rs:127:15
    |
127 |         match &self.mode {
    |               ^^^^^^^^^^
    |
note: `ConnectionMode` defined here
   --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/connection/tokio.rs:164:6
    |
164 | enum ConnectionMode {
    |      ^^^^^^^^^^^^^^
    = note: the matched value is of type `&ConnectionMode`
    = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
127 ~         match &self.mode {
128 +             _ => todo!(),
129 +         }
    |

error[E0004]: non-exhaustive patterns: type `&ConnectionMode` is non-empty
   --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/connection/tokio.rs:147:15
    |
147 |         match &self.mode {
    |               ^^^^^^^^^^
    |
note: `ConnectionMode` defined here
   --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/connection/tokio.rs:164:6
    |
164 | enum ConnectionMode {
    |      ^^^^^^^^^^^^^^
    = note: the matched value is of type `&ConnectionMode`
    = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
147 ~         match &self.mode {
148 +             _ => todo!(),
149 +         }
    |

   Compiling opendal v0.45.1 (/Users/ouyangjun/code/opendal/core)
error[E0425]: cannot find function `mode_from_kind_and_perm` in this scope
    --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/session.rs:2995:29
     |
2995 |                     r#type: mode_from_kind_and_perm(entry.kind, 0) >> 12,
     |                             ^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `perm_from_mode_and_kind`
     |
    ::: /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/helper.rs:45:1
     |
45   | pub const fn perm_from_mode_and_kind(kind: FileType, mode: mode_t) -> u16 {
     | ------------------------------------------------------------------------- similarly named function `perm_from_mode_and_kind` defined here

error[E0425]: cannot find function `mode_from_kind_and_perm` in this scope
    --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/session.rs:3912:33
     |
3912 |                         r#type: mode_from_kind_and_perm(entry.kind, 0) >> 12,
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `perm_from_mode_and_kind`
     |
    ::: /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/helper.rs:45:1
     |
45   | pub const fn perm_from_mode_and_kind(kind: FileType, mode: mode_t) -> u16 {
     | ------------------------------------------------------------------------- similarly named function `perm_from_mode_and_kind` defined here

error[E0063]: missing fields `crtime` and `flags` in initializer of `raw::reply::FileAttr`
  --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/path/reply.rs:52:9
   |
52 |         crate::raw::reply::FileAttr {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `crtime` and `flags`

error[E0308]: mismatched types
  --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/connection/tokio.rs:71:48
   |
71 |     pub fn new(unmount_notify: Arc<Notify>) -> io::Result<Self> {
   |            ---                                 ^^^^^^^^^^^^^^^^ expected `Result<FuseConnection, Error>`, found `()`
   |            |
   |            implicitly returns `()` as its body has no tail or `return` expression
   |
   = note:   expected enum `std::result::Result<FuseConnection, std::io::Error>`
           found unit type `()`

error[E0063]: missing fields `crtime`, `crtimensec` and `flags` in initializer of `fuse_attr`
  --> /Users/ouyangjun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuse3-0.7.1/src/raw/reply.rs:56:9
   |
56 |         fuse_attr {
   |         ^^^^^^^^^ missing `crtime`, `crtimensec` and `flags`

Some errors have detailed explanations: E0004, E0063, E0308, E0425, E0432, E0599.
For more information about an error, try `rustc --explain E0004`.
error: could not compile `fuse3` (lib) due to 11 previous errors

oowl avatar Mar 28 '24 12:03 oowl