1
0
Go to file
hoffstadt 69d52ff5f3
All checks were successful
Tests / Ubuntu (push) Successful in 7s
docs: update readme
2024-10-16 17:42:07 +00:00
.github/workflows initial commit 2024-08-26 20:35:15 -05:00
tests test: fix tests 2024-10-15 19:26:52 -05:00
.gitignore initial commit 2024-08-26 20:35:15 -05:00
pl_ds.h feat: 1.0 2024-10-03 00:31:53 -05:00
pl_json.h feat: 1.0 2024-10-03 00:31:53 -05:00
pl_log.h feat: 1.0 2024-10-03 00:31:53 -05:00
pl_math.h feat: 1.0 2024-10-03 00:31:53 -05:00
pl_memory.h feat: 1.0 2024-10-03 00:31:53 -05:00
pl_profile.h feat: 1.0 2024-10-03 00:31:53 -05:00
pl_stl.h feat: 1.0 2024-10-03 00:31:53 -05:00
pl_string.h feat: pl_memory.h 1.0 2024-09-27 19:37:14 -05:00
pl_test.h feat: 1.0 2024-10-03 00:31:53 -05:00
README.md docs: update readme 2024-10-16 17:42:07 +00:00

Pilot Light Libraries

Single-file MIT licensed libraries for C/C++. These are "STB" style libraries (more info here).

Libraries

Library Lastest Version Category Lines of Code Description
pl_ds.h 1.0 utility 672 typesafe dynamic array and hash tables for C
pl_json.h 1.0 parsing 2067 json reading & writing for C
pl_log.h 1.0 utility 1273 small logging library for C
pl_math.h 1.0 math 800 small math library for C (vectors, matrices, quaternions, etc.)
pl_memory.h 1.0 utility 699 various memory allocators for C
pl_profile.h 1.0 utility 551 small profiling library for C
pl_stl.h 1.0 parsing 340 small STL file parser
pl_string.h 1.0 utility 439 string utilities for C
pl_test.h 1.0 misc 543 small testing library for C

Total libraries: 9 Total lines of C code: 7384

FAQ

How do I use these libraries?

The idea behind single-header file libraries is that they're easy to distribute and deploy because all the code is contained in a single file. By default, the .h files in here act as their own header files, i.e. they declare the functions contained in the file but don't actually result in any code getting compiled.

So in addition, you should select exactly one C/C++ source file that actually instantiates the code, preferably a file you're not editing frequently. This file should define a specific macro (this is documented per-library) to actually enable the function definitions. For example, to use pl_log, you should have exactly one C/C++ file that doesn't include pl_log.h regularly, but instead does

#define PL_LOG_IMPLEMENTATION
#include "pl_log.h"

The right macro to define is pointed out right at the top of each of these libraries.

Where is the documentation?

The documentation is included at the top of each file.