Skip to content

Commit f025216

Browse files
committed
Add SimpleFilesystem
1 parent b238873 commit f025216

10 files changed

+625
-22
lines changed

clients/filesystem-fuse/.cargo/config.toml

-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@
1616
# under the License.
1717

1818
[build]
19-
target-dir = "build"
2019
rustflags = ["-Adead_code", "-Aclippy::redundant-field-names"]

clients/filesystem-fuse/Cargo.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ name = "gvfs-fuse"
3030
path = "src/main.rs"
3131

3232
[lib]
33-
name="gvfs_fuse"
33+
name = "gvfs_fuse"
3434

3535
[dependencies]
3636
async-trait = "0.1"
3737
bytes = "1.6.0"
38-
futures-util = "0.3.30"
38+
dashmap = "6.1.0"
3939
fuse3 = { version = "0.8.1", "features" = ["tokio-runtime", "unprivileged"] }
40+
futures-util = "0.3.30"
41+
libc = "0.2.168"
4042
log = "0.4.22"
4143
tokio = { version = "1.38.0", features = ["full"] }
4244
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }

clients/filesystem-fuse/Makefile

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
.EXPORT_ALL_VARIABLES:
19+
20+
.PHONY: build
21+
build:
22+
cargo build --all-features --workspace
23+
24+
fmt:
25+
cargo fmt --all
26+
27+
cargo-sort: install-cargo-sort
28+
cargo sort -w
29+
30+
check-fmt:
31+
cargo fmt --all -- --check
32+
33+
check-clippy:
34+
#cargo clippy --all-targets --all-features --workspace -- -D warnings
35+
cargo clippy --all-targets --all-features --workspace --
36+
37+
install-cargo-sort:
38+
cargo install cargo-sort@1.0.9
39+
40+
check-cargo-sort: install-cargo-sort
41+
cargo sort -c
42+
43+
install-cargo-machete:
44+
cargo install cargo-machete
45+
46+
cargo-machete: install-cargo-machete
47+
cargo machete
48+
49+
install-taplo-cli:
50+
cargo install taplo-cli@0.9.0
51+
52+
fix-toml: install-taplo-cli
53+
taplo fmt
54+
55+
check-toml: install-taplo-cli
56+
taplo check
57+
58+
check: check-fmt check-clippy check-cargo-sort check-toml cargo-machete
59+
60+
doc-test:
61+
cargo test --no-fail-fast --doc --all-features --workspace
62+
63+
unit-test: doc-test
64+
cargo test --no-fail-fast --lib --all-features --workspace
65+
66+
test: doc-test
67+
cargo test --no-fail-fast --all-targets --all-features --workspace
68+
69+
clean:
70+
cargo clean

clients/filesystem-fuse/build.gradle.kts

+18-14
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,34 @@ val buildRustProject by tasks.registering(Exec::class) {
3232
dependsOn(checkRustEnvironment)
3333
description = "Compile the Rust project"
3434
workingDir = file("$projectDir")
35-
commandLine("bash", "-c", "cargo build --release")
35+
commandLine("bash", "-c", "make build")
3636
}
3737

3838
val checkRustProject by tasks.registering(Exec::class) {
3939
dependsOn(checkRustEnvironment)
4040
description = "Check the Rust project"
4141
workingDir = file("$projectDir")
4242

43-
commandLine(
44-
"bash",
45-
"-c",
46-
"""
47-
set -e
48-
echo "Checking the code format"
49-
cargo fmt --all -- --check
50-
51-
echo "Running clippy"
52-
cargo clippy --all-targets --all-features --workspace -- -D warnings
53-
""".trimIndent()
54-
)
43+
commandLine( "bash", "-c", "make check")
5544
}
5645

5746
val testRustProject by tasks.registering(Exec::class) {
5847
dependsOn(checkRustEnvironment)
5948
description = "Run tests in the Rust project"
6049
group = "verification"
6150
workingDir = file("$projectDir")
62-
commandLine("bash", "-c", "cargo test --release")
51+
commandLine("bash", "-c", "make test")
52+
53+
standardOutput = System.out
54+
errorOutput = System.err
55+
}
56+
57+
val cleanRustProject by tasks.registering(Exec::class) {
58+
dependsOn(checkRustEnvironment)
59+
description = "Run tests in the Rust project"
60+
group = "verification"
61+
workingDir = file("$projectDir")
62+
commandLine("bash", "-c", "make clean")
6363

6464
standardOutput = System.out
6565
errorOutput = System.err
@@ -85,3 +85,7 @@ tasks.named("check") {
8585
tasks.named("test") {
8686
dependsOn(testRustProject)
8787
}
88+
89+
tasks.named("clean") {
90+
dependsOn(cleanRustProject)
91+
}

0 commit comments

Comments
 (0)