Skip to main content

Module memory

Module memory 

Source
Expand description

In-memory HashMap backend.

For development and tests: holds everything in process memory, no persistence, no hardware backing. The structure mirrors the compartment design from TODO.finalize/12-keystore-interface.md:

  • outer map keyed by (module_id, app_id)
  • each entry has two inner maps:
    • private: key_id → *mut c_void
    • public: identity → (*mut c_void, Vec<u8> signature)

Key handles are opaque *mut c_void; the backend does not interpret them. Ownership of the underlying memory stays with whoever produced the handle (typically the Engine’s keyfmt interface).

Structs§

MemoryBackend
Factory for the in-memory backend. Stateless — all state lives in MemoryInstance.
MemoryInstance