2015-02-28 19:53:23 +01:00
|
|
|
liberty
|
|
|
|
=======
|
|
|
|
|
2022-10-04 01:45:34 +02:00
|
|
|
'liberty' is a pseudolibrary largely consisting of reusable C code for my
|
|
|
|
various projects. I used to copy-paste large swaths of it with minimal changes,
|
2015-03-29 01:55:10 +01:00
|
|
|
and it slowly became awfully painful to synchronize. The project can be thought
|
|
|
|
of as a successor to my other C library, libxtnd.
|
2015-02-28 19:53:23 +01:00
|
|
|
|
|
|
|
You are supposed to import it as a git submodule and include the main source
|
2022-10-04 01:45:34 +02:00
|
|
|
file directly everywhere you need it, setting feature flags as appropriate.
|
|
|
|
Everything is declared "static". I have come to the conclusion that this style
|
|
|
|
of C programming suits me the best, as it allows me to nearly forget about the
|
|
|
|
mess that are header files.
|
2015-02-28 19:53:23 +01:00
|
|
|
|
2015-03-29 01:55:10 +01:00
|
|
|
The API is intentionally unstable, which allows for easy refactoring.
|
|
|
|
|
|
|
|
All development is done on Linux, but other POSIX-compatible operating systems
|
2022-10-04 01:45:34 +02:00
|
|
|
should be generally supported as well. They have an extremely low priority,
|
|
|
|
however, and I'm not testing them at all, perhaps with the exception of macOS.
|
2016-03-13 16:40:49 +01:00
|
|
|
|
2022-09-30 03:09:04 +02:00
|
|
|
Tools
|
|
|
|
-----
|
|
|
|
This project also hosts a number of supporting scripts written in portable AWK:
|
|
|
|
|
|
|
|
asciiman.awk::
|
|
|
|
A fallback manual page generator for AsciiDoc documents,
|
|
|
|
motivated by the hugeness of AsciiDoc's and Asciidoctor's dependency trees.
|
2022-10-09 00:07:07 +02:00
|
|
|
Just like them, it uses the _man_ macro package.
|
2022-09-30 03:09:04 +02:00
|
|
|
|
|
|
|
cmake-parser.awk::
|
|
|
|
Parses the CMake language to the extent that is necessary to reliably
|
|
|
|
extract project versions. Its greatest limitation is its inability
|
|
|
|
to expand variables, which would require a full interpreter.
|
|
|
|
|
|
|
|
cmake-dump.awk::
|
|
|
|
This can be used in conjunction with the previous script to dump CMake
|
|
|
|
scripts in a normalized format for further processing.
|
|
|
|
|
|
|
|
lxdrgen.awk::
|
|
|
|
Protocol code generator for a variant of XDR,
|
|
|
|
which is link:libertyxdr.adoc[documented separately].
|
|
|
|
Successfully employed in https://git.janouch.name/p/xK[xK].
|
|
|
|
|
|
|
|
lxdrgen-c.awk::
|
|
|
|
LibertyXDR backend that builds on top of the C pseudolibrary.
|
|
|
|
|
2023-07-07 12:25:14 +02:00
|
|
|
lxdrgen-cpp.awk::
|
|
|
|
lxdrgen-cpp-win32.cpp::
|
|
|
|
lxdrgen-cpp-posix.cpp::
|
|
|
|
LibertyXDR backend for C++, primarily targeting Win32 and its wide strings.
|
|
|
|
Link the result together with one of the accompanied source files.
|
|
|
|
|
2022-09-30 03:09:04 +02:00
|
|
|
lxdrgen-go.awk::
|
|
|
|
LibertyXDR backend for Go, supporting _encoding/json_ interfaces. It also
|
|
|
|
produces optimized JSON marshallers (however, note that the _json.Marshaler_
|
|
|
|
interface is bound to be underperforming, due to the amount of otherwise
|
|
|
|
avoidable memory allocations it necessitates).
|
|
|
|
|
|
|
|
lxdrgen-mjs.awk::
|
|
|
|
LibertyXDR backend for Javascript, currently for decoding only.
|
|
|
|
It cuts a corner by not using BigInts, on par with `JSON.parse()`.
|
|
|
|
|
2023-06-15 09:42:06 +02:00
|
|
|
lxdrgen-swift.awk::
|
|
|
|
LibertyXDR backend for the Swift programming language.
|
|
|
|
|
2016-03-13 16:40:49 +01:00
|
|
|
Contributing and Support
|
|
|
|
------------------------
|
2018-06-21 23:58:03 +02:00
|
|
|
Use https://git.janouch.name/p/liberty to report any bugs, request features,
|
|
|
|
or submit pull requests. `git send-email` is tolerated. If you want to discuss
|
|
|
|
the project, feel free to join me at ircs://irc.janouch.name, channel #dev.
|
2015-03-29 01:55:10 +01:00
|
|
|
|
2018-06-21 23:58:03 +02:00
|
|
|
Bitcoin donations are accepted at: 12r5uEWEgcHC46xd64tt3hHt9EUvYYDHe9
|
2017-06-04 00:49:15 +02:00
|
|
|
|
2015-02-28 19:53:23 +01:00
|
|
|
License
|
|
|
|
-------
|
2018-06-21 23:57:25 +02:00
|
|
|
This software is released under the terms of the 0BSD license, the text of which
|
|
|
|
is included within the package along with the list of authors.
|