saprykin/plibsys logo

saprykin/plibsys

Free

Highly portable C system library: threads and synchronization primitives, sockets (TCP, UDP, SCTP), IPv4 and IPv6, IPC, hash functions (MD5, SHA-1, SHA-2, SHA-3, GOST), binary trees (RB, AVL) and more. Native code performance.

FreeFree tier
Type
Open Source

About saprykin/plibsys

plibsys is a cross-platform system C library that provides a comprehensive set of low-level programming primitives using only native system calls and zero third-party dependencies. It offers platform-independent data types, threading and synchronization primitives (mutexes, condition variables, read-write locks, semaphores, spinlocks, atomic operations), socket support (TCP, UDP, SCTP) with IPv4 and IPv6, IPC via shared memory and semaphores, hash functions (MD5, SHA-1, SHA-2, SHA-3, GOST), binary trees (BST, red-black, AVL), an INI file parser, high-resolution time profiler, files and directories manipulation, shared library loading, and useful routines for linked lists, strings, and hash tables. The library includes macros for CPU architecture, OS, and compiler detection. It achieves maximum native performance by using multiple implementation models per platform (e.g., POSIX, Win32, Solaris). plibsys is extensively tested on desktop platforms (GNU/Linux, macOS, Windows, BSDs, Solaris, AIX, HP-UX, OpenVMS, OS/2, Haiku, etc.) and mobile platforms (iOS, tvOS, Android, BlackBerry 10). It is built with CMake and distributed under the MIT license.

Key Features

Platform independent data types
Threads and synchronization (mutexes, condition variables, read-write locks, system-wide semaphores)
Optimized spinlock and atomic operations
Socket support: UDP, TCP, SCTP with IPv4 and IPv6
IPC via system-wide shared memory and semaphores
Hash functions: MD5, SHA-1, SHA-2, SHA-3, GOST (R 34.11-94)
Binary trees: BST, red-black, AVL
INI file parser
High resolution time profiler
Files and directories manipulation

Pros & Cons

Pros
  • Zero third-party dependencies, only native system calls
  • Extremely portable across desktop, server, and mobile platforms
  • Supports a wide variety of compilers and architectures
  • Includes both threading and IPC primitives for concurrent programming
  • Provides multiple implementation models per platform for optimal performance

Best For

Cross-platform system programming in CEmbedded systems development requiring portable low-level primitivesBuilding portable multithreaded applicationsImplementing network communication with TCP/UDP/SCTP across platformsCreating cryptographic hash utilities