about summary refs log tree commit diff
path: root/tvix/store/Cargo.toml
diff options
context:
space:
mode:
authorConnor Brewster <cbrewster@hey.com>2023-09-23T00·45-0500
committerConnor Brewster <cbrewster@hey.com>2023-09-25T17·41+0000
commitf8746fcab0d6cbd6d9e7a49ce2217f858151a476 (patch)
tree5d1f66dda725b8ae0bc5c6d8ec7ab430bf9955f1 /tvix/store/Cargo.toml
parent1b3d6975ed8c2a19f1e7f4f39a564cdfa387f0b6 (diff)
feat(tvix/store): Support listening on UNIX domain sockets r/6653
This adds support for listening on UNIX domain sockets via the
tokio-listener crate. The crate will automatically determine whether to
start a TCP or UNIX domain socket server based on the listen address.

Unfortunately, it's not compatible with tonic right out of the box so I
added some wrapper types to implement the necessary traits to make
things work. We should investigate upstreaming a `tonic` option to the
tokio-listener crate which implements the relevant `tonic` traits.

Example:
```
$ tvix-store daemon -l /run/tvix-store.sock
INFO tvix_store: tvix-store listening on /run/tvix-store.sock

$ tvix-store mount -l /mnt/tvix --blob-service-addr grpc+unix:///run/tvix-store.sock --directory-service-addr grpc+unix:///run/tvix-store.sock --path-info-service-addr grpc+unix:///run/tvix-store.sock

$ ls /mnt/tvix
```

Change-Id: I91c4a4b0c5a177b3b90e6c01a4e5d263130e6bdb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9429
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/store/Cargo.toml')
-rw-r--r--tvix/store/Cargo.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/store/Cargo.toml b/tvix/store/Cargo.toml
index 20909221c5..05b3f4c863 100644
--- a/tvix/store/Cargo.toml
+++ b/tvix/store/Cargo.toml
@@ -30,6 +30,7 @@ tracing-subscriber = { version = "0.3.16", features = ["json"] }
 tvix-castore = { path = "../castore" }
 url = "2.4.0"
 walkdir = "2.4.0"
+tokio-listener = { version = "0.2.1" }
 
 [dependencies.fuse-backend-rs]
 optional = true