Pack ==== Pack is a simple serialisation and deserialisation library for C. Build health: - Arch Linux [![builds.sr.ht status](https://builds.sr.ht/~tk/pack/commits/archlinux.yml.svg)](https://builds.sr.ht/~tk/pack/commits/archlinux.yml?) - OpenBSD [![builds.sr.ht status](https://builds.sr.ht/~tk/pack/commits/openbsd.yml.svg)](https://builds.sr.ht/~tk/pack/commits/openbsd.yml?) - FreeBSD [![builds.sr.ht status](https://builds.sr.ht/~tk/pack/commits/freebsd.yml.svg)](https://builds.sr.ht/~tk/pack/commits/freebsd.yml?) - Alpine [![builds.sr.ht status](https://builds.sr.ht/~tk/pack/commits/alpine.yml.svg)](https://builds.sr.ht/~tk/pack/commits/alpine.yml?) Dependencies ------------ Pack has no runtime dependencies. The following is a list of build dependencies: - An implementation of redo - Copy it to the source directory, make it executable and run it. Only designed for building. For development, one of the other implementations is recommended. - Tested building and development. Slightly overzealous rebuilds. Performance issues with jobserver. - Tested building and development. Bugs with jobserver. - Tested for building. May have some bugs when used for development. - Tested for building. Overzealous rebuilds but generally very fast. - A C11 compiler with GCC style parameters (clang works) - POSIX cat, find, rm, sed, sh and tr - xargs with support for the `-r` gnu extension - bash 4.4 or newer (parameter expansion transformations) Compilation ----------- Optionally run `./configure` (see `./configure -h` for options). Some build hosts require calling `./configure` with `-B-lm` to pass `-lm` to the linker for certain math.h functions. Run `redo all` to build the library and tests. ### Cross Compilation To cross compile, run `./configure` as normal and edit the resulting `config.rc` to set `TCC` to the target compiler. Additional flags can be passed via the arrays `TCFLAGS`, `TCPPFLAGS`, `TLDFLAGS`, and `TLDLIBS`. Host specific flags can be passed via the corresponding `H` arrays. For example, to cross compile for windows using `i686-w64-mingw32-gcc` as the target compiler and `clang` as the host compiler: ``` $ CC=clang ./configure $ echo TCC=i686-w64-mingw32-gcc >>config.rc $ redo all ``` Testing ------- Run `./test` to run all the tests. Installation ------------ Not implemented yet. Development ----------- Please configure with `-w` and ensure code compiles cleanly. Be aware that different compiler versions can enable different warnings. If in doubt, ask. Contributing ------------ To contribute, please send a patch to me at . Bugs ---- * pack assumes a two's complement implementation of C * pack cannot build on OSX without installing a newer bash and a fixed xargs