about summary refs log tree commit diff
path: root/tvix/store/Cargo.toml
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-09-26T07·18+0300
committerclbot <clbot@tvl.fyi>2023-09-26T10·03+0000
commit7062fdc132232992abfef716eebac5d979318b27 (patch)
tree42ba6a10e7866e079e5e178517ce7081a6bada50 /tvix/store/Cargo.toml
parent10717605a2ceb736d1c1ad215f8a92ef30dd85c3 (diff)
chore(tvix/store): only depend on vhost-user-fs if virtiofs enabled r/6658
Change-Id: Iaf88d43df27b87548794a8dddc9a1e08279b8ffb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9471
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/store/Cargo.toml')
-rw-r--r--tvix/store/Cargo.toml17
1 files changed, 11 insertions, 6 deletions
diff --git a/tvix/store/Cargo.toml b/tvix/store/Cargo.toml
index 94be3e28638b..202bae1858c5 100644
--- a/tvix/store/Cargo.toml
+++ b/tvix/store/Cargo.toml
@@ -37,11 +37,6 @@ optional = true
 # TODO: Switch back to upstream version once https://github.com/cloud-hypervisor/fuse-backend-rs/pull/153 lands.
 git = "https://github.com/cloud-hypervisor/fuse-backend-rs"
 rev = "402e7c531bc75bc44ac366dc59477de8b5d4ca08"
-# Ideally this would only be enabled if virtiofs is enabled
-# Ex: virtiofs = [..., "fuse-backend-rs/?vhost-user-fs", ...]
-# However, crate2nix doesn't properly understand this syntax and doesn't
-# enable this feature properly.
-features = ["vhost-user-fs"]
 
 [dependencies.vhost]
 optional = true
@@ -87,6 +82,16 @@ tonic-mock = { git = "https://github.com/brainrake/tonic-mock", branch = "bump-d
 [features]
 default = ["fuse", "virtiofs", "reflection"]
 fs = ["dep:libc", "dep:fuse-backend-rs"]
-virtiofs = ["fs", "dep:vhost", "dep:vhost-user-backend", "dep:virtio-queue", "dep:vm-memory", "dep:vmm-sys-util", "dep:virtio-bindings"]
+virtiofs = [
+  "fs",
+  "dep:vhost",
+  "dep:vhost-user-backend",
+  "dep:virtio-queue",
+  "dep:vm-memory",
+  "dep:vmm-sys-util",
+  "dep:virtio-bindings",
+  "fuse-backend-rs?/vhost-user-fs", # impl FsCacheReqHandler for SlaveFsCacheReq
+  "fuse-backend-rs?/virtiofs",
+]
 fuse = ["fs"]
 reflection = ["tonic-reflection"]