Skip to content

miselin/pocketknife

Repository files navigation

Pocketknife

CI codecov

All the stuff I keep having to reimplement, or that I might need again in the future. A pocketknife is a multitasker - this repo is my go-to for all the little tasks that I can reuse in other projects.

Not Invented Here

There's stuff here that's already readily available. Many of these libraries are as much a learning exercise as they are a useful tool. That means the quality may not be quite production-grade yet, or there may be issues that stem from learning by doing. You've been warned 😃

Libraries

allocator

liballoc provides an arena allocator designed for integration with libgc. While not yet implemented, this means the allocator will support compaction and other GC-supporting capabilities.

document

libdocument provides a simple document abstraction, essentially an array-of-lines (although using a list of cords instead). It offers fast document editing operations such as insertion and removal of lines of text.

gc

libgc provides a rudimentary garbage collector with generations, a large object space, and the option for custom configured spaces.

hash

libhash provides hashing routines like FNV-1a.

os

libos offers an OS-compatibility layer for other projects to use.

string

libstring offers string manipulation primitives like a C dynamic string builder, and a cord data structure.

trie

libtrie offers a trie for storing key/value pairs with string keys. The use of a trie allows for prefix matching in addition to direct lookup.

About

Utility libraries for my projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published