DEV Community

CLibs: A Package Manager for C

Noah11012 on November 29, 2018

Many modern-day languages like Python and Rust have their own standard package managers that help with installing dependencies for projects. C neve...
Collapse
 
tobiassn profile image
Tobias SN

Not to be mean or harsh, but can’t one just use a regular package manager?

Collapse
 
noah11012 profile image
Noah11012

I'm not sure what you mean by a "regular" package manager. If you mean the package manager provided by a Linux distribution like Linux Mint or Manjaro, then yes, you can use that if you prefer.

However, creating packages that are Debian based (not sure how to create packages for Manjaro) takes a lot more work than simply adding a package.json file to your project. It's similar to spirit to using npm when creating/working on JS projects.

Collapse
 
tobiassn profile image
Tobias SN

Yes, it's a bit harder to package for Debian, but it's a one-time job, and you don't have to edit anything related to the packaging pipeline to add or remove files, as it's completely independent of one's build tools.

Thread Thread
 
noah11012 profile image
Noah11012

That is true, but CLibs is focused on small C libraries; typically no more than a few files. So, adding/removing files from the package.json is not a frequent issue.

If your library is much bigger than a few files, that I would recommend going with a regular package manager.

Thread Thread
 
tobiassn profile image
Tobias SN

But then what’s the advantage with small libraries?

Thread Thread
 
noah11012 profile image
Noah11012

Small libraries are lightweight because of their small footprint. You're only using what you need and not having it coupled with a framework or part of a bigger library.

Of course, bigger libraries have their place in the world of programming, but sometimes one just needs a micro library to do the job.