https://github.com/thisisignitedoreo/strap
A bunch of useful stuff for casual C coding
https://github.com/thisisignitedoreo/strap
c-language general-purpose library
Last synced: 9 months ago
JSON representation
A bunch of useful stuff for casual C coding
- Host: GitHub
- URL: https://github.com/thisisignitedoreo/strap
- Owner: thisisignitedoreo
- Created: 2025-01-26T13:18:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-26T18:36:44.000Z (over 1 year ago)
- Last Synced: 2025-01-26T19:19:57.919Z (over 1 year ago)
- Topics: c-language, general-purpose, library
- Language: C
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# libstrap
A bunch of useful stuff for casual C coding
## Overview
Library consists of modules:
- `array.h`: dynamic arrays
- `linked_list.h`: linked lists
- `hashmap.h`: hashmaps
- `fileio.h`: files and directories i/o
- `arena.h`: arena allocators
- `stringview.h`: stringview implementation
- `shell.h`: program i/o
- `utils.h`: utility functions
- `json_write.h`: JSON serialization
- `json_read.h`: JSON parsing
Check sources for more info
## Build
> [!WARNING]
> The old `build.sh` script is very rudamentary and deprecated.
> The use of zig build system is recommended.
```console
$ zig build [-Dtarget=x12_34-amogos-jlibc]
```
To add this library to your project use:
```console
$ zig fetch --save git+https://github.com/thisisignitedoreo/strap.git
```
And in your `build.zig`:
```zig
const strap = b.dependency("strap", .{
.target = target,
.optimize = optimize,
});
// ...
exe.linkLibrary(strap.artifact("strap"));
```