tm

December 5, 2020 · View on GitHub

Single-file libraries for C/C++ in public domain.

Current libraries

LibraryDesciptionLanguageCurrent Version
tm_allocator.hAn allocator collection for C++C++17v0.0.3
tm_arrayview.hLightweight ArrayView and UninitializedArrayView classes for POD types, allows treating static arrays and memory regions like std containers with insertion/erase. No memory allocation/resizing, does not own memory.C++11v1.2.0
tm_async.hAsync library for single producer, multiple consumer asynchronous execution that uses an internal thread pool. Not yet first release, currently Windows only.C99/C++11v.0.0.2
tm_bezier.hCalculate bezier curve points with forward differencing using only floating point addition.C99/C++v1.1
tm_bin_packing.hC port with minor modifications of the Guillotine and MaxRects algorithms originally written by Jukka Jylänki (also public domain).C99/C++v1.0.7
tm_cli.hCommandline parser that is similar to getopt_long, but doesn't rely on globals and very lightweight.C99/C++v0.2.3
tm_conversion.hFrom and to string conversion library with minimal dependencies.C99/C++v0.9.9.9
tm_hashmapx.hA hashmap implementation library using X-Macros for C99. The hashmap uses linear-probing and is power-of-two sized.C99v.0.0.1
tm_json.hC++ and C99 json parsing library that can do both json reading and parsing into a json document for queries. Accepts a wide variety of flags, can be used to parse json in strict mode, or in json5 mode with the right combination of flags.C99/C++v0.9.0
tm_polygon.hTriangulation and clipping of polygons. Clipping supports union, difference and substraction.C99/C++v1.1
tm_print.hLightweight typesafe variadic print and snprint using C++11 and variadic templates.C++11v0.0.22
tm_resource_ptr.hThis is a helper class to manage resources allocated by other tm libraries in a RAII manner similar to std::unique_ptr.C++11v0.1.0
tm_small_vector.hDynamic array container similar to STL <vector> with a template parameter for small buffer optimization. Uses a non customizable malloc allocator making use of realloc whenever possible.C++11v0.0.8
tm_stringutil.hString utility functions, from matching, comparison to tokenizing.C99/C++v0.9.3
tm_uint128.hA uint128 type with a couple of backends to choose.C99/C++11v0.0.4
tm_unicode.hA Utf-8 everywhere library with Utf-8/Utf-16 conversion, caseless comparison and system call wrappers for cross platform windows/linux Utf-8 support.C99/C++v0.9.3
tm_utility.hUtility and convenience functions, mainly for my personal use.C++11v1.1.5
tm_xml.hAn xml reader with no extra validation. Only UTF-8 xml documents, does perform unicode validity checks.C99/C++v0.1.0

These libraries follow the same guidelines as stb. They have minimal dependencies and are dual licensed in both the public domain and MIT.