Good job @xigoi on xidoc. It looks very nice!
An interesting side project to extract from that would be to make some self standing wrappers for katex and prism (which thanks to duktape they could be usable with C backend). I would probably be using such libraries in nimib (a nice to have, not really a priority since I can always use them directly as JS libraries).