cargo-slide
Code-driven presentations, rendered natively
Overview
cargo-slide is a presentation engine for people who would rather write a deck than lay one out. Slides are Typst markup; playback is a native Rust runtime on tiny-skia, so there is no browser engine, no Electron and no 60 MB of JavaScript between you and the next slide.
A deck can leave the machine in three shapes: a single executable that runs anywhere, a compressed .slide archive that plays in the viewer, or a static HTML/WASM bundle with no inline JavaScript for the web.
The editor is part of the tool. It renders the slides as vector graphics in the document flow, lets you edit the Typst inline on the canvas with debounced recompilation, and keeps an outline, speaker notes and a pacing estimate beside the deck.
Capabilities
what it doesTypst authoring
Slides are Typst markup, compiled to vector graphics in under a second, with first-class mathematics and reusable macros.
Native playback
A tiny-skia renderer holds 60 FPS without a browser engine or Electron, in a single executable.
WYSIWYG editor
Edit Typst inline on the rendered canvas, with an outline sidebar, insertion bar and debounced live recompilation.
SQL charts
Charts are queried, not drawn: bind a data source and the slide renders from the result set.
Speaker tools
Notes separated from comments, word-count pacing, density analysis and a presenter view.
Three deliverables
A standalone binary, a compressed .slide archive, or a static WASM bundle with no inline JavaScript.
How it works
design notesCompile, then blit
Typst produces SVG, usvg normalises it, and tiny-skia rasterises the result into the window. Playback is a tight loop over prepared pages, which is where the 60 FPS comes from.
Archive format
A .slide file is an LZMA2 archive of the compiled deck plus its assets: about a megabyte for a typical talk, playable without a toolchain.
WASM target
The same runtime compiles to WebAssembly for online talks and embedding, producing a static bundle with no inline JavaScript.
SQL-backed charts
Charts are queried from a data source at build or play time, so a deck can show live numbers instead of a screenshot.
Animation as a trait
Transitions and shader-like effects are implemented as traits, so custom motion lives in Rust next to the deck rather than in a GUI.
Encrypted decks
A PIV token or a software key pair wraps the deck; the archive is decrypted into memory and the key material is zeroized afterwards.
Three deliverables
delivery formats| Format | Size | Runtime requirement |
|---|---|---|
| Standalone binary | ~14–15 MB | none — fully self-contained |
| .slide archive | ~1 MB | slide-viewer |
| WebAssembly bundle | static HTML + WASM | any modern browser |
Install
cargo# install the CLI and editor
cargo install cargo-slide
# scaffold a five-file project and play it
cargo slide init talk
cd talk && cargo slide presentslide-editor provides the WYSIWYG canvas; slide-viewer plays .slide archives on machines without a toolchain.