Skip to content

jcbhmr/miniglib

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MiniGLib

๐Ÿ“„ Just the core GLib types: GString, GArray, and GHashTable

GString *name = g_string_new("Alan Turing");
printf("๐Ÿ‘‹ Hello %.*s!\n", (int) name->len, name->str);

Installation

Git

TODO: Publish to a library repository or something

git submodule add https://github.com/jcbhmr/miniglib.git
git -C ./miniglib switch --detach v1.0.0
cc -std=c23 -I ./miniglib/include/ -o ./build/hello-world ./miniglib/src/*.c ./src/*.c

Usage

C

After downloading the library and configuring your build system to incorporate this library, you can use the following code snippets to get started.

#include <stdio.h>
#include <miniglib.h>

int main() {
    GString *name1 = g_string_new("Alan Turing");
    GString *name2 = g_string_new("Ada Lovelace");
    printf("%.*s says hello to %.*s\n", (int) name1->len, name1->str, (int) name2->len, name2->str);
    g_string_free(name1, true);
    g_string_free(name2, true);
    return 0;
}

Development

CMake C

TODO: Write this section

About

๐Ÿ“„ Just the core GLib types: GString, GArray, and GHashTable

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 97.7%
  • CMake 2.3%