> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apich.org/llms.txt
> Use this file to discover all available pages before exploring further.

# cargo-slide

> Code-driven presentation engine pairing Typst typesetting with a 60 FPS tiny-skia native Rust runtime.

**cargo-slide** pairs [Typst](https://typst.app/) typesetting with a native Rust playback runtime built on `tiny-skia`, rendering vector decks at 60 FPS with zero browser or Electron dependencies.

> [!NOTE]
>
> For the complete CLI subcommand reference, keyboard shortcuts, and Rust animation trait docs, see [docs.rs/cargo-slide](https://docs.rs/cargo-slide) and the [GitHub README](https://github.com/Apich-Organization/cargo-slide).

> [card] [Full API Reference](https://docs.rs/cargo-slide)
>
> Generated rustdoc for `cargo-slide`, `slide-core`, `slide-player`, and `slide-theme`.

> [card] [Project Homepage](https://apich.org/projects/cargo-slide/)
>
> Delivery formats, presenter features, and Open Collective budget on apich.org.

> [card] [GitHub Repository](https://github.com/Apich-Organization/cargo-slide)
>
> 7-crate workspace, WYSIWYG editor, universal viewer, and reference showcase.

## Compilation & Delivery Pipeline

```mermaid theme={null}
flowchart LR
    Typst["slides.typ + theme.typ + slide.typ"] -->|"Typst CLI -> SVG"| Core["slide-core (SlideDeck + SQL/DSL charts + Crypto)"]
    Core --> Binary["Standalone Binary (~14–15 MB)"]
    Core --> Archive[".slide Archive (~1 MB LZMA2) -> slide-viewer"]
    Core --> WASM["Leptos WASM Bundle (zero inline JS) -> slide-web"]
```

### Three Delivery Formats

| Format | Target Use Case | Typical Size | Runtime Requirement |
| - | - | - | - |
| **Standalone Binary** | Production talks on trusted machines | \~14–15 MB | None (fully self-contained) |
| **`.slide` Archive** | Sharing via email, chat, or USB | \~1 MB (LZMA2) | `slide-viewer` |
| **WebAssembly CSR** | Online talks & static web hosting | Static HTML + WASM | Any modern browser |

## Workspace Structure

| Crate | Role |
| - | - |
| `crates/slide-core/` | Deck model (`SlideDeck`, `Slide`, `Hotspot`, `StepFragment`), Typst/SVG pipeline, SQL/DSL engine, and deck encryption |
| `crates/slide-player/` | Native 60 FPS `tiny-skia` / `minifb` runtime, 13 transitions, 4-brush whiteboard, laser pointer, audio DSP (`rodio`), anti-dump/anti-debug |
| `crates/slide-theme/` | Built-in slide themes, palettes, aspect ratios, and Typst helper macros |
| `crates/cargo-slide/` | Cargo subcommand CLI (`init`, `edit`, `run`, `dev`, `check`, `build`, `pack`, `export`, `serve`, `cross`) |
| `crates/slide-viewer/` | Universal desktop viewer with OS file-association installer (`.desktop`, `.app`, Windows Registry) |
| `crates/slide-editor/` | Multi-window Typora-style WYSIWYG editor with inline Typst editing, outline sidebar, pacing engine, and health audit |
| `crates/slide-web/` | Pure-Rust Leptos WebAssembly CSR player with client-side decryption and TTL `sessionStorage` tokens |

## Key Capabilities

* **Presenter Tools**: 4-brush whiteboard (`Pen`, `Highlighter`, `Neon`, `Arrow`), 14-color palette, animated laser pointer, audio DSP mixing, 13 built-in transitions (`fade`, `cube`, `particles`, etc.), and `#step` fragment reveals.
* **Interactive SQL Charts & HUD Inspector**: Query `.csv`, `.json`, or `.db` (SQLite) datasets directly in Typst markup (`sql:` or `dsl:`); click any chart during playback to switch chart types or apply transforms (`TOP 5`, `CUM`, `% SHARE`, `MA3`) and export CSV.
* **Defense-in-Depth Encryption**: Supports YubiKey PIV hardware tokens (`9d`/`9c` slots) or software P-256 + AES-256-GCM keystores (PBKDF2-HMAC-SHA512 / BIP-39 mnemonic), zero-disk RAM unpacking (`mlock` / `VirtualLock`), anti-debug checks, and `Zeroize` drop guards.

## Quick Example

```typst Typst SQL Chart (slides.typ) theme={null}
#chart(
  data: "assets/telemetry.db",
  sql: "SELECT service, p99_latency FROM traces WHERE p99_latency > 50 ORDER BY p99_latency DESC",
  type: "bar",
  title: "High-Latency Microservices"
)
```

```bash CLI Workflow theme={null}
cargo slide init my-talk
cd my-talk
cargo slide edit          # WYSIWYG desktop editor
cargo slide run           # 60 FPS native playback
cargo slide pack --encrypt --auth passphrase -o talk.slide
```


## Related topics

- [Quickstart](https://docs.apich.org/quickstart.md)
- [Stack Architecture & Project Map](https://docs.apich.org/guides/architecture.md)
- [Security Policy & Release Standards](https://docs.apich.org/guides/security-and-releases.md)
- [Apich Organization Documentation](https://docs.apich.org/index.md)
- [rssn](https://docs.apich.org/projects/rssn.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.