In theory, all of the APIs are now wrapped to get a rendered document
from a markdown source. And a variety of APIs for manipulating the
parse tree also exist. I should probably test this at some point.
The main points of interest here is the allocator wrapper, which was
kind of annoying to implement. Since the Zig allocator interface
expects to know the size of all allocations, we have to secretly
allocate space for that in front of the pointer that we return. This
ends up causing a little bit of slightly nasty pointer manipulation. I
took longer to debug this than I would like to admit from a bug that
ended up being caused by storing a pointer to a stack copy of an
Allocator object. Whoops.
The other interesting thing I think (though much simpler) is
representing the options bitfield as a packed struct. I think this
makes initializing the parser options a lot nicer than the c variant.