server & client for working with our images, was rfs before
  • Rust 84.3%
  • Shell 7.1%
  • Vue 6.6%
  • HTML 0.8%
  • TypeScript 0.6%
  • Other 0.5%
Find a file
despiegk 308c52fc32
All checks were successful
Build and Test / build (push) Successful in 7m41s
chore: remove Cargo.lock (library crate, not tracked)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 09:17:48 +02:00
.forgejo/workflows ci: replace removed scripts/build_lib.sh with direct cargo invocations 2026-05-12 14:17:32 +03:00
docs add more tests 2026-04-07 13:28:43 +02:00
frontend update all docs for workspace split (3 binaries) 2026-04-03 13:17:27 +02:00
myfs-core chore: drop rust-version pin (Hero toolchain convention: no MSRV pin) 2026-05-12 14:21:32 +03:00
myfs-hub chore: drop rust-version pin (Hero toolchain convention: no MSRV pin) 2026-05-12 14:21:32 +03:00
myfs-lib chore: drop rust-version pin (Hero toolchain convention: no MSRV pin) 2026-05-12 14:21:32 +03:00
myfs-test-utils chore: drop rust-version pin (Hero toolchain convention: no MSRV pin) 2026-05-12 14:21:32 +03:00
myfs-tool chore: drop rust-version pin (Hero toolchain convention: no MSRV pin) 2026-05-12 14:21:32 +03:00
rhai_examples fix: resolve client/server deserialization bugs, rename myfstool → myfs-tool, fix e2e tests 2026-04-06 18:04:41 +02:00
schema undo different nonce changes 2026-03-04 12:42:20 +02:00
test-website add rfs to myfs renamed 2025-12-29 12:30:25 +02:00
tests fix: resolve client/server deserialization bugs, rename myfstool → myfs-tool, fix e2e tests 2026-04-06 18:04:41 +02:00
.gitignore add rfs to myfs renamed 2025-12-29 12:30:25 +02:00
ACCEPTANCE_MATRIX.md fix: resolve client/server deserialization bugs, rename myfstool → myfs-tool, fix e2e tests 2026-04-06 18:04:41 +02:00
Cargo.toml chore: drop rust-version pin (Hero toolchain convention: no MSRV pin) 2026-05-12 14:21:32 +03:00
docker-compose.yml add rfs to myfs renamed 2025-12-29 12:30:25 +02:00
Dockerfile add rfs to myfs renamed 2025-12-29 12:30:25 +02:00
FEATURE_VERIFICATION.md fix: resolve client/server deserialization bugs, rename myfstool → myfs-tool, fix e2e tests 2026-04-06 18:04:41 +02:00
LICENSE add rfs to myfs renamed 2025-12-29 12:30:25 +02:00
PURPOSE.md chore: add PURPOSE.md, rewrite README, remove Makefile and bash scripts 2026-05-08 06:50:25 +02:00
README.md chore: add PURPOSE.md, rewrite README, remove Makefile and bash scripts 2026-05-08 06:50:25 +02:00

myfs

A flist-based filesystem toolkit and server with deduplicated, content-addressed block storage.

MyFS packages directories and container images into FungiList (flist) metadata, stores blocks in pluggable backends (local, ZDB, S3, HTTP, server), and serves content over HTTP or a read-only FUSE mount.

Overview

MyFS provides:

  • Flist metadata format: SQLite-backed metadata for files, directories, and block references
  • Deduplicated, content-addressed storage: block-based storage with encryption and compression
  • Pluggable stores: local directory, ZDB, S3, HTTP, and server-backed stores
  • Cache + FUSE mount: on-demand file access with local caching
  • Server API + web UI: manage blocks, files, flists, and websites
  • Client utilities: pack/unpack, upload/download, sync, and tracking tools
  • Container conversion: build flists from container images

Architecture

  • Metadata (fungi): flist metadata read/write and traversal
  • Store layer: router abstraction over multiple backends
  • Block layer: encryption + compression wrapping stores
  • Cache: local block cache for reads
  • FUSE filesystem: read-only mount from flists
  • Server: Axum REST API over Unix socket

Crate Layout

Crate Binary Role
myfs-core Core library: fungi, stores, block/cache, server API client
myfs-lib myfs CLI: pack, unpack, mount, upload, download, sync, inspect
myfs-hub myfs-hub HTTP server: REST API, block/file/flist/website serving
myfs-tool myfs-tool Tooling: container conversion, sync, advanced ops
myfs-test-utils Shared test helpers

Running

All lifecycle management uses Nu shell service scripts only:

service myfs start --update --reset
service myfs stop
service myfs status

No Makefiles or bash scripts — Nu shell scripts are the only supported way to build and manage this service.

CLI Usage

# Pack a directory into a flist (and upload blocks)
myfs pack --meta ./rootfs.fl --store-spec <store-url> ./rootfs

# Unpack a flist
myfs unpack --meta ./rootfs.fl ./output

# Mount a flist (read-only FUSE)
myfs mount --meta ./rootfs.fl ./mnt

# Inspect flist contents
myfs flist tree <flist-path-or-hash>
myfs flist inspect <flist-path-or-hash>

# Convert a container image to flist
myfs-tool container --image-name docker.io/library/nginx:latest --store <store-url>

# Upload or download files
myfs upload ./file.txt --server http://localhost:8080 --token <token>
myfs download <hash> --output ./file.txt --server http://localhost:8080

# Sync between servers
myfs-tool sync --source http://localhost:8080 --destination http://localhost:8081 --token <token>

Server

The server (myfs-hub) listens on a Unix socket at ~/hero/var/sockets/myfs/rpc.sock.

Start it via the service script:

service myfs start

Key endpoints:

  • Health: GET /health
  • Service info: GET /.well-known/heroservice.json
  • OpenAPI docs: GET /swagger-ui
  • Flist management: POST /api/v1/fl, GET /api/v1/fl, GET /api/v1/fl/preview/:path
  • Block storage: POST /api/v1/block, GET /api/v1/block/:hash, HEAD /api/v1/block/:hash
  • File storage: POST /api/v1/file, GET /api/v1/file/:hash
  • Auth: POST /api/v1/signin

Building from Source

Prerequisites: Rust 1.92+, Linux.

service myfs install
# or with update + release build:
service myfs install --update --release

FUSE Mount Requirements

# Ubuntu/Debian
sudo apt install fuse3

# Fedora/RHEL
sudo dnf install fuse3

Enable user_allow_other in /etc/fuse.conf:

user_allow_other

Configuration

The server reads a TOML config file. Pass it with:

myfs-hub serve --config-path ./server.toml

Key fields: host, port, store_url, flist_dir, sqlite_path, jwt_secret, users.

Debug Builds — Stack Size

Debug builds require a larger stack due to async + SQLx overhead:

ulimit -s unlimited

Production release builds do not have this requirement.