tvl-depot/tvix/store/Cargo.toml
Florian Klink f499d2e031 feat(tvix/store): fix ctrl-c handling on mount command
This enables the tokio `signal` feature, and registers a ctrl_c signal
handler, which will use the unmount handle to unmount in case a ctrl-c
signal is received.

This avoids having disconnected mountpoints when Ctrl-C'ing a
`tvix-store mount` invocation.

In case the filesystem is unmounted externally (via `umount /path/to/
mountpoint`), the future is waiting for the signal is never resolved and
the task is stopped.

Change-Id: I149f705a6cb50188177f2a6c6a5fcd77218e2a3f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9218
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2023-09-05 21:13:49 +00:00

57 lines
1.3 KiB
TOML

[package]
name = "tvix-store"
version = "0.1.0"
edition = "2021"
[dependencies]
anyhow = "1.0.68"
blake3 = { version = "1.3.1", features = ["rayon", "std"] }
clap = { version = "4.0", features = ["derive", "env"] }
count-write = "0.1.0"
data-encoding = "2.3.3"
lazy_static = "1.4.0"
nix-compat = { path = "../nix-compat" }
prost = "0.11.2"
rayon = "1.6.1"
sha2 = "0.10.6"
sled = { version = "0.34.7", features = ["compression"] }
thiserror = "1.0.38"
tokio-stream = "0.1.14"
tokio = { version = "1.28.0", features = ["net", "rt-multi-thread", "signal"] }
tonic = "0.8.2"
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.16", features = ["json"] }
walkdir = "2.4.0"
tokio-util = { version = "0.7.8", features = ["io", "io-util"] }
tower = "0.4.13"
futures = "0.3.28"
bytes = "1.4.0"
smol_str = "0.2.0"
serde_json = "1.0"
url = "2.4.0"
[dependencies.fuser]
optional = true
version = "0.12.0"
[dependencies.tonic-reflection]
optional = true
version = "0.5.0"
[dependencies.libc]
optional = true
version = "0.2.144"
[build-dependencies]
prost-build = "0.11.2"
tonic-build = "0.8.2"
[dev-dependencies]
test-case = "2.2.2"
tempfile = "3.3.0"
tonic-mock = { git = "https://github.com/brainrake/tonic-mock", branch = "bump-dependencies" }
[features]
default = ["fuse", "reflection"]
fuse = ["dep:fuser", "dep:libc"]
reflection = ["tonic-reflection"]