Skip to content

Overview and package map ​

lys-lib holds the lys family's building blocks that are not widgets: what lys-ui draws with and what lys-shell talks to the system through. The other family members import it too. It is a library: there is no binary to run, and each package is imported on its own.

Install ​

sh
go get github.com/stubbedev/lys-lib@main

The family tracks main, and the v0.1.0 tag is far behind it. The Go version is the one in go.mod. The packages are written for Linux: DRM, dmabufs, Wayland, PipeWire and V4L2.

Signatures live in the API reference and in go doc. These pages say what each package is for and how the pieces fit.

Pure Go ​

Everything builds with CGO_ENABLED=0. A native library loads at run time through purego only where the system is the one that provides the API:

LibraryLoaded byIf it is missing
libvulkan.so.1third_party/vk, for gpugpu.Open fails with ErrNoVulkan, and the caller draws on the CPU with render
libva.so.2, libva-drm.so.2internal/va, for the gpu encoderOptional. VA-API stays off, and gpu.Encoder needs the device's Vulkan video queue instead

LYS_LIBVULKAN names another Vulkan loader, and a build can pin one (see vk).

Test support loads two more through clib: libpipewire-0.3.so.0 in pipewire/pwtest and libei.so.1 in eis's tests. They are the reference clients the code is checked against, and pipewire and eis themselves link neither.

Package map ​

Rendering and GPU ​

PackageWhat it is
renderThe 2D canvas and its CPU rasterizer
textWord and grapheme motion, bidirectional runs
gpuVulkan devices, the GPU renderer, exportable dmabufs
motionThe spring and cubic-bezier solvers both animation engines share
drm, fourcc, edidDRM ioctls, pixel formats and modifiers, a display's identity
dmabuf, dmabufwl, udmabuf, dmabufprobedmabuf descriptions, their protocol plumbing, memfd-backed allocation, modifier probing

Wayland ​

PackageWhat it is
captureScreen and window capture on a private connection
vinput, keymapfdVirtual pointer and keyboard input, reading a keymap fd
xcursorXcursor files and cursor themes resolved through XCURSOR_PATH and Inherits
xkbThe XKB keyboard model in pure Go: keymaps in both text formats, keyboard state, keysyms, Compose, X11 keymap import and the ruleset registry
wlrProtocol bindings beyond the core and xdg-shell
third_party/waylandThe core client library and the scanner

Media ​

PackageWhat it is
gpu.EncoderH.264 and H.265 hardware encoding
media/muxMP4 and Matroska muxing
media/opusThe Opus encoder
audiomixSums 16-bit PCM sources into one stream
v4l2Webcam capture

System services ​

PackageWhat it is
pipewireA ScreenCast video producer over PipeWire's native protocol
eisAn EIS server, the receiving end of libei
dbusxD-Bus services on patched godbus
portaldialogsThe dev.stubbe.lys.PortalDialogs1 contract
clib, intconv, atomicfile, xdg, peercred, debugSmall helpers every process shares

Test support ​

golden, gputest, wltest, pipewire/pwtest, dbustest, sockdir are importable from other modules' tests.

Third party ​

third_party/ carries patched copies of godbus, Go's math, oksvg, rasterx, go-text/typesetting, x/image/vector, the Vulkan bindings and the Wayland client library, as packages of this module.

Released under the MIT License.