Skip to Content
PunktfunkPunktfunk

Code map

Which crate, client or package holds what, how the crate groups depend on each other, and where to start for a given change.

Find the directory a change belongs in. Rust crates sit in crates/<group>/, the apps people install in clients/, and everything written in TypeScript at the top level.

The crate groups and what each may depend on

A group may also use what the groups below it use. client and host never depend on each other; scripts/ci/check-crate-groups.py fails CI if one does.

Where to start

To changeStart in
A message or number on the wirecrates/core/punktfunk-core/src/quic/; every number is in quic/v2/registry.rs
Packets, error correction or encryptioncrates/core/punktfunk-core/src/{packet,fec,crypto.rs}
What a session does on the hostcrates/host/punktfunk-host/src/native.rs and native/
Support for another compositorcrates/host/pf-vdisplay, one backend per compositor behind VirtualDisplay
An encoder backendcrates/host/pf-encode; the Encoder trait is in pf-encode-core
A capture sourcecrates/host/pf-capture; the contract is docs/adr/0001
How input reaches the desktopcrates/host/pf-inject
A management API routecrates/host/punktfunk-host/src/mgmt/, then the checklist
A host settingcrates/host/pf-host-config, the settings registry
The web consoleweb/
The desktop clients' stream windowcrates/client/pf-presenter; the overlay and gamepad UI are pf-console-ui
The decode laddercrates/client/pf-client-video
Text a person readsl10n/messages, never a literal in code (docs/l10n.md)

Shared by host and clients

PathWhat
crates/core/punktfunk-coreWire format, FEC, crypto, pacing and the QUIC control plane (quic feature)
crates/core/pf-dmabufdmabuf fence wait and read-only mapping (Linux)
crates/core/pf-update-checkThe signed update manifest
crates/core/pf-fluentWinUI theme colours and motion for the Windows client and installer
crates/codec/pf-bitstreamAccess-unit parsing and decode plans for H.264, HEVC and AV1
crates/codec/pf-vkdecode, pf-vaapi, pf-dxvadecNative decoders: Vulkan Video, VAAPI, D3D11VA
crates/codec/pf-libvaThe libva that the VAAPI decoder and encoder share, loaded at run time
crates/codec/pf-v4l2, pf-v4l2decV4L2 decode: the ioctl half, and the decoder flows a CPU can test
crates/codec/pyrowave-sys, libvpl-sysVendored PyroWave and Intel VPL, built from source

Host

PathWhat
crates/host/punktfunk-hostThe host: sessions, both protocol planes, management API, game library, CLI
crates/host/punktfunk-encode-workerSeparate binary for PyroWave and the NVIDIA frame convert, at raised GPU priority
crates/host/punktfunk-capture-workerWindows Graphics Capture and its encoder, as the signed-in user
crates/host/pf-vdisplayVirtual outputs: one backend per compositor, the Windows driver, macOS
crates/host/pf-captureCapture behind Capturer: PipeWire, direct Wayland, the Windows driver and WGC, ScreenCaptureKit
crates/host/pf-encode-coreThe Encoder trait and the policy every backend shares
crates/host/pf-encode, pf-encode-winEncoder backends: Linux and macOS, Windows
crates/host/pf-encode-sessionWindows: pool slot to encoder to access-unit section, shared by the driver and the capture worker
crates/host/pf-zerocopyCUDA, EGL and Vulkan dmabuf import (Linux)
crates/host/pf-injectKeyboard, mouse, pen and virtual-gamepad injection
crates/host/pf-audioDesktop audio capture, the virtual microphone, pad audio
crates/host/pf-clipboardShared clipboard backends
crates/host/pf-portalThe one tokio runtime every portal call runs on (Linux)
crates/host/pf-frame, pf-gpu, pf-win-displayFrame vocabulary; GPU selection; Windows display topology
crates/host/pf-host-configThe settings registry, its store and the environment switches
crates/host/pf-paths, pf-paths-winConfig directory and owner-private files; Windows DACL checks
crates/host/pf-driver-protoThe contract between the host and the Windows drivers
crates/host/pf-seats, punktfunk-seatsThe seat supervisor: inside the service on Windows, a root daemon on Linux
crates/host/pf-seat-keeper, pf-seat-audioA Windows seat's RDP keeper, in a workspace of its own; the seat's audio endpoint DLL

Clients

PathWhat
crates/client/punktfunk-ffiThe C ABI over the core
crates/client/pf-client-coreClient plumbing: session pump, audio, gamepads, trust, discovery
crates/client/pf-client-videoDecode ladder, Vulkan device handoff, colour maths, PyroWave decode
crates/client/pf-presenterSDL3 window, Vulkan swapchain, input capture
crates/client/pf-console-uiThe Skia UI: stats overlay, gamepad home, library, settings
clients/sessionpunktfunk-session, the stream window every desktop front-end starts
clients/linux, clients/windowsThe GTK4 and WinUI 3 apps (punktfunk-client)
clients/clipunktfunk, the headless CLI
clients/probepunktfunk-probe, the reference client and measurement tool
clients/appleThe Swift app for macOS, iOS, iPadOS, tvOS and visionOS; native/ is its static library
clients/androidThe Kotlin app for phone and TV; native/ is its JNI core
clients/deckyThe Steam Deck plugin, which starts the CLI
clients/sharedTest vectors every client checks against

The browser, LG webOS, Nintendo Switch and PlayStation 5 clients live in their own repositories and pin these crates as git dependencies.

Install and update

PathWhat
crates/install/punktfunk-setup, punktfunk-setup-winThe guided Linux installer that install.sh fetches; the Windows installer wizard
crates/install/punktfunk-trayThe tray status icon
crates/install/pf-updateThe root helper for updates started from the console
packaging/apt, rpm, Arch, Flatpak, Bazzite, bootc, Nix, the macOS app, the Windows installer and drivers, winget

Web, SDK and plugins

PathWhat
web/The web console: TanStack Start, server-rendered on Bun. orval generates its API client from api/openapi.json.
sdk/@punktfunk/host, the TypeScript client for the management API, and the plugin runner punktfunk-scripting
plugin-kit/@punktfunk/plugin-kit, the kit plugins are written with
l10n/Every message a person reads, one folder per part under l10n/messages/ (web, host, common and the clients), and pf-l10n, which compiles and checks them
docs-site/This site

Windows drivers

packaging/windows/drivers/ is a cargo workspace of its own, built with the WDK.

CrateRole
pf-vdisplayIddCx virtual display. Encodes in WUDFHost and publishes access units to the host.
pf-gamepadHID minidriver that presents the pad the host names: PlayStation, Xbox, Steam, Switch, 8BitDo and Hori models
pf-xusbAn Xbox 360 pad visible to XInput, with no kernel bus driver
pf-mouseResident virtual HID mouse and keyboard, so Windows draws a cursor on a headless host
pf-touchpadA virtual Precision Touchpad per session
wdk-iddcx, pf-umdf-utilIddCx bindings and the safe UMDF layer the drivers share

packaging/windows/pf-vkhdr-layer is a Vulkan layer that lets Vulkan games turn on HDR over the virtual display.

Generated, tooling and CI

PathWhat
api/openapi.json, include/punktfunk_core.hThe generated API spec and C header, checked in (Generated files)
tools/gen-headers, and probes such as loss-harness, scroll-probe, cursor-probe, wl-scanout-probe, wgc-probe and display-disturb
ci/, scripts/CI builder images; install, packaging and CI scripts
docs/House rules for people who change the code: writing, localization, identifiers, settings, and the decision records in docs/adr/

On this page