@a I think you can build the official keyboardio firmware without the electron bits, just normal avr gcc? that's what I did back before I switched to my own scheme firmware
here it is; the most thoroughly-documented code I've ever written in my life, clocking in at 140 lines total
I use it for my daily drivers, but I don't use any features beyond basic layering (momentary and toggle)
it contains a rudimentary implementation of dual-role keys (tap vs hold) but there are a few timing bugs still to work out with that where I couldn't be bothered because I realized I didn't actually want to use that feature myself
but like; 140 lines, you could add your own implementation from scratch without much trouble