Writing a repo browser for Pijul

I want to use libpijul in a project written in Crystal. It supports using C bindings.

It would be a Pijul repo browser, similar to the Pijul Nest. (No discussions, CI, or anything, just a browser.) It would be able to render webpage with patch names, history, pijul credit-like output, patch dependency graph, and more.
I think it would be the fastest if it could link to libpijul. Another solution could be to open an external pijul process and parse its output. This would make it more robust agaist crashes in libpijul, but would introduce risk of parsing errors.
The best solution would be if Pijul supported JSON output (for which Crystal has an awesome serializer), but I guess it doesn’t exists currently. (It would be useful for a lot of other use cases too.)

What approach would you recommend? Bindings, or external process?