Skip to main content

Crate hypen_engine

Crate hypen_engine 

Source
Expand description

§Hypen Engine

Core reactive rendering engine for the Hypen UI framework.

This crate provides the platform-agnostic runtime that powers Hypen’s declarative UI model. It parses Hypen DSL, maintains a virtual tree, tracks reactive dependencies, and emits minimal Patch operations when state changes.

§Public API

The primary types for SDK authors and application developers:

  • Engine — Native Rust engine (for embedding in Rust applications)
  • EngineError — Structured error type for all engine operations
  • Patch — UI mutation operations emitted by the engine
  • Element / Value — IR building blocks for custom components
  • Module / ModuleInstance — Stateful module management
  • StateChange — Path-based state change notifications

For WASM/JavaScript usage, see the wasm module (enabled via the js feature).

§Internal Modules

The following modules are exported for advanced use and testing but are not part of the stable API. Their signatures may change between minor versions:

ir, reactive, reconcile, dispatch, render, serialize

Re-exports§

pub use engine::Engine;
pub use error::EngineError;
pub use ir::ast_to_ir_node;
pub use ir::Element;
pub use ir::IRNode;
pub use ir::Value;
pub use lifecycle::Module;
pub use lifecycle::ModuleInstance;
pub use reconcile::Patch;
pub use state::StateChange;

Modules§

dispatch
Action and event dispatching.
engine
error
Error types for Hypen Engine operations.
ir
lifecycle
Module and component lifecycle management.
reactive
Reactive dependency tracking and expression evaluation.
reconcile
Tree reconciliation and patch generation.
serialize
Serialization for the Remote UI protocol.
state
Efficient state management using path-based change notifications
wasm
WASM/WASI interface for Hypen Engine

Macros§

log_debug
log_error
log_info
log_trace
Convenience macros for logging
log_warn