haifenghuang / mulle-core

๐ŸŒ‹ Almagamated library of mulle-core and mulle-c

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mulle-core

๐ŸŒ‹ Almagamated library of mulle-core and mulle-c

This is an almagamation of the mulle-core, mulle-concurrent, mulle-c projects that need not be forced linked. See the constituting projects for documentation, bug reports, pull requests.

The advantages of using mulle-core are:

  • compiles faster than two dozens of individual projects
  • you only need to link against one library file
  • #include statements may remain unchanged or simplify to #include <mulle-core/mulle-core.h>

Linking with mulle-atinit/mulle-atexit

This library does not include mulle-atinit and mulle-atexit and mulle-testallocator. mulle-atinit and mulle-atexit need special linker flags and mulle-testallocator depends on mulle-atinit directly. As a "customer" of mulle-atinit or mulle-atexit, that need not concern you, as the newer versions of both projects are recognizant of the fact, that mulle-core exists and that it may contain their dependencies.

Under the hood

mulle-atinit needs to be linked with mulle-thread and mulle-dlfcn. But both are part of mulle-core. mulle-atinit is and can not be part of mulle-core. It needs to specify mulle-core as an alias preference over mulle-thread and mulle-dlfcn. An existing mulle-core is now used for linking in favor of mulle-thread, but mulle-thread is kept as a fallback. If that wasn't done, you'd get duplicate symbol warnings from the linker.

The mulle-sde dependency list output of mulle-atinit should look like this:

address       supermarks     aliases                  include
-------       ----------     -------                  -------
mulle-thread  C,TreePrivate  mulle-core,mulle-thread
mulle-dlfcn   C,TreePrivate  mulle-core,mulle-dlfcn

mulle-core is now searchef for in preference over mulle-thread and mulle-dlfcn. Because of TreePrivate any "benefactor" of mulle-atinit, will not fetch or build mulle-thread or mulle-dlfcn.

Constituents

Requirement Description
mulle-c11 ๐Ÿ”€ Cross-platform C compiler glue (and some cpp conveniences)
mulle-allocator ๐Ÿ”„ Flexible C memory allocation scheme
mulle-buffer โ†—๏ธ A growable C char array and also a stream
mulle-container ๐Ÿ›„ Arrays, hashtables and a queue
mulle-data #๏ธโƒฃ A collection of hash functions
mulle-http ๐Ÿˆš http URL parser
mulle-slug ๐ŸŒ Creates URL slugs
mulle-unicode ๐Ÿˆš Unicode ctype like library
mulle-url ๐Ÿˆท๏ธ Support for URL parsing
mulle-utf ๐Ÿ”ค UTF8-16-32 analysis and manipulation library
mulle-vararg โช Access variable arguments in struct layout fashion in C
farmhash-c C99 translation of Geoff Pike's and Jyrki Alakuijala's FarmHash.
mulle-thread ๐Ÿ”  Cross-platform thread/mutex/tss/atomic operations in C
mulle-aba ๐Ÿšฎ A lock-free, cross-platform solution to the ABA problem
mulle-concurrent ๐Ÿ“ถ A lock- and wait-free hashtable (and an array too), written in C
mulle-fifo ๐Ÿ mulle-fifo fixed sized producer/consumer FIFOs holding void *
mulle-multififo ๐Ÿ› mulle-multififo multi-producer/multi-consumer FIFO holding void *
mulle-mmap ๐Ÿ‡ง๐Ÿ‡ฟ Memory mapped file access
mulle-stacktrace ๐Ÿ‘ฃ Stracktrace support for various OS
mulle-time ๐Ÿ•• Simple time types with arithmetic on timespec and timeval
mulle-dlfcn โ™ฟ๏ธ Shared library helper

Add

Use mulle-sde to add mulle-core to your project:

mulle-sde add github:mulle-core/mulle-core

Install

Install with mulle-sde

Use mulle-sde to build and install mulle-core and all dependencies:

mulle-sde install --prefix /usr/local \
   https://github.com/mulle-core/mulle-core/archive/latest.tar.gz

Manual Installation

Download the latest tar or zip archive and unpack it. Then install mulle-core into /usr/local with cmake:

cmake -B build \
      -DCMAKE_INSTALL_PREFIX=/usr/local \
      -DCMAKE_PREFIX_PATH=/usr/local \
      -DCMAKE_BUILD_TYPE=Release &&
cmake --build build --config Release &&
cmake --install build --config Release

Author

Nat! for Mulle kybernetiK

About

๐ŸŒ‹ Almagamated library of mulle-core and mulle-c

License:Other