Many modern-day languages like Python and Rust have their own standard package managers that help with installing dependencies for projects. C never had one... until now.
CLibs is a package manager for C that is focused on "micro" libraries. This means all libraries you can install with CLibs are lightweight, fast, and have a small footprint in your overall projects.
Getting Started
To install CLibs, enter in the following commands into your preferred terminal:
git clone https://github.com/clibs/clib.git /tmp/clib
cd /tmp/clib
make
sudo make install
Make sure you have the developer version of libcurl installed on your system.
Searching for the package you need is easy.
clib search [package-name]
Installing is also easy.
clib install <user>/<repo>
You can install more than one package at a time.
Integrating with CLibs
Maybe you're convinced that CLibs is the package manager for C and you would like to get your project to become supported by CLibs.
The way CLibs was created in mind, this is extremely simple to do. Create a package.json file at the root directory of your project. A template would like something like the following:
{
"name": "term",
"version": "0.0.1",
"repo": "clibs/term",
"description": "Terminal ansi escape goodies",
"keywords": ["terminal", "term", "tty", "ansi", "escape", "colors", "console"],
"license": "MIT",
"src": ["src/term.c", "src/term.h"]
}
For more details on package.json: https://github.com/clibs/clib/wiki/Explanation-of-package.json
Now that you know a package manager exists for C, will you add support for CLibs?
Github repository for CLibs: https://github.com/clibs/clib