From e79815dda9ec26af4eeb4c6a5454ded90385da64 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 27 Oct 2024 13:40:09 +0100 Subject: fix(tvix/castore/fs): fix build for MacOS fuse_backend_rs::api::filesystem::Layer is not exposed for non-Linux, and feature-flagged on virtiofs, so only implement the trait for these cases. Change-Id: Id8455dc5be502f8375836ba04288d50c59d69d89 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12693 Reviewed-by: Ilan Joselevich Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/castore/src/fs/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tvix') diff --git a/tvix/castore/src/fs/mod.rs b/tvix/castore/src/fs/mod.rs index 58e01355e96d..4f50868b8f44 100644 --- a/tvix/castore/src/fs/mod.rs +++ b/tvix/castore/src/fs/mod.rs @@ -24,7 +24,7 @@ use crate::{ use bstr::ByteVec; use fuse_backend_rs::abi::fuse_abi::{stat64, OpenOptions}; use fuse_backend_rs::api::filesystem::{ - Context, FileSystem, FsOptions, GetxattrReply, Layer, ListxattrReply, ROOT_ID, + Context, FileSystem, FsOptions, GetxattrReply, ListxattrReply, ROOT_ID, }; use futures::StreamExt; use parking_lot::RwLock; @@ -300,7 +300,8 @@ const ROOT_NODES_BUFFER_SIZE: usize = 16; const XATTR_NAME_DIRECTORY_DIGEST: &[u8] = b"user.tvix.castore.directory.digest"; const XATTR_NAME_BLOB_DIGEST: &[u8] = b"user.tvix.castore.blob.digest"; -impl Layer for TvixStoreFs +#[cfg(all(feature = "virtiofs", target_os = "linux"))] +impl fuse_backend_rs::api::filesystem::Layer for TvixStoreFs where BS: BlobService + Clone + Send + 'static, DS: DirectoryService + Send + Clone + 'static, -- cgit 1.4.1