//! CUBELinux-2 Package 3 — `cubefs`: a POSIX namespace over CZYX. //! //! Built NEW from the PDF spec (Package 3, p. "cubefs (filesystem or virtual //! FS)"). Not recycled from the prior `/home/CUBELinux` build, which had no //! filesystem layer at all. //! //! # What the PDF asks for //! //! > Map C/Z/Y/X ranges to top-level directories (C), subdirs (Z,Y) and files //! > (X), or keep the 4-D API but expose FUSE hooks for POSIX compatibility. //! > Use Null cubes/rows for: ACLs, extended attributes, journaling, volume //! > metadata. //! //! # Structure of this crate //! //! * [`path`] — the pure, dependency-free bijection between POSIX paths and //! [`Czyx`] coordinates. This is the part that must be provably correct, so //! it is testable without a kernel mount. //! * [`nullspace`] — the Null-cube control plane: ACLs, xattrs, the journal, //! and volume metadata, each pinned to a documented `C=0` sub-cube. //! * [`vfs`] — the backend-agnostic filesystem operations (lookup, readdir, //! read, write, getattr, xattr, ACL check) expressed over a [`CubeStore`]. //! * `fuse` (feature `mount`) — the thin adapter that translates kernel FUSE //! calls into [`vfs`] calls. Feature-gated so the logic above builds and //! tests anywhere. //! //! # Decision: why a bijection and not an inode table //! //! A conventional FUSE filesystem allocates opaque inode numbers and keeps a //! side table mapping inode -> object. CUBELinux's whole premise is that the //! coordinate *is* the address, so allocating a second, unrelated identifier //! space would reintroduce exactly the indirection the design removes. //! Instead the inode number IS the packed `u32` coordinate (widened to u64), //! so `ino <-> Czyx` is total, stateless, and needs no table. The FUSE root //! inode is required by the kernel to be 1, and `Czyx::unpack_u32(1)` is //! `(0,0,0,1)` — a Null cube, never a user record — so the reservation costs //! us no addressable user space. See [`path::ino_to_czyx`]. #![forbid(unsafe_code)] #![warn(missing_docs)] pub mod backend; pub mod nullspace; pub mod path; pub mod vfs; #[cfg(feature = "mount")] pub mod fuse; pub use backend::DaemonBackend; pub use nullspace::{Acl, JournalEntry, JournalOp, NullSpace, VolumeMeta}; pub use path::{czyx_to_ino, ino_to_czyx, parse_path, render_path, PathError, ROOT_INO}; pub use vfs::{Attr, CubeFs, FsError, Kind};