From 0585110df418ef99c9fcf0ed35f54ca72d6885ea Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Thu, 9 Feb 2023 16:26:29 +0100 Subject: [PATCH] Update all READMEs. --- README.md | 19 +++++++++++++++++++ c/README.md | 25 ++++++++++++++++++++++--- crystal/README.md | 8 +++----- zig/README.md | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 README.md create mode 100644 zig/README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5583d4f --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +[LibIPC][libipc] examples in many languages: +- C +- Zig +- Crystal + +and soon even more! + +# Build + +Just type `make` in the right directory. + +# Some makefile utilities + +All examples' makefiles include `mk/makefile.utils`. +Go have a look. +You'll be able to ask for a static build, run an application with valgrind with many options, and so on. +For example: `make STATIC=1 build` will compile your example as a static executable (in all languages). + +[libipc]: https://git.baguette.netlib.re/Baguette/libipc diff --git a/c/README.md b/c/README.md index 80b3f2c..f40418e 100644 --- a/c/README.md +++ b/c/README.md @@ -1,6 +1,25 @@ -Some C examples, nothing fancy. -Implementation is straightforward. +[LibIPC][libipc] C examples: `pong` and `pongd` (simple service and its client, just echoing received messages). +Implementations are straightforward. -# Build +## Build `make` + +Some options are available, such as static builds. + +```sh +make STATIC=1 # Build static executables. +``` + +## Usage + +```sh +./zig-out/bin/pongd # run the service +./zig-out/bin/pong # run the client +``` + +## LICENSE + +ISC + +[libipc]: https://git.baguette.netlib.re/Baguette/libipc diff --git a/crystal/README.md b/crystal/README.md index dab6c23..4f06567 100644 --- a/crystal/README.md +++ b/crystal/README.md @@ -1,12 +1,10 @@ -# LibIPC examples - Crystal LibIPC examples, using [libipc bindings shard][bindings]. -## Installation +## Build ```sh # Compiles all examples. -shards build +make ``` Currently there are 2 examples: @@ -21,7 +19,7 @@ Currently there are 2 examples: ./bin/pong # run the client ``` -# LICENCE +## LICENSE ISC diff --git a/zig/README.md b/zig/README.md new file mode 100644 index 0000000..9c49d99 --- /dev/null +++ b/zig/README.md @@ -0,0 +1,34 @@ +Zig [LibIPC][libipc] examples: +`pong` and `pongd` (as you find in all other examples). +`tcpd` and `ipcd`, to make any LibIPC application network-ready. +Documentation will come soon for these. + +## Build + +```sh +# Compiles all examples. +make +``` + +Several options are available. + +```sh +# Compiles all examples. +make STATIC=1 # Build static executables. +make ZIG_OPTIM=ReleaseSmall # Build small executables. +``` + +Read the makefile. + +## Usage + +```sh +./zig-out/bin/pongd # run the service +./zig-out/bin/pong # run the client +``` + +## LICENSE + +ISC + +[libipc]: https://git.baguette.netlib.re/Baguette/libipc