| Crates.io | htk |
| lib.rs | htk |
| version | |
| created_at | 2026-01-25 20:05:39.442441+00 |
| updated_at | 2026-01-25 20:20:11.697151+00 |
| description | Wayland, Skia, Yoga GUI SDK written in Rust |
| homepage | https://github.com/stevenstarr/sdk |
| repository | https://github.com/stevenstarr/sdk |
| max_upload_size | |
| id | 2069431 |
| size | 0 |
A comprehensive, cross-platform graphics rendering and GUI toolkit library for Rust, built with Skia, Yoga, and Wayland.
⚠️ Alpha software HDK is currently in alpha. APIs are unstable, features are incomplete, and breaking changes should be expected between releases. This project is intended for early adopters, experimentation, and contributors.
HDK is a modern Rust library providing:
sdk/
├── modules/
│ ├── lib.rs # Main library entry point
│ ├── core/ # Application lifecycle
│ ├── graphics2d/ # 2D graphics rendering
│ ├── gui/ # GUI framework core
│ ├── math/ # Mathematics utilities
│ └── widgets/ # UI widget components
├── examples/ # Example applications
├── assets/ # Resources (fonts, images)
└── Cargo.toml # Project configuration
Add to your Cargo.toml:
[dependencies]
htk = "0.1.0"
use htk::prelude::*;
use htk::{ApplicationWindow, Label, VBox};
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create the application window
let mut window = ApplicationWindow::builder()
.title("Hello HTK")
.default_width(400)
.default_height(300)
.build();
// Show the window
window.present();
// Run the widget loop and build the UI
window.run_widget_loop(|| {
let mut root = VBox::new(0);
let label = Label::builder()
.label("Hello, World!")
.build();
root.append(label);
Box::new(root)
})?;
Ok(())
}
cargo run --example interactive_window_demo
By default, this example enables visual layout debugging, displaying layout bounds and guides to assist with UI development and debugging.
To run the example without visual layout debugging, use release mode:
cargo run --release --example interactive_window_demo
Release builds disable layout visual debugging and render a clean UI output.
cargo build --release
The library is organized into modular components:
Build and view the documentation locally:
cargo doc --open
Licensed under the Apache License, Version 2.0. See the LICENSE file for details.