Namely, de-facto, or one of, in Linux. Mature. No GUI. Open-source and free.
What is it? GPG or anything else?
For a separate file(s), or directory(ies), and not for the entire disk or partition.
If you want per-directory encryption, there are several options. This front-end project lists a bunch of them in its Supported Backends section.
(Full disk encryption does have a single conventional answer: LUKS. Many distros offer to set this up at install time.)
You’re posting in a programming community, though, not a linux help community. Are you looking for a library for use in software you’re writing?