vce-engine 0.1.1

The generic state substrate of the Virtual Computing Engine (VCE)
Documentation
#![warn(missing_docs)]

//! The generic state substrate for the Virtual Computing Engine.
//!
//! This crate implements the **Engine** layer of the Virtual Computing
//! Engine. It provides generic mechanisms only: object identity,
//! metadata, a filesystem, detached namespaces, generic authorization, and a
//! synchronous event system. It must never know about processes, networking,
//! firewalls, package managers, or any operating system.
//!
//! The OS layer (not part of this crate) gives these mechanisms meaning.
//!
//! # Modules
//!
//! - [`core`] — object identity, object kinds, metadata, virtual time.
//! - [`filesystem`] — the generic filesystem tree, paths, detached namespaces.
//! - [`security`] — principals/actors, generic authorization mechanisms.
//! - [`events`] — the synchronous event system and event bus.
//! - [`io`] — generic input/output primitives (streams, pipes, and the
//!   interactive terminal interface).
//! - [`engine`] — the [`Engine`] facade combining everything.
//!
//! # Event model
//!
//! A state mutation commits atomically, then synchronously dispatches its
//! event chain. Listeners observe the completed state and may
//! re-enter the Engine (for example, to derive state). Dispatch never holds
//! the store lock, so listener re-entry is safe.
//!
//! # Time
//!
//! The shared timeline is monotonic once seeded: it only ever moves
//! forward ([`VirtualClock::set`] asserts this in debug builds). Work that
//! must *appear* asynchronous (a background job) runs under
//! [`Engine::suspend_time`], which books the virtual time it consumes
//! against that work instead of moving the machine-wide clock backwards.

pub mod core;
pub mod engine;
pub mod error;
pub mod events;
pub mod filesystem;
pub mod io;
pub mod security;

pub use crate::core::metadata::{Metadata, MetadataPatch, MetadataValue, Name};
pub use crate::core::object::ObjectKind;
pub use crate::core::object_id::{Id, ObjectId};
pub use crate::core::time::{Clock, HostClock, Timestamp, VirtualClock};
pub use crate::engine::{CreateOptions, Engine};
pub use crate::error::Error;
pub use crate::events::event::{EventData, ObjectEvent};
pub use crate::events::event_bus::EventBus;
pub use crate::events::event_type::EventType;
pub use crate::events::subscription::SubscriptionId;
pub use crate::filesystem::detached_namespace::DetachedNamespace;
pub use crate::filesystem::path::VirtualPath;
pub use crate::io::{
    BytesInput, BytesOutput, EmptyInput, Input, InputError, InputMode, Key, KeyEvent, Output,
    OutputError, Pipe, SinkOutput, Size, StringInput, Terminal,
};
pub use crate::security::actor::ActorId;
pub use crate::security::authorization::{
    AuthorizationData, AuthorizationPolicy, AuthorizationRequest, AuthorizationResult, Operation,
    ParentReference, PermissivePolicy,
};