aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 18a6d112e2bde97ca1dbcc831de0a0783aeb8e30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Pack
====

Pack is a simple serialisation and deserialisation library for C.

Current 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?)

Dependencies
------------

Pack has no runtime dependencies. The following is a list of build dependencies:

-   An implementation of redo
    -   <https://raw.githubusercontent.com/apenwarr/redo/redo-0.42d/minimal/do>
        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.
    -   <http://news.dieweltistgarnichtso.net/bin/redo-sh.html> Tested building
        and development. Slightly overzealous rebuilds. Performance issues with
        jobserver.
    -   <https://jdebp.uk/Softwares/redo/> Tested building and development. Bugs
        with jobserver.
    -   <https://github.com/apenwarr/redo> Tested for building. May have some
        bugs when used for development.
    -   <https://github.com/leahneukirchen/redo-c/> 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.

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 <tk+pack-patches@the-tk.com>.

Bugs
----

* pack assumes a two's complement implementation of C
* pack cannot build on OSX without installing a newer bash and a fixed xargs