Over the years I've accumulated a lot (~100.000 lines) of C code in more than 60 Git repositories. They all work together in a consistent manner, are far from perfect but I'm happy enough with them, and they served me very well in several other projects. LibCapy is an attempt to gather them into one single library, to refactor them along the way based on what I've learnt since, and to define a new place where to keep on adding more code to them.

The library doesn't serve a well defined goal, nor attempt to solve a particular problem. It's more a collection of functions and data structures which I happened to have interest into at some point in the past. So, it's certainly a bit biased toward computer graphics and machine learning, but there are also completely unrelated things there, especially at the beginning when there'll be only basic and generic functions and structures. The library is available under the GNU General Public License on this page and you'll find examples of use here.

Sharing it online is of course a way to leave the opportunity to someone interested to use it or just look at it. It's also a way for me to document it, which I was already doing with the former repositories, in a different way. Here, each unit will have it's own page in the category LibCapy of this website. These pages, and this page, and this library will be continuously updated, that's a forever WIP pet-project.

About the name

Do you know what a capybara is ? It's the biggest rodent in the world, living in South America. I like capybara, cause they live a lasy, quiet, peaceful life, are masters of stoicism and best friends of all. Just like we all should be. Just like a good library should be. Hence, LibCapy, that's it. (the crappy play on word Capy → C-Api also fits me well, too...)


The principles I wish to follow in this project are as follow. Some of them because I believe they are good, some because I just want to experiment with them.


The library is freely available under the GPL license and you can download it from this page.


Examples of how you can use it and what you can do with it are available here.

in All, C programming, LibCapy,
Copyright 2021-2024 Baillehache Pascal