kobalt-core 0.0.2

Core functionality for Kobalt UI framework - Widget Tree, Layout, State Management, MVVM
Documentation
  • Coverage
  • 72.63%
    69 out of 95 items documented2 out of 54 items with examples
  • Size
  • Source code size: 41.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 682.2 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JhonaCodes

Kobalt Core

Core functionality for the Kobalt UI framework.

Overview

kobalt-core is the heart of the Kobalt framework. It provides all the fundamental building blocks for creating declarative UIs without depending on any specific rendering backend or platform runtime.

Features

  • Widget Tree: Composable widget system for building UIs
  • Layout System: Flexbox-inspired layout engine (Column, Row)
  • State Management: Reactive state with LiveData, ValueNotifier, and ChangeNotifier
  • MVVM Infrastructure: ViewModel patterns for separating business logic
  • Common Types: Primitive types like Size, Rect, Color

Architecture

This crate is:

  • ✅ Platform-agnostic
  • ✅ No WGPU dependency
  • ✅ Testable with cargo test
  • ✅ Portable to any platform

Module Structure

kobalt-core/
├── types.rs          # Common types (Size, Rect, Color)
├── state/            # State management system
│   ├── live_data.rs
│   ├── value_notifier.rs
│   └── change_notifier.rs
├── widget.rs         # Widget tree and composition
├── layout/           # Layout system
│   ├── column.rs
│   ├── row.rs
│   └── flex.rs
└── mvvm/             # MVVM infrastructure
    └── view_model.rs

Usage

use kobalt_core::prelude::*;

// Example usage will be added as implementation progresses

Status

🚧 Under Construction - This crate is in early development.

See the main Kobalt repository for the full roadmap and architecture.