about summary refs log tree commit diff
path: root/tvix/store/src/fuse
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-05-28T07·32+0200
committerflokli <flokli@flokli.de>2023-06-10T15·33+0000
commitb3ca1a78eb780e427a85dd1bbe1c649f998dee65 (patch)
tree1604d8c6d18a1ba72d745c3286c0f009014b86b5 /tvix/store/src/fuse
parent365937cd08879098f53edcf42695271deaccfb23 (diff)
feat(tvix/store): add mount command to entrypoint and fuse mod r/6263
`tvix-store mount PATH` will mount the tvix-store to the given path.

Change-Id: Icb82a6b3cb8a22eec856c375a28ae5580403833f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8665
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/store/src/fuse')
-rw-r--r--tvix/store/src/fuse/mod.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/tvix/store/src/fuse/mod.rs b/tvix/store/src/fuse/mod.rs
new file mode 100644
index 000000000000..a93f482ebff6
--- /dev/null
+++ b/tvix/store/src/fuse/mod.rs
@@ -0,0 +1,24 @@
+use crate::{
+    blobservice::BlobService, directoryservice::DirectoryService, pathinfoservice::PathInfoService,
+};
+
+pub struct FUSE<BS: BlobService, DS: DirectoryService, PS: PathInfoService> {
+    blob_service: BS,
+    directory_service: DS,
+    path_info_service: PS,
+}
+
+impl<BS: BlobService, DS: DirectoryService, PS: PathInfoService> FUSE<BS, DS, PS> {
+    pub fn new(path_info_service: PS, directory_service: DS, blob_service: BS) -> Self {
+        Self {
+            blob_service,
+            path_info_service,
+            directory_service,
+        }
+    }
+}
+
+impl<BS: BlobService, DS: DirectoryService, PS: PathInfoService> fuser::Filesystem
+    for FUSE<BS, DS, PS>
+{
+}