Skip to content

New packaging of bundled libraries

Starting with version 1.04, all bundled libraries (see lib folder) are embedded inside the executable, so using them needs no -L/-I options. All embedded library files are logged as belonging to res:// pseudo-directory (a compressed archive inside l.c); res://lib/ is always used as a fallback search location, so explicit locations given via -L have priority and can override built-in versions if needed.

The embedded archive is generated with the help of baz archiver (see https://github.com/false-schemers/baz); the command is:

baz cvfz l.c --exclude="src" --exclude="lib/include/NDEBUG" --exclude="README.md" --zopfli=1000 wcpl/lib

It uses external zopfli* compressor to get excellent compression rates for .wo files, so the whole built-in archive adds only about 90K to size of the executable.

* [zopfli]: https://github.com/google/zopfli