Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started

Add pebble to your Cargo.toml:

[dependencies]
pebble-engine = "1.0"

It’s imported as pebble:

use pebble::app::App;
use pebble::graphics::GraphicsPlugin;

fn main() {
    App::new()
        .with_logging()
        .add_plugin(GraphicsPlugin::new())
        .run();
}

GraphicsPlugin opens a window, acquires a GPU backend, and registers every built-in asset type. That’s enough to compile and run — an empty window that clears to black every frame. From here:

Running on the web

Pebble also builds for wasm32-unknown-unknown. See Running on the Web.