feat(part): implement fuse support for linux clipboard

Signed-off-by: 蔡略 <cailue@bupt.edu.cn>
This commit is contained in:
蔡略
2023-09-04 15:38:53 +08:00
parent c25d648321
commit 4f7036a405
8 changed files with 1702 additions and 22 deletions

156
Cargo.lock generated
View File

@@ -243,7 +243,7 @@ dependencies = [
"parking_lot",
"thiserror",
"winapi 0.3.9",
"x11rb",
"x11rb 0.10.1",
]
[[package]]
@@ -932,11 +932,20 @@ name = "clipboard"
version = "0.1.0"
dependencies = [
"cc",
"dashmap",
"fuser",
"hbb_common",
"lazy_static",
"libc",
"parking_lot",
"percent-encoding",
"rand 0.8.5",
"rayon",
"serde 1.0.163",
"serde_derive",
"thiserror",
"utf16string",
"x11-clipboard",
]
[[package]]
@@ -1375,6 +1384,19 @@ dependencies = [
"cc",
]
[[package]]
name = "dashmap"
version = "5.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
dependencies = [
"cfg-if 1.0.0",
"hashbrown 0.14.0",
"lock_api",
"once_cell",
"parking_lot_core",
]
[[package]]
name = "dasp"
version = "0.11.0"
@@ -2212,6 +2234,21 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
[[package]]
name = "fuser"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21370f84640642c8ea36dfb2a6bfc4c55941f476fcf431f6fef25a5ddcf0169b"
dependencies = [
"libc",
"log",
"memchr",
"page_size",
"pkg-config",
"smallvec",
"zerocopy",
]
[[package]]
name = "futures"
version = "0.3.28"
@@ -2422,6 +2459,16 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "gethostname"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177"
dependencies = [
"libc",
"winapi 0.3.9",
]
[[package]]
name = "getrandom"
version = "0.2.9"
@@ -2842,6 +2889,12 @@ dependencies = [
"ahash",
]
[[package]]
name = "hashbrown"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
[[package]]
name = "hbb_common"
version = "0.1.0"
@@ -3122,7 +3175,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg 1.1.0",
"hashbrown",
"hashbrown 0.12.3",
]
[[package]]
@@ -3559,9 +3612,9 @@ checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f"
[[package]]
name = "lock_api"
version = "0.4.9"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
dependencies = [
"autocfg 1.1.0",
"scopeguard",
@@ -4133,9 +4186,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.17.1"
version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "opaque-debug"
@@ -4162,7 +4215,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a"
dependencies = [
"dlv-list",
"hashbrown",
"hashbrown 0.12.3",
]
[[package]]
@@ -4210,6 +4263,16 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "page_size"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b7663cbd190cfd818d08efa8497f6cd383076688c49a391ef7c0d03cd12b561"
dependencies = [
"libc",
"winapi 0.3.9",
]
[[package]]
name = "pam"
version = "0.7.0"
@@ -4300,15 +4363,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
version = "0.9.7"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
dependencies = [
"cfg-if 1.0.0",
"libc",
"redox_syscall 0.2.16",
"redox_syscall 0.3.5",
"smallvec",
"windows-sys 0.45.0",
"windows-targets 0.48.0",
]
[[package]]
@@ -4354,9 +4417,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
[[package]]
name = "percent-encoding"
version = "2.2.0"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]]
name = "phf"
@@ -6211,7 +6274,7 @@ dependencies = [
"futures-io",
"futures-sink",
"futures-util",
"hashbrown",
"hashbrown 0.12.3",
"pin-project-lite",
"slab",
"tokio",
@@ -6500,6 +6563,15 @@ dependencies = [
"log",
]
[[package]]
name = "utf16string"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b62a1e85e12d5d712bf47a85f426b73d303e2d00a90de5f3004df3596e9d216"
dependencies = [
"byteorder",
]
[[package]]
name = "utf8parse"
version = "0.2.1"
@@ -7194,6 +7266,15 @@ dependencies = [
"pkg-config",
]
[[package]]
name = "x11-clipboard"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b41aca1115b1f195f21c541c5efb423470848d48143127d0f07f8b90c27440df"
dependencies = [
"x11rb 0.12.0",
]
[[package]]
name = "x11-dl"
version = "2.21.0"
@@ -7211,11 +7292,24 @@ version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507"
dependencies = [
"gethostname",
"gethostname 0.2.3",
"nix 0.24.3",
"winapi 0.3.9",
"winapi-wsapoll",
"x11rb-protocol",
"x11rb-protocol 0.10.0",
]
[[package]]
name = "x11rb"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a"
dependencies = [
"gethostname 0.3.0",
"nix 0.26.2",
"winapi 0.3.9",
"winapi-wsapoll",
"x11rb-protocol 0.12.0",
]
[[package]]
@@ -7227,6 +7321,15 @@ dependencies = [
"nix 0.24.3",
]
[[package]]
name = "x11rb-protocol"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc"
dependencies = [
"nix 0.26.2",
]
[[package]]
name = "xdg-home"
version = "1.0.0"
@@ -7310,6 +7413,27 @@ dependencies = [
"zvariant",
]
[[package]]
name = "zerocopy"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3b9c234616391070b0b173963ebc65a9195068e7ed3731c6edac2ec45ebe106"
dependencies = [
"byteorder",
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f7f3a471f98d0a61c34322fbbfd10c384b07687f680d4119813713f72308d91"
dependencies = [
"proc-macro2 1.0.63",
"quote 1.0.27",
"syn 2.0.15",
]
[[package]]
name = "zip"
version = "0.6.5"