| Crates.io | graphiclity |
| lib.rs | graphiclity |
| version | 0.2.0 |
| created_at | 2026-01-01 09:47:29.091572+00 |
| updated_at | 2026-01-08 18:15:03.626237+00 |
| description | A Minimal Graphics Library |
| homepage | |
| repository | |
| max_upload_size | |
| id | 2015979 |
| size | 467,735 |
Graphiclity is a minimal graphics library that makes drawing pixels to a window simple.
If you've ever tried to draw pixels to a window in Rust for example, for a CHIP-8 emulator you know the pain. Using iced or egui often feels like overkill, while wgpu + winit feels far too low-level.
Graphiclity exists to bridge that gap.
It provides a small, immediate-mode drawing API on top of a window and render loop, without forcing a UI framework or architectural style.
iced or eguiwgpuIf you need those things, Graphiclity is probably not the right tool and that’s okay, it doesn't have to be.
run() and start drawinguse graphiclity::{run, Color};
fn main() {
run(|ctx| {
let g = ctx.graphics();
g.clear(Color::WHITE);
g.rect(50, 50, 100, 100, Color::BLACK);
});
}

use graphiclity::Color;
fn main() {
let mut pos = Vec2 { x: 50, y: 50 };
let mut vel = Vec2 { x: 2, y: 3 };
let size = Vec2 { x: 20, y: 20 };
graphiclity::run_with(conf, move |ctx| {
let dt = ctx.delta_time();
let g = ctx.graphics();
pos.x += (vel.x as f64 * dt * 60.0) as i32;
pos.y += (vel.y as f64 * dt * 60.0) as i32;
let (width, height) = g.logical_size();
if pos.x <= 0 || pos.x + size.x >= width as i32 {
vel.x = -vel.x;
}
if pos.y <= 0 || pos.y + size.y >= height as i32 {
vel.y = -vel.y;
}
g.clear(Color::WHITE);
g.rect(pos, size, Color::rgb(128, 23, 255));
g.text((10, 10), "Graphiclity v0.2.0", Color::CYAN);
g.text((10, height as i32 - 20), format!("Pos: {}, {}", pos.x, pos.y), Color::BLACK);
});
}

Internally, Graphiclity handles:
You control what is drawn. Graphiclity handles how it appears on screen.
Graphiclity is designed to be the first mile of graphics in Rust.
It favors:
Drawing a rectangle should not require hundreds of lines of setup.
Graphiclity is currently under heavy development. APIs may change as the library is refined through real-world use.
Any Kind of Contributions are welcome! From Extending to Changing out the Core check out the CONTRIBUTING.md