septag/sx logo

septag/sx

Free

Portable base library for C programmers, designed for performance and simplicity.

FreeFree tier
Type
Open Source
Company
septag

About septag/sx

SX is a portable base library for C/C++ programs and games, designed for minimalism and high performance. It provides a set of low-level, cross-platform functionalities including memory allocation, arrays, atomics, fibers, job scheduling, hashing, and file I/O. The library emphasizes controlled heap memory via allocator objects, fast compile times, and uses optimized algorithms (including some assembly) for speed. It runs on multiple operating systems and is inspired by several well-known C libraries.

Key Features

Memory allocation with allocator objects (default heap, leak check)
Stretchy buffer (array) implementation with C++ template wrapper
Portable atomic types and functions (CAS, exchange, increment, spinlock)
Command line parser wrapper over getopt
Portable fibers and coroutines with low-level assembly backend
Fiber-based task scheduler with job priority, fixed thread pool, and dependency handling
Handle pool with sparse/dense allocator and generation counters
Fast hash functions (xxhash, crc32, fnv1a) and Fibonacci multiplicative hash table
INI file encoder/decoder
Memory and file I/O (read/write)

Pros & Cons

Pros
  • Fast compile time (~1 second for 15 KLOC with ninja build)
  • Performant with optimized algorithms and some assembly implementations
  • Portable across multiple operating systems
  • Heap memory controlled via allocator objects, avoiding direct malloc/free
  • Minimal and focused design, easy to integrate
Cons
  • Archived repository (read-only as of June 2024, no longer maintained)
  • Only supports C and C++ languages
  • Limited documentation beyond README and header comments
  • May lack modern C++ features (designed to avoid STL and templates)

Best For

Cross-platform game developmentSystem-level C/C++ programmingEmbedded or performance-critical applicationsMulti-threaded task scheduling with fibersCreating portable libraries that avoid heavy C++ STL dependencies

FAQ

What is SX?
SX is a portable base library for C/C++ programs and games, providing minimal and performant implementations of common data structures and utilities.
Is SX free to use?
Yes, it is open source and available under an MIT license on GitHub.
What platforms does SX support?
SX runs on multiple platforms and OSes, including Windows, Linux, and others (as indicated by the portable design).
Is SX still maintained?
The repository was archived by its owner on June 12, 2024 and is now read-only, so it is no longer actively maintained.