A library written in C++ with common features.
Features:
- 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 basic scene system.
- Files manipulation.
- URI manipulation.
- and more!
OS | Compatibility |
---|---|
Windows | ✔ |
Mac OSX | ✔ |
Linux | ✔ |
Android | ⚠ |
iOS | ❌ |
WebAssembly | ⚠ |
FreeBSD | ✔ |
OpenBSD | ⚠ Not tested ⚠ |
NetBSD | ⚠ Not tested ⚠ |
DragonFly | ⚠ Not tested ⚠ |
Solaris | ❌ Not tested |
Haiku | ❌ |
✔: Supported ⚠: Partial support / Not tested ❌: Not working
on:
- i686
- amd64
- ARMv7
- ARMv8
- riscv32
- riscv64
#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;
}
Download the latest ZIP file of, the compiled binaries and the headers for Windows on GitHub. Or install from source.
Please install from source.
Just install lambdacommon from AUR
Please install from source.
Include the source files in your project.
Please install from source.
The CMake command will change a bit, please use cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE="Release" ..
instead.
Install from source. Other than FreeBSD may not work correctly.
Build the sources with CMake and make and install with make install
, and keep the install manifest to allow the uninstallation with make uninstall
.
Use Findlambdacommon.cmake
in LambdaCMakeModules to find λcommon on your computer.