libR3 is designed to be a minimal, and extensible runtime library, making writing complex programs simpler by reducing bugs and boilerplate, helping you ship faster.
- Modular architecture – Include only the APIs you need.
- No platform dependencies – Fully self-contained, written in C99.
- Simple Integration - Any api can serve as a drop-in along side the
libR3.mem.memAPI.
| API | Description |
|---|---|
mem |
Memory management |
ds |
Data Structures |
io |
Input/Output |
math |
Math utilities (GL friendly) |
| Release | Contents |
|---|---|
libR3-dev |
Full development version: headers, and prebuilt .dll |
libR3 |
Standard release: prebuilt .dll |
| NOTE: Both versions are available as .zip and .tar archives.
Use the libR3-dev release if you want access to all headers, and prebuilt binaries:
- Add libR3's
includedirectory to your compiler's header search path - Link against the provided
.dllbuild artifact. - Use
libR3/r3.hto bootstrap the library and access the full API
#include <include/libR3/mem/mem.h>
#include <include/libR3/io/string.h>
int main() {
void* someMemory;
// allocate 1024 bytes, (8 byte aligned on 64bit systems else 4byte aligned)
if ((someMemory = r3AllocMemory(1024))) {
// code away...
}
char* someString;
if ((someString = r3NewString(32))) {
// string code here...
}
// don't froget to free...
r3DelString(someString);
r3FreeMemory(someMemory);
return 0;
}gcc -shared -o libR3.dll src/libR3/*/*.cOption 2: The build process can be automated using r3make.
r3make -nf| NOTE: This command builds the libR3 library
libR3 is released under the MIT License.