| Crates.io | kobalt |
| lib.rs | kobalt |
| version | 0.0.2 |
| created_at | 2025-11-18 10:42:17.273036+00 |
| updated_at | 2025-11-18 13:30:08.703546+00 |
| description | A declarative UI framework for Rust inspired by Flutter and Jetpack Compose |
| homepage | https://github.com/JhonaCodes/kobalt |
| repository | https://github.com/JhonaCodes/kobalt |
| max_upload_size | |
| id | 1938171 |
| size | 590,548 |
Experimental Project π§ͺ Just a hobby project to learn WGPU and explore UI framework development!
Hey there! This is my personal experiment building a cross-platform UI framework using WGPU. It's mainly for learning, having fun, and seeing what's possible. Don't expect production-ready code here... yet? Maybe never? Who knows! π
Kobalt is a mobile-first UI framework designed for mobile developers who want to use Rust. Think Jetpack Compose or Flutter, but powered by Rust and WGPU.
The goal is to make it mobile developer friendly by using familiar patterns and concepts:
I've been developing mobile applications for several years, and I've been using Rust for about a year now. I'm convinced that Rust could bring a lot to cross-platform development, especially for mobile. So I thought, why not try to create a UI framework? It could be a good starting point, or in the best case scenario, make it into something truly usable.
Why doesn't anyone think about us? π Mobile developers who love Rust and want familiar patterns like Compose or Flutter, but with all the benefits of Rust. We exist! There are dozens of us! DOZENS!
If you dream of seeing Rust powering mobile UIs, welcome! This is going to be fun... and painful. Probably more painful than fun at first, but hey, that's part of the journey! π
Let's see where this experiment takes us.
Very early stages. Mostly just setting up the project structure and learning as I go. This is more of a learning journal than a production framework.
What's working (kinda):
What's not working (yet):
β οΈ Current Reality Check: Right now, this only works on Desktop (Windows, macOS, Linux) using
winit. Mobile support is the dream, but we're starting with desktop to get the foundations right! Baby steps! πΆββοΈβ οΈ Syntax Disclaimer: This is a rough, early prototype of what the syntax might look like. It's super basic and will probably change 100 times before stabilizing (if it ever does!). But hey, it gives you an idea of the direction!
Here's how you'd build a simple Desktop UI with Kobalt's macro-based API (inspired by Flutter/Compose):
use kobalt::prelude::*;
use kobalt_macros::column;
fn main() -> Result<(), Box<dyn std::error::Error>> {
app! {
title: text!("My First Kobalt App"),
size: (800, 600),
background: Color::from_rgb8(20, 20, 30),
home: column! {
main_axis_alignment: MainAxisAlignment::Center,
cross_axis_alignment: CrossAxisAlignment::Center,
padding: EdgeInsets::all(20.0),
children: [
text!("Hello, Kobalt! π", size: 36.0, color: Color::WHITE),
text!("Built with Rust + WGPU", size: 24.0),
text!("Mobile-first UI framework")
]
}
}
}
What you're seeing:
app!, column!, text! for a clean, Flutter-like syntaxmain_axis_alignment, cross_axis_alignment, padding (just like Compose!)size: and color:This is just a taste! The API is evolving, but the goal is to make it feel natural for developers coming from Compose or Flutter.
You can look at it, learn from it, or laugh at my code! But seriously, this is super experimental and changes constantly. Not recommended for anything serious.
MIT - Do whatever you want with it!
Note: This is a hobby project developed for educational purposes. Expect bugs, breaking changes, and long periods of inactivity when life gets busy!