Skip to main content
Otter Shell v0.13.0 applications use shared libraries written in otr. Each component’s implementation lives in its otr/ directory. Examples from src/*.zig use a different API. Libraries are source dependencies for developers, not separate desktop applications. Each package declares its dependencies and build options in otr.toml.

Library map

Imports and ownership

Import leaf modules, such as otter_geo.rect, otter_conf.loader, or otter_render.command_list. There is no package-wide root barrel. Native function names generally use snake_case. Use std.Env and explicit std.Io parameters where required. Do not install the Zig global I/O singleton. Resource values own their strings, lists, mappings, or service handles; call their consuming deinit() once. Frame-scoped ref struct values borrow data rather than keeping raw pointers.

Optional packages

  • otter_wayland_core (otter-wayland/otr/core/) serves protocol-only applications without renderer or xkbcommon dependencies. Use it instead of, not alongside, otter_wayland.
  • otter_desktop_pipewire (otter-desktop/otr/pipewire/) supplies audio and video integration separately from otter_desktop.
  • otter_ui_volume (otter-ui/otr/volume/) wires the UI volume widget to PipeWire.
  • Per-library Lua bindings live in separate otr/lua/ packages. A native library dependency does not automatically expose a Lua module or link LuaJIT.

Build options

otr options use -D name=value, not Zig’s -Doptimize=ReleaseFast syntax. Read the consuming package’s manifest before choosing options.

Source and checks

Each library is an independent repository under git.pika-os.com/otter-shell. Use its v0.13.0 otr/ source and otr/API.md where provided. Public declarations and consumer checks are the final authority if a migration note is stale. From a component repository root, otr run otr/build.otr --release-fast -- check runs its API and formatting checks. Other steps depend on the component: read otr/build.otr before running tests, E2E fixtures, or benchmarks. Run graphical verification only in an isolated headless environment, never against your live desktop.