Skip to content

Windows port of fcxd, in Zig#3

Open
dokson wants to merge 2 commits into
cescobaz:zig-implfrom
dokson:feature/windows-port-zig
Open

Windows port of fcxd, in Zig#3
dokson wants to merge 2 commits into
cescobaz:zig-implfrom
dokson:feature/windows-port-zig

Conversation

@dokson

@dokson dokson commented Jun 14, 2026

Copy link
Copy Markdown

Windows port of fcxd. Pure Zig. Built on zig-impl (its platform layer is already Zig-runner-based).

No C, no json-c on Windows.

  • mouse, keyboard, system_info over Win32 SendInput, exporting the fcx_* C ABI.
  • Windows entry point with its own stdio, drives the Zig Runner.
  • build.zig: Windows branch (links user32/advapi32). Linux/mac untouched.
  • Tests: Zig unit tests + a NUL-framed integration smoke test.
  • CI: separate fcxd.yml, builds + tests on windows-latest. Green.

Left out: brightness (no SendInput virtual-key on Windows); apps (ui_apps/apps_observe) still "not implemented", same as the Zig Runner.

Windows reigns :)

dokson added 2 commits June 14, 2026 19:21
Pure-Zig Windows backend (mouse, keyboard, system_info) exporting the
fcx_* C ABI over Win32 SendInput, plus a Windows entry point that drives
the Zig Runner with its own stdio. No C sources or json-c on Windows.

- build.zig: a Windows branch (links user32/advapi32); Linux/mac untouched.
- Keyboard symbols match the app's set (ToolsLive); brightness has no
  SendInput virtual-key on Windows and stays unsupported.
- Tests: inline Zig unit tests + a NUL-framed integration smoke test.
- CI: a separate fcxd.yml workflow builds and tests on windows-latest.
From a zig-programming audit of the runner:
- a bad request (unknown command / bad params / bad envelope) no longer
  kills the driver: it gets an error reply and the loop carries on; only
  OOM stays fatal.
- ignore_all is acknowledged with ok, not "command not implemented".
- every module's tests now run (the build ran only a few); add Runner
  happy-path + multi-request framing coverage; CI prints the summary.
@dokson dokson force-pushed the feature/windows-port-zig branch from 8a7167b to 2151ff6 Compare June 14, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant