| Crates.io | clew-desktop |
| lib.rs | clew-desktop |
| version | 0.0.1 |
| created_at | 2026-01-03 19:18:24.915033+00 |
| updated_at | 2026-01-03 19:18:24.915033+00 |
| description | Desktop application runner for the clew UI framework. |
| homepage | |
| repository | https://github.com/sysint64/clew |
| max_upload_size | |
| id | 2020690 |
| size | 103,565 |
Desktop application runner for the clew UI framework.
Provides window management, input handling, and event loop integration using winit.
use clew_desktop::{Application, ApplicationDelegate, WindowManager, WindowDescriptor};
struct MyApp;
impl ApplicationDelegate<()> for MyApp {
fn on_start(&mut self, window_manager: &mut WindowManager<Self, ()>) {
window_manager.spawn_window(
MainWindow::new(),
WindowDescriptor {
title: "My App".to_string(),
width: 800,
height: 600,
resizable: true,
fill_color: ColorRgb::from_hex(0x121212),
},
);
}
fn create_renderer(window: Arc<winit::window::Window>) -> Box<dyn Renderer> {
// Use clew-vello or clew-tiny-skia
Box::new(
VelloRenderer::new(
window.clone(),
window.inner_size().width,
window.inner_size().height,
)
.block_on(),
)
}
}
fn main() -> anyhow::Result<()> {
Application::run_application(MyApp)
}
Currently tested on macOS only.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.