combinatory FUSE library + cmdfs implementation
  • Rust 99.2%
  • Nix 0.8%
Find a file
2026-06-02 00:49:05 -04:00
src add clap CLI parser to transfuse-bin 2026-05-16 17:13:33 -04:00
transfuse-bin add clap CLI parser to transfuse-bin 2026-05-16 17:13:33 -04:00
.gitignore async fuse server skeleton 2025-12-07 18:01:00 -05:00
Cargo.lock add clap CLI parser to transfuse-bin 2026-05-16 17:13:33 -04:00
Cargo.toml add clap CLI parser to transfuse-bin 2026-05-16 17:13:33 -04:00
flake.lock nix: upgrade rustc 2026-06-02 00:49:05 -04:00
flake.nix nix flake 2026-05-16 17:22:42 -04:00
README.md readme 2026-05-16 18:07:20 -04:00

transfuse

transfuse is a Rust library for combining virtual filesystems in useful ways.

For example, to mirror the contents of images, but only its png files, and serve them under /mnt using FUSE:

use transfuse::mix::{filter_files, mirror};
use transfuse::mount::mount;
use transfuse::server::serve;

#[tokio::main]
async fn main() -> io::Result<()> {
  let images = mirror("images");
  let png_only = filter_files(extension("png"), images);

  let mount = mount("/mnt").await?;
  serve(mount.fuse_fd, png_only).await?
}

The FUSE implementation is original and does not depend on libfuse.

transfuse also provides a binary for dynamically transforming the contents of a directory, similar to cmdfs:

  tf --to opus --from flac ~/mnt ~/Music -- opusenc --bitrate 128 --music - -

The command passed after -- will have source files with the matching extension piped to its stdin, and its stdout will be piped to any reader of the resulting file. Transcoded files will appear to have a size of 0, and will be non-seekable when opened.

Please tell me how to get this computer program as soon as possible

If you're cool: nix shell git+https://git.maulne.net/maulne/transfuse.

or just clone and cargo build --release of course.