Skip to main content

Crate combs_mesh

Crate combs_mesh 

Source
Expand description

§combs-mesh — CombsMesh emoji engine core

Pure-Rust, wasm32-friendly implementation of the CombsMesh emoji spec: an emoji is a typed bag of blocks (text, sprite atlas, todos, functions, APIs, lifecycle, character, emotion, encryption, orchestration) that can be serialized two ways —

  • .cmse binary (EmojiExporter::to_binary): CMSE container with a block directory, CRC32 integrity, and optional per-block AEAD encryption at rest driven by the Enc block + a KeyRing.
  • Unicode envelope (EmojiExporter::to_unicode): self-describing PUA plane 15/16 + tag-char encoding for text-only channels.

Plus: a content-addressed Registry, CPU sprite rendering behind the Renderer trait, and the CombsEngineCore trait the C ABI crate binds to (with DefaultEngine as the standalone implementation).

Deliberate constraints: no GPU/inference deps (the optional engine feature pulls combs-runtime only for infer), no C dependencies (RustCrypto everywhere, algorithm-compatible with @combs/zerotrust), and every reader of external data is panic-free.

Re-exports§

pub use blocks::ApiBlock;
pub use blocks::ApiEndpoint;
pub use blocks::Block;
pub use blocks::BlockTag;
pub use blocks::CharacterBlock;
pub use blocks::DirectiveKind;
pub use blocks::EmotionBlock;
pub use blocks::EmotionState;
pub use blocks::EncryptionAlgorithm;
pub use blocks::EncryptionBlock;
pub use blocks::FunctionBlock;
pub use blocks::FunctionDef;
pub use blocks::FunctionKind;
pub use blocks::ImageBlock;
pub use blocks::LifecycleBlock;
pub use blocks::LifecycleState;
pub use blocks::LifecycleTransition;
pub use blocks::OrchestrationBlock;
pub use blocks::OrchestrationDirective;
pub use blocks::SpriteAtlas;
pub use blocks::TextBlock;
pub use blocks::TodoBlock;
pub use blocks::TodoItem;
pub use blocks::TodoStatus;
pub use codepoint::decode_blocks;
pub use codepoint::encode_blocks;
pub use codepoint::tag_char;
pub use codepoint::tag_from_char;
pub use crypto::DEFAULT_HKDF_INFO;
pub use crypto::KeyRing;
pub use engine::Emoji;
pub use engine::EmojiBuilder;
pub use engine::EmojiExporter;
pub use engine::Registry;
pub use engine::RegistryEntry;
pub use engine::sprites;
pub use error::MeshError;
pub use error::Result;
pub use ffi_trait::CombsEngineCore;
pub use ffi_trait::DefaultEngine;
pub use ffi_trait::EngineError;
pub use render::CpuRenderer;
pub use render::Renderer;

Modules§

blocks
The 10 typed block payloads that make up an crate::Emoji.
codepoint
Unicode transport encoding — embeds an emoji’s blocks in a plain String that survives text-only channels (chat, MCP tool results).
crypto
Key management + AEAD encryption (pure Rust — RustCrypto, no C deps, so wasm32 and mobile cross-builds stay clean; same algorithms as @combs/zerotrust’s WebCrypto stack).
engine
The emoji model + the three ways to move it around: build (EmojiBuilder), serialize (EmojiExporter), store (Registry), plus sprite helpers.
error
Error type shared by every combs-mesh subsystem.
ffi_trait
The CombsEngineCore trait — the contract the C ABI crate (combs-mesh-ffi) binds to — plus DefaultEngine, the standalone implementation that ships with this crate.
render
Sprite rendering.