Crates.io | haunted |
lib.rs | haunted |
version | 0.0.1 |
created_at | 2025-06-20 12:14:05.548084+00 |
updated_at | 2025-06-20 12:14:05.548084+00 |
description | A haunted GPU-accelerated UI framework |
homepage | |
repository | https://github.com/raphamorim/boo |
max_upload_size | |
id | 1719508 |
size | 64,380 |
A GPU-accelerated UI framework for Rust, inspired by SwiftUI and built with native Cocoa, Metal, and Swash.
Add to your Cargo.toml
:
[dependencies]
haunted = "0.1"
Create a simple app:
use haunted::{App, ui::*};
use glam::Vec4;
struct MyView;
impl View for MyView {
fn build(&self) -> Vec<Element> {
VStack::new(10.0)
.child(Box::new(Text::new(
"Hello, Haunted!",
24.0,
Vec4::new(1.0, 1.0, 1.0, 1.0),
)))
.child(Box::new(Rectangle::new(
200.0,
100.0,
Vec4::new(0.2, 0.6, 1.0, 1.0),
)))
.build()
}
}
fn main() {
let app = App::new(Box::new(MyView));
app.run();
}
Haunted bypasses winit entirely and uses direct Objective-C bindings for:
This approach provides maximum control and performance while maintaining a pure Rust API.
Run the basic example:
cargo run --example basic
MIT