Replace monolithic corelib.wren with per-class builtin/*.wren files and generate_builtins.py script. Move IO class definition and its native writeString_ method from wren_core.c to new wren_io.c, adding wrenGetArgumentString and wrenDefineStaticMethod to the public API. Update Makefile target from corelib to builtin and remove generate_corelib.py.
The Wren scripts in this directory get converted to C string literals and then inserted into their respective .c files so that the interpreter can load them directly without having to do any file IO.
The script that does this copying is script/generate_builtins.py.
You can invoke using make builtin.