## libderp, yet another C collection library Why you might use it * builds with Meson, any C99 compiler * a proper library that you can link against * no abuse of translation units, no weird macros * includes proper man pages (TODO) * shared and static library * pkg-config interface * developer friendly ISC license Why you might avoid it * containers use void pointers, e.g. no vector of ints * pedestrian algorithms, not cutting edge * not (yet) thread safe ## Installation Methods This project supports two installation methods, each designed for different use cases: ### 1. Development/Versioned Install (`dev` mode) - **Purpose:** - For developers and packagers who want to install headers, static/shared libraries, and pkg-config files in a versioned, self-contained directory. - Allows multiple versions to coexist without interfering with system libraries or headers. - **What gets installed:** - Headers, static and shared libraries, and pkg-config files, all under a versioned root (e.g., `/usr/local/libderp-dev.1.1.1/`). - **How to use:** ```sh meson setup build-dev -Dinstall_mode=dev ninja -C build-dev meson install -C build-dev ``` - **Result:** - All development artifacts are grouped under the versioned root. - No files are installed to global system locations. ### 2. System Install (`system` mode) - **Purpose:** - For system administrators or users who want to install only the shared library for runtime use, with robust versioned symlinks for compatibility. - Does **not** install headers or pkg-config files. - Supports multiple major versions side-by-side, with symlinks for all minor versions. - **What gets installed:** - Only the shared library, to the system libdir (e.g., `/usr/local/lib/x86_64-linux-gnu/`), with symlinks for all minor versions (e.g., `libderp.so.1.0`, `libderp.so.1.1`). - **How to use:** ```sh meson setup build-system -Dinstall_mode=system ninja -C build-system # For a real install (to /usr/local), run: sudo meson install -C build-system # For a safe test install, use: DESTDIR=/tmp/libderp-test meson install -C build-system ``` - **Result:** - Only the shared library and symlinks are installed to the system libdir. - No headers or pkg-config files are installed. - Symlinks for all minor versions are created, supporting robust runtime linking and upgrades. --- **Which should you use?** - Use **dev mode** if you are developing, packaging, or need to link against libderp in your own projects. - Use **system mode** if you only need the runtime shared library for system-wide use, or want to support robust upgrades and multiple major versions. See the [Portable best practices article](https://begriffs.com/posts/2021-07-04-shared-libraries.html) for more background on these installation strategies.