I wrote a UI library in C that can lay out 95000 items at 60fps.
The library is 566 lines of C, and the application-specific ui code is 998 lines. Works on mac, windows, and linux.
Took 2 days to port to linux. Just had to port a few os-specific functions (timing, threading, files), and make a linux sysroot so zig cc could cross-compile. A few things I learned about linux dev... 1/n
First invites for the *Windows* version of What the Fork just went out, 1 year after it was on the front page of hacker news. It's been a difficult year to work: we had a baby, moved 2500 miles, and had some health challenges, so this milestone feels especially good
My UI library is now twice as fast thanks new a single draw call UI renderer: every layer is an instanced textured quad. Stroke, rounded corners, clipping, and fill are handled in the shader... 1/n
How I develop for Windows on macOS:
‣ Use C & X-platform UI library -> early testing on macOS
‣ Cross compile with zig cc
‣ Test windows build in Parallels VM
‣ Rad debugger
‣ Use parallels' prlctl to copy exe+pdb to windows vm and launch in debugger.
‣ msvcup for windows