λcommon

A library written in C++ with common features.

flash_on

Modern and flexible

λcommon is written in modern C++17 and it has a C wrapper.

It includes some of the new C++17 features like structured bindings, optional values, etc...

check

Features rich
  • - OS Detection
  • - System information (username, user directory, CPU name, memory usage, etc...)
  • - Terminal manipulation
  • - Resources management
  • - Basic string manipulation
  • - Basic maths utilities
  • - Graphics:
    •    * Color manipulation
    •    * Very vasic scene manipulation
  • - Files manipulation
  • - URI manipulation
  • - and more!

settings

Cross-platform

λcommon works on multiple platforms: x86, x64, ARM and RISC-V architectures with Windows, Linux, Mac OSX and Android.



Language grade: C/C++


Source code

What's the license of λcommon? It is MIT licensed.
Where can I find the code of λcommon? Well you can find it on GitHub!

Packages

λcommon is named lambdacommon in package repositories.

Packaging status

Example

#include <lambdacommon/system/system.h>

using namespace std;
namespace sys = lambdacommon::system;
namespace term = lambdacommon::terminal;

int main()
{
  term::setup();
  term::set_title("λcommon - example");

  cout << "Starting lambdacommon example with " << term::CYAN << "lambdacommon" << term::RESET << " v" << lambdacommon::get_version() << endl;
  cout << endl;
  cout << "Hello " << term::LIGHT_YELLOW << sys::get_user_name() << term::RESET << endl;
  // Sleep for 250ms
  sys::sleep(250);
  cout << endl << "I like your CPU, it is " << term::LIGHT_GREEN << sys::get_cpu_name() << term::RESET << " right?" << endl;
  sys::sleep(1000);
  // Clear all the content of the terminal.
  term::clear();
  cout << "Because I like my creators I want you to see their website!" << endl;
  sys::open_uri("https://aperlambda.github.io/");
  return 0;
}

Installation

Windows

Download the latest ZIP file of, the compiled binaries and the headers for Windows on GitHub.

Mac OSX

Please install from source.

Linux

ArchLinux (and variants)

Install λcommon from the AUR.

Android

As an app dependency

Include the source files in your project.

Termux

Please install from source.
The CMake command will change a bit, please use cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE="Release" .. instead.

From source

You will need to clone the repository of λcommon, then you'll build the sources with CMake and make (or MSBuild). λcommon will create targets named `install` and `uninstall` to simply install or uninstall the library.