libMPost is an extensible, thread-safe, C library that implements a graphics language based on the MetaPost language.
The library comes with an example program called MetaMP, which uses a command-line nearly identical to the mpost program as found in Web2c.
The executable metamp is a lot like the Web2c mpost program, but not exactly identical. Some differences stem from differences between libMPost and MetaPost, others are implementation differences (MetaMP is not based on Web2c).
All input files, font files, the used mem file and the fontname table have to be in the current directory. Eventually, MetaMP will use TeXFS, but that is not available yet.
"inimp" vs. "virmp" processing is acted upon by MetaMP. Either you supply a -ini switch on the command line, or you don't. In the latter case, there has to be a MEM file loaded, and in the former case there will never be a MEM file loaded.
libMPost does not support runtime re-initialization of instances yet (and may perhaps never do so), so it is not possible to re-load MEM files or to make derived MEM files by loading a previously saved one in -ini mode.
The current version does not "do" btex .. etex labels yet. They will be left blank without an error message.
There is no xord/xchr remapping, all I/O is totally 8 bit. The mapping should be done by MetaMP, but has not been implemented yet.
Line breaks in messages to the terminal and log sometimes occur in different places.
The hash table and main memory have a large but fixed size (this limitation will be removed in the future).
All other memory sizes are reallocated as needed, but the library may still quit on you with an overflow-like error, if it cannot get more memory from the operating system.
After almost two months of work, quite a lot of the coding that needed doing is done already: the pascal Web code is converted to ansi C, all global variables have become incorporated in a single MetaPost instance, a namespace prefix has been added to all exported symbols, a number of I/O callbacks are in place, and program startup has been changed to be more like a 'normal' C library.
Main focus right now is removing enough bugs so that simple input files can be run without any problems. I estimate that this will take another couple of weeks.