Skip to main content

Crate fs_core

Crate fs_core 

Source
Expand description

In-memory filesystem implementation shared by every Monaka component.

A single Fs type is exposed in two flavours via the thread-safe feature flag:

  • thread-safe (requires std): backed by DashMap plus Arc<RwLock<Inode>>, used by host-side wasmtime integrations that need Send + Sync.
  • default: backed by RefCell<HashMap> or RefCell<BTreeMap> plus Rc<RefCell<Inode>>, used by the WASI components.

Both flavours share one &self API, so consumers only need to pick the feature flag that matches their target.

Modules§

snapshot
Snapshot serialization/deserialization for filesystem persistence.

Macros§

debug
error
info
trace
warn

Structs§

BlockStorage
Fs
Main filesystem structure. See the module-level comment for an overview of the two storage flavours.
Inode
Inode structure representing a file or directory
Metadata
MonotonicCounter
A simple monotonic counter for timestamps.

Enums§

FileContent
File content: either file data or directory entries
FsError

Constants§

BLOCK_SIZE
Block size for storage (4KB)
O_APPEND
O_CREAT
O_RDONLY
File open flags
O_RDWR
O_TRUNC
O_WRONLY

Traits§

TimeProvider

Type Aliases§

Fd
File descriptor type
InodeId
Inode identifier type