Thanks to Owen Shepherd of the Public Domain C Library for helping design and formalize these interfaces.