Skip to content

Repository files navigation

Rayslides

Design visually. Keep readable source. Present without the cloud.

A polished Rayslides slide with crisp type, rotated media, and a source-to-showtime flow

Rayslides is a visual slide editor and presenter built with Zig and raylib. Edit a deck on the canvas or in its plain-text .sld source. Both views stay in sync.

Rayslides Studio editing that same source-backed showcase

A Rayslides slide with rotated rounded cards, lines, and arrowheads A Rayslides slide with a rotated raster image, SVG, and rotated video poster

With Rayslides, you can:

  • edit slides directly and reuse items;
  • optionally open the whole deck and expanded text, bullet, and speaker-note fields in an embedded Neovim on Linux and macOS;
  • author raster/SVG images, videos, rounded shapes, lines, arrows, aligned text, and rotated objects through source-backed Studio controls;
  • add reveals, transitions, and semantic morph states, authored visually in Studio's Motion tab with a live preview;
  • read private notes and control a deck from a phone;
  • run Crowdplay polls on the local network;
  • preflight the exact deck and create a verified portable show folder;
  • save PNG screenshots and export a PDF; and
  • build native programs for macOS, Linux, and Windows.

Get started

Rayslides requires Zig 0.16.x. The minimum version is Zig 0.16.0.

zig build -Doptimize=ReleaseSafe
zig-out/bin/rayslides

On Linux, including Omarchy, an absolute symlink makes the development build available from any directory while keeping its installed resources discoverable:

mkdir -p ~/.local/bin
ln -s "$PWD/zig-out/bin/rayslides" ~/.local/bin/rayslides

Keep the complete zig-out tree after building. Linux resolves the running executable through the symlink, so Rayslides still finds resources such as zig-out/share/rayslides/nvim when Neovim support is enabled. Rebuilds update the target in place and the symlink continues to work. Ensure ~/.local/bin is on PATH.

Run the program without a file to open Studio's new-deck chooser. Use --studio to edit an existing deck:

zig-out/bin/rayslides --studio talk.sld

Before travel, run Showtime from Studio's Commands menu, write a CI-friendly report, or create a portable copy with ordinary source and assets:

zig-out/bin/rayslides --showtime-report=showtime.json talk.sld
zig-out/bin/rayslides --portable-show=talk-portable talk.sld

Blockers make either command exit nonzero. The portable command refuses an existing destination, rewrites copied asset references under assets/, then re-opens and preflights the copy before it succeeds.

During development, use zig build run -- talk.sld. On macOS, zig build -Doptimize=ReleaseSafe macos-app also creates zig-out/Rayslides.app.

Optional embedded Neovim editor

Linux and macOS builds can include the embedded Neovim overlay:

zig build -Dneovim=true
zig-out/bin/rayslides --studio talk.sld

Rayslides looks for nvim on PATH, in common Linux, Homebrew, and MacPorts locations, and in common user-local, mise, and asdf locations. Open the whole document with Ctrl/Cmd-E or Edit source in Neovim in Studio's Commands palette. Eligible expanded ... editors for item text, multiline bullets, and speaker notes use the same overlay. If support is disabled or Neovim cannot start, those fields retain the built-in editor.

The overlay is a native Neovim external UI rendered by raylib with bundled JetBrains Mono plus the same curated monochrome Noto Emoji fallback used by slide text. Normal modes, the user's configuration and colorscheme, syntax colors, committed Unicode/AltGr text, paste, mouse input, and Vim quit rules apply. While it is open, it owns input: Rayslides shortcuts such as f for fullscreen and D for display selection are suspended. Ctrl-Alt-Shift-F12 force-closes a broken overlay as a last-resort host escape. If a plugin or configuration prevents startup, use the recovery mode:

zig-out/bin/rayslides --neovim-clean --studio talk.sld

Use --neovim-path=PATH to try a specific executable first, --neovim-font=PATH to replace the primary grid face, and --neovim-font-size=PIXELS to choose a size from 10 through 48. The emoji fallback remains the Rayslides-supported set even with a custom primary font.

Inside this controlled buffer, :w validates and applies the source to the in-memory Studio document; it does not write the .sld file. Use Studio Save for that. :wq, :x, and ZZ apply and close, while a rejected edit keeps the overlay open. A clean :q closes, a dirty :q is refused by Neovim, and :q! or ZQ discards changes since the last accepted write and closes. There is no automatic mid-edit apply: Studio changes only after an explicit Neovim write.

The feature remains compile-time opt-in. Builds without it retain the dependency-free stub and built-in editors; use the default or pass -Dneovim=false explicitly. Enabled macOS application bundles include the private syntax runtime and font, but not the Neovim executable itself.

To use Rayslides highlighting in standalone Neovim from the repository root, prepend the private runtime before opening a deck:

nvim --cmd "set runtimepath^=$PWD/src/nvim/runtime" talk.sld

For a permanent setup, prepend the absolute runtime path in init.lua (the installed build places it under zig-out/share/rayslides/nvim):

vim.opt.runtimepath:prepend("/absolute/path/to/rayslides/zig-out/share/rayslides/nvim")

Opening *.sld then reports filetype=rayslides and uses the bundled classic Vim syntax. Neovim's colorscheme supplies the actual colors.

Live camera items

Live camera items use the video renderer and therefore support fitting, cropping, rotation, opacity, morphs, posters, and the existing playback pill:

@box cam=0 video_size=1920x1080 poster_image=assets/camera-off.png x=520 y=180 w=880 h=560 fit=cover rotation=-12

On macOS, run camera decks from the bundled Rayslides.app so the system can request camera permission. On Linux, use the intended V4L2 path such as cam=/dev/video0 or preferably its stable /dev/v4l/by-id/... symlink, and add cam_format=mjpeg to reach a mode the camera offers in MJPEG alone - commonly every mode above 640x480.

Documentation

Project status

Rayslides began as a raylib-based port of renerocksai/slides. It now combines visual editing with its text-based foundation.

About

renerocksai/slides translated to raylib

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages