Skip to main content

Module filesystem

Module filesystem 

Source
Expand description

Filesystem backend.

Persists key material as opaque byte blobs in a compartmentalised directory tree rooted at <root> (configured via the Options key "root", default ~/.local/share/confium/store/).

<root>/
  <module_id>/
    <app_id>/
      private/
        <key_id>           # raw key bytes (opaque to Confium)
      public/
        <identity>         # raw key bytes
        <identity>.sig     # detached identity signature

Key handles (*mut c_void) are treated as opaque byte containers. On put_*, the backend dereferences the caller’s *mut Box<Vec<u8>> and writes the inner bytes. On get_*/enumerate, it reads bytes from disk and returns a freshly Box::into_raw-ed Box<Vec<u8>>. This keeps the opaque-pointer contract from crate::backend::StoreInstance intact while giving the filesystem backend concrete bytes to persist. When the keyfmt interface (TODO #11) lands, the translation between its FFIKey and these byte blobs will move into a codec layer; the directory layout is stable.

Structs§

FilesystemBackend
Factory for the filesystem backend. Stateless; all mutable state lives in FilesystemInstance.
FilesystemInstance

Constants§

OPT_ROOT
Options key naming the store root directory.