{"id":39487735,"url":"https://github.com/moliholy/cvmfs-rust","last_synced_at":"2026-04-20T18:01:09.013Z","repository":{"id":152798144,"uuid":"597114962","full_name":"moliholy/cvmfs-rust","owner":"moliholy","description":"A pure Rust implementation of the CernVM-FS client. Mount remote CVMFS repositories as local filesystems via FUSE.","archived":false,"fork":false,"pushed_at":"2026-04-20T02:03:05.000Z","size":402,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-20T02:36:35.993Z","etag":null,"topics":["cern","cvmfs","filesystem","fuse","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moliholy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-02-03T16:59:28.000Z","updated_at":"2026-04-20T02:03:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"da9cd477-d122-40cc-872c-a5f7bbc5a1b6","html_url":"https://github.com/moliholy/cvmfs-rust","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/moliholy/cvmfs-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moliholy%2Fcvmfs-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moliholy%2Fcvmfs-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moliholy%2Fcvmfs-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moliholy%2Fcvmfs-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moliholy","download_url":"https://codeload.github.com/moliholy/cvmfs-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moliholy%2Fcvmfs-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32059139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cern","cvmfs","filesystem","fuse","rust"],"created_at":"2026-01-18T05:28:54.091Z","updated_at":"2026-04-20T18:01:08.996Z","avatar_url":"https://github.com/moliholy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cvmfs-rust\n\n[![Rust](https://github.com/moliholy/cvmfs-rust/actions/workflows/rust.yml/badge.svg)](https://github.com/moliholy/cvmfs-rust/actions/workflows/rust.yml)\n[![codecov](https://codecov.io/gh/moliholy/cvmfs-rust/graph/badge.svg)](https://codecov.io/gh/moliholy/cvmfs-rust)\n[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](LICENSE)\n\nA pure Rust implementation of the [CernVM-FS](https://cernvm.cern.ch/fs) client. Mount remote CVMFS repositories as\nlocal filesystems via FUSE, with full content verification and transparent decompression.\n\n## Why Rust?\n\nThe original CernVM-FS client is written in C++. This project rewrites the client in Rust to get:\n\n- **Memory safety** without garbage collection\n- **Fearless concurrency** for multi-threaded FUSE operations\n- **Modern tooling**: cargo, clippy, built-in testing, dependency management\n- **Smaller binary**: single static binary, no shared library dependencies beyond FUSE\n\n## Features\n\n- FUSE filesystem mounting via `fuse_mt` (multi-threaded)\n- Transparent decompression (zlib, LZ4, Zstd) of content-addressed objects\n- RSA-PKCS1v15 signature verification of repository manifests\n- Whitelist validation (repository name matching + expiry checks)\n- SQLite catalog traversal with nested catalog support\n- Multiple hash algorithms: SHA-1, RIPEMD-160, SHA-256, SHAKE-128\n- Full directory entry metadata: uid/gid, hardlinks, xattr, special file types\n- Chunked file reassembly for large files\n- External data file support (content stored outside CAS)\n- Local object caching with TTL-based invalidation and negative caching\n- Reflog support for tracking historical root catalog hashes\n- HTTP/HTTPS retrieval from Stratum-1 replica servers\n- Mirror failover with automatic retry across multiple sources\n- Geolocation-based server selection via CVMFS geo API\n- DNS-based repository server discovery via TXT records\n\n## Quick Start\n\n### Prerequisites\n\n- Rust (stable)\n- FUSE 3 libraries:\n    - **macOS**: [macFUSE](https://macfuse.github.io/) (`brew install --cask macfuse`)\n    - **Linux**: `sudo apt install libfuse3-dev` (Debian/Ubuntu) or `sudo dnf install fuse3-devel` (Fedora)\n\n### Build\n\n```bash\ngit clone https://github.com/moliholy/cvmfs-rust.git\ncd cvmfs-rust\ncargo build --release\n```\n\n### Mount a Repository\n\n```bash\nmkdir -p /tmp/cvmfs_mount\n./target/release/cvmfs-cli http://cvmfs-stratum-one.cern.ch/opt/boss /tmp/cvmfs_mount\n```\n\nThen browse `/tmp/cvmfs_mount` like any local directory. Unmount with:\n\n```bash\n# macOS\numount /tmp/cvmfs_mount\n\n# Linux\nfusermount -u /tmp/cvmfs_mount\n```\n\n### CLI Reference\n\n```\ncvmfs-cli \u003crepository_url\u003e \u003cmount_point\u003e [cache_directory]\n```\n\n| Argument          | Required | Default      | Description                     |\n|-------------------|----------|--------------|---------------------------------|\n| `repository_url`  | Yes      |              | URL of the CernVM-FS repository |\n| `mount_point`     | Yes      |              | Local directory to mount        |\n| `cache_directory` | No       | `/tmp/cvmfs` | Directory for cached objects    |\n\n### Logging\n\n```bash\nRUST_LOG=info cvmfs-cli http://cvmfs-stratum-one.cern.ch/opt/boss /tmp/cvmfs_mount\n```\n\n## Library Usage\n\n`cvmfs-rust` exposes a library crate for programmatic access:\n\n```rust\nuse cvmfs::{fetcher::Fetcher, repository::Repository};\n\nlet fetcher = Fetcher::new(\"http://cvmfs-stratum-one.cern.ch/opt/boss\", \"/tmp/cache\", true) ?;\nlet mut repo = Repository::new(fetcher) ?;\n\n// List root directory\nfor entry in repo.list_directory(\"/\") ? {\nprintln ! (\"{} ({})\", entry.name, if entry.is_directory() { \"dir\" } else { \"file\" });\n}\n\n// Read a file\nlet mut file = repo.get_file(\"/testfile\") ?;\nlet mut contents = String::new();\nfile.read_to_string( \u0026 mut contents) ?;\n```\n\n### Mirror failover\n\n```rust\nuse cvmfs::fetcher::Fetcher;\n\nlet fetcher = Fetcher::with_mirrors(\n\u0026 [\"http://primary.cern.ch/opt/boss\", \"http://mirror1.cern.ch/opt/boss\"],\n\"/tmp/cache\",\ntrue,\n) ?;\n```\n\n### DNS-based discovery\n\n```rust\nuse cvmfs::dns::discover_servers;\n\nlet servers = discover_servers(\"boss.cern.ch\") ?;\n```\n\n## Benchmarks\n\nBoth implementations mounted via FUSE, benchmarked with [hyperfine](https://github.com/sharkdp/hyperfine) (100 runs, 10\nwarmup). Rust cvmfs-cli v0.2.0, C++ cvmfs2 v2.11.5. Repository: `boss.cern.ch`.\n\n**Result: Rust wins 15/23 benchmarks.**\n\n### Metadata operations\n\n| Operation        | Rust  | C++   | Winner    |\n|------------------|-------|-------|-----------|\n| stat / (root)    | 4.2ms | 4.3ms | Rust +4%  |\n| stat /testfile   | 4.9ms | 4.9ms | Rust +1%  |\n| stat /database   | 4.5ms | 4.6ms | Rust +2%  |\n| stat symlink     | 5.2ms | 3.8ms | C++ +35%  |\n| readlink symlink | 1.0ms | 1.3ms | Rust +21% |\n\n### Directory listing\n\n| Operation                    | Rust  | C++   | Winner    |\n|------------------------------|-------|-------|-----------|\n| ls / (root)                  | 2.3ms | 1.7ms | C++ +35%  |\n| ls /database                 | 1.6ms | 1.8ms | Rust +17% |\n| ls /pacman-3.29              | 1.6ms | 2.1ms | Rust +28% |\n| ls /slc4_ia32_gcc34 (nested) | 1.3ms | 0.7ms | C++ +89%  |\n\n### File reads\n\n| Operation                         | Rust  | C++   | Winner     |\n|-----------------------------------|-------|-------|------------|\n| cat /testfile (50B)               | 1.2ms | 1.2ms | Rust +2%   |\n| head -c 16 offlinedb.db (chunked) | 1.2ms | 2.3ms | Rust +100% |\n| head -c 2 pacman-latest.tar.gz    | 1.2ms | 0.4ms | C++ +166%  |\n| dd seek+read offlinedb.db         | 2.7ms | 2.9ms | Rust +10%  |\n| cat pacman-latest.tar.gz (full)   | 1.8ms | 2.3ms | Rust +23%  |\n\n### Recursive traversal\n\n| Operation                     | Rust   | C++    | Winner    |\n|-------------------------------|--------|--------|-----------|\n| find /pacman-3.29 -maxdepth 1 | 1.6ms  | 3.1ms  | Rust +94% |\n| find /database -type f        | 1.3ms  | 1.3ms  | Rust +1%  |\n| find / -maxdepth 3            | 16.4ms | 10.3ms | C++ +59%  |\n| du -d 2                       | 1.8ms  | 1.8ms  | C++ +3%   |\n\n### Large file I/O (10 runs, 2 warmup)\n\n| Operation                   | Rust   | C++    | Winner   |\n|-----------------------------|--------|--------|----------|\n| md5 run.db (chunked, 410MB) | 643ms  | 694ms  | Rust +8% |\n| cat run.db (chunked, 410MB) | 39.7ms | 41.2ms | Rust +4% |\n\n```bash\nmake bench    # run benchmarks (requires sudo, cvmfs2, hyperfine)\n```\n\n## Development\n\n```bash\nmake test           # run all tests (uses cargo-nextest)\nmake lint           # clippy with -D warnings\nmake fmt            # format with nightly rustfmt\nmake coverage       # generate coverage report\nmake bench          # benchmark Rust vs C++ cvmfs2 (requires sudo)\n```\n\n## License\n\nBSD 3-Clause. See [LICENSE](LICENSE).\n\n## Acknowledgments\n\n- [CernVM-FS](https://github.com/cvmfs/cvmfs) (the original C++ implementation)\n- [CERN](https://home.cern/) for maintaining public Stratum-1 servers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoliholy%2Fcvmfs-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoliholy%2Fcvmfs-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoliholy%2Fcvmfs-rust/lists"}