Merge branch 'decouple-fuse' into 'master'

Split FUSE feature and move redox dependencies

See merge request redox-os/redoxfs!103
This commit is contained in:
Jeremy Soller
2025-11-17 06:53:54 -07:00
4 changed files with 39 additions and 53 deletions
Generated
-41
View File
@@ -185,15 +185,6 @@ dependencies = [
"typenum",
]
[[package]]
name = "deranged"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
dependencies = [
"powerfmt",
]
[[package]]
name = "difflib"
version = "0.4.0"
@@ -377,12 +368,6 @@ version = "2.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
[[package]]
name = "num-conv"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]]
name = "numtoa"
version = "0.2.4"
@@ -432,12 +417,6 @@ dependencies = [
"portable-atomic",
]
[[package]]
name = "powerfmt"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "predicates"
version = "3.1.3"
@@ -551,7 +530,6 @@ dependencies = [
"redox_syscall",
"seahash",
"termion",
"time",
"uuid",
"xts-mode",
]
@@ -661,25 +639,6 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683"
[[package]]
name = "time"
version = "0.3.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d"
dependencies = [
"deranged",
"num-conv",
"powerfmt",
"serde",
"time-core",
]
[[package]]
name = "time-core"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b"
[[package]]
name = "typenum"
version = "1.19.0"
+10 -9
View File
@@ -52,13 +52,10 @@ env_logger = { version = "0.11", optional = true }
getrandom = { version = "0.2.5", optional = true }
humansize = { version = "2", optional = true }
libc = "0.2"
libredox = { version = "0.1.6", features = ["call"], optional = true }
log = { version = "0.4.14", default-features = false, optional = true }
lz4_flex = { version = "0.11", default-features = false, features = ["checked-decode"] }
parse-size = { version = "1", optional = true }
range-tree = { version = "0.1", optional = true }
redox-path = "0.3.0"
redox-scheme = { version = "0.7.0", optional = true }
redox_syscall = "0.5.15"
seahash = { version = "4.1.0", default-features = false }
termion = { version = "4", optional = true }
@@ -66,18 +63,19 @@ uuid = { version = "1.4", default-features = false }
xts-mode = { version = "0.5", default-features = false }
[features]
default = ["std", "log"]
default = ["std", "log", "fuse"]
fuse = [
"fuser",
"std",
]
std = [
"env_logger",
"fuser",
"getrandom",
"humansize",
"libc",
"libredox",
"parse-size",
"range-tree",
"termion",
"time",
"uuid/v4",
"redox_syscall/std",
"redox-scheme",
@@ -85,8 +83,11 @@ std = [
[target.'cfg(not(target_os = "redox"))'.dependencies]
fuser = { version = "0.14", optional = true }
libc = { version = "0.2", optional = true }
time = { version = "0.3", optional = true }
[target.'cfg(target_os = "redox")'.dependencies]
libredox = { version = "0.1.6", features = ["call"], optional = true }
redox-path = "0.3.0"
redox-scheme = { version = "0.7.0", optional = true }
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
+13 -3
View File
@@ -1,11 +1,21 @@
#[cfg(all(not(target_os = "redox"), not(fuzzing)))]
#[cfg(all(not(target_os = "redox"), not(fuzzing), feature = "fuse"))]
mod fuse;
#[cfg(all(not(target_os = "redox"), fuzzing))]
#[cfg(all(not(target_os = "redox"), fuzzing, feature = "fuse"))]
pub mod fuse;
#[cfg(not(target_os = "redox"))]
#[cfg(all(not(target_os = "redox"), feature = "fuse"))]
pub use self::fuse::mount;
#[cfg(all(not(target_os = "redox"), not(fuzzing), not(feature = "fuse")))]
mod stub;
#[cfg(all(not(target_os = "redox"), fuzzing, not(feature = "fuse")))]
pub mod stub;
#[cfg(all(not(target_os = "redox"), not(feature = "fuse")))]
pub use self::stub::mount;
#[cfg(target_os = "redox")]
mod redox;
+16
View File
@@ -0,0 +1,16 @@
use std::{io, path::Path};
use crate::{Disk, filesystem};
pub fn mount<D, P, T, F>(
mut _filesystem: filesystem::FileSystem<D>,
_mountpoint: P,
_callback: F,
) -> io::Result<T>
where
D: Disk,
P: AsRef<Path>,
F: FnOnce(&Path) -> T,
{
Err(io::Error::new(io::ErrorKind::Unsupported, "FUSE mount feature is disabled"))
}