cvkg-core

cvkg-core defines the fundamental traits, types, and architectural guidelines that power the entire Cyber Viking Kvasir Graph (CVKG) ecosystem.
Boundaries and Responsibilities
This crate provides the abstract definitions for the UI system but does NOT implement specific rendering backends or complex layout algorithms. It focuses on:
- The
Viewtrait and its modifier-based composition system. - Core geometric types (
Rect,Point,Size). - The
Renderertrait facade. - Agentic development protocols and knowledge state structures.
Public API Overview
Core Traits
View: The primary building block. Every UI element implementsView. It uses a declarativebody()method for composition.Renderer: A trait defining the drawing operations available to primitive views.ViewModifier: Enables the extension of view behavior and appearance via composition.
Key Structs
Rect,Size,Point: Fundamental geometry primitives.KnowledgeState: Captures the cognitive state of the agentic system, including thoughts, actions, and temporal nodes.YggdrasilTokens: Authoritative container for design tokens (colors, fonts, spacing).ModifiedView: The type produced when a modifier is applied to aView.
Main Modifiers
.bifrost(): Applies frosted glass effects..gungnir(): Applies neon glow effects..mjolnir_slice(): Applies geometric clipping..padding(),.background(),.frame(): Standard layout and styling modifiers.
Usage Example
use *;
;
Known Limitations
- Modifier order matters; transformations are applied sequentially.
- Recursive view bodies will cause a stack overflow at compile time or runtime if not type-erased.