platform

Backend-neutral desktop windowing, event, surface, and UI input contract for Garnet

garnet-platform

Backend-neutral desktop windowing, event, native-surface, and UI input abstraction for Garnet.

Why this shard exists

Desktop Garnet applications and the Garnet Editor (garnet-scene-data) can run on multiple windowing backends without coupling to any single library:

Host shard Platform Dependencies
garnet-platform-appkit macOS First-party (appkit.cr, zero external C libraries)
garnet-platform-win32 Windows First-party (Win32 DLLs only, zero external C libraries)
garnet-platform-wayland Linux (Wayland) First-party (libwayland-client, libxkbcommon)
garnet-platform-sdl3 macOS, Windows, Linux sdl3.cr (libSDL3)
garnet-platform-glfw macOS, Windows, Linux glfw.cr (libglfw)

Entry points

  • require "garnet-platform" — core contract (Window, WindowHost, WindowOptions, WindowEvent, NativeHandles, HostKind, GraphicsAPI). Depends only on garnet-input.
  • require "garnet-platform/ui_input" — Garnet::Platform::UIInput, routing any Window directly into Garnet::UI::Router (and optional Input::Devices / Input::Actions) with shortcuts, text commands, clipboard, cursors, file drops, and tablet pen support.
  • require "garnet-platform/testing" — Garnet::Platform::MockWindow for deterministic headless specs.
Repository

platform

Owner
Statistic
  • 0
  • 0
  • 0
  • 5
  • 2
  • about 2 hours ago
  • December 6, 2026
License

MIT License

Links
Synced at

Sun, 06 Dec 2026 06:37:10 GMT

Languages