Github Crates.io Documentation

Quicksilver allows you to create 2D applications targeting Windows, macOS, Linux, and the Web all from the same codebase, using only Rust.

What's included?

A Quick Example

// Example: The Square
// Open a window, and draw a colored square in it
use quicksilver::{
    geom::{Rectangle, Vector},
    run, Graphics, Input, Result, Settings, Window,

fn main() {
        Settings {
            title: "Square Example",

async fn app(window: Window, mut gfx: Graphics, mut input: Input) -> Result<()> {
    // Clear the screen to a blank, white color
    // Paint a blue square with a red outline in the center of our screen
    // It should have a top-left of (350, 100) and a size of (150, 100)
    let rect = Rectangle::new(Vector::new(350.0, 100.0), Vector::new(100.0, 100.0));
    gfx.fill_rect(&rect, Color::BLUE);
    gfx.stroke_rect(&rect, Color::RED);
    // Send the data to be drawn
    loop {
        while let Some(_) = input.next_event().await {}

View the examples in your browser

Thanks to the magic of WebAssembly, if your browser supports both WebAssembly and WebGL, then you can view the examples online with no plugins required.