ProductPromotion
Logo

C++ Programming

made by https://0x3d.site

GitHub - kala13x/libxutils: Simple and yet powerful cross-platform C library providing data structures, algorithms and much more
Simple and yet powerful cross-platform C library providing data structures, algorithms and much more - kala13x/libxutils
Visit Site

GitHub - kala13x/libxutils: Simple and yet powerful cross-platform C library providing data structures, algorithms and much more

GitHub - kala13x/libxutils: Simple and yet powerful cross-platform C library providing data structures, algorithms and much more

MIT License Linux MacOS Windows CodeQL Coverity Scan Build Status

libxutils - Cross-platform C library release 2.x

libxutils is a cross-platform C library that provides safer implementations of various functionality to make routine tasks easier for programs written in C and it's compatible languages like C++, Rust, and Objective C. The library offers a range of features including containers, data structures, network tools, cryptography algorithms, string manipulations, system utilities, HTTP/S & WS/WSS client/server, JSON parser/serializer, JWT tokens, and etc. A list of key features can be found below.

libxutils is available for Linux, Unix and Windows operating systems and is released under the MIT License. To check the version of the library you have, you can refer to the file src/xver.h. Please note that the list of features provided in the README is incomplete. For more information about the full range of features, you can refer to the individual header files linked below or browse the source code.

Containrers:

Network:

Cryptography:

System:

Miscellaneous:

Installation

There are several ways to build and install the project.

Using included script (recommended on Linux).

A relatively simple way to build and install the libary and tools is to use the included build script:

git clone https://github.com/kala13x/libxutils.git && ./libxutils/build.sh --install

List options that build script supports:

  • --prefix=<path> Install destination prefix for the library and header files.
  • --tool=<tool> Specify Makefile generation tool or use included Makefile.
  • --ssl=yes/no Manually enable or disable SSL support (default: yes).
  • --install Install library and the tools after the build.
  • --cleanup Cleanup object files after build/installation.
  • --examples Include examples in the build.
  • --tools Include tools in the build.

You can either choose cmake, smake or make as the tool argument, but cmake is recommended on platforms other than the Linux. If the tool will not be specified the script will use make (included Makefile) as default.

Using CMake

If you have a CMake tool installed in your operating system, here is how project can be built and installed using cmake:

git clone https://github.com/kala13x/libxutils.git
cd libxutils
cmake . && make
sudo make install

Using SMake

SMake is a simple Makefile generator tool for the Linux/Unix operating systems:

git clone https://github.com/kala13x/libxutils.git
cd libxutils
smake && make
sudo make install

Using Makefile

The project can also be built with a pre-generated Makefile for the Linux.

git clone https://github.com/kala13x/libxutils.git
cd libxutils
make
sudo make install

Build particular files only

If you want to use particular files and functions, you can configure the library and select only that functionality for the build. In this way, it is possible not to increase the size of the program and to avoid the linkage of unused code.

The libxutils project has a config file that contains a list of modules that will be included in the build. This file is used by the build.sh script, which resolves dependencies for each enabled module and generates a CMakeList.txt file.

Open xutils.conf file with a text editor and mark only the functionality you want to include in the build. Use a low-case y symbol to enable and any other symbol to disable modules. Removing a related line from the list will also disable the module.

Example:

...
USE_ARRAY=n
USE_CRYPT=n
USE_XTIME=n
USE_EVENT=y
USE_LIST=n
USE_XBUF=n
USE_HASH=n
USE_SOCK=n
USE_XLOG=y
USE_XSTR=n
...

After updating the configuration, use the build.sh script to generate the Makefile and build the project.

./build.sh --tool=cmake

You may notice that when you select only one module, several other modules may be also included in the build. Because some files depend on other files in the project, the build.sh script will automatically resolve these dependencies and include required files in the build as well.

For example, if you only mark HTTP library for a build, the socket library will be automatically enabled because HTTP uses some functionality from sockets.

Dependencies

The only dependency that the library uses is the openssl-devel package for the SSL and RSA implementations.
You can either install the openssl-devel package or disable the SSL support in the library.

Install OpenSSL development package

Red-Hat family: sudo dnf install openssl-devel
Debian family: sudo apt-get install libssl-dev

Disable SSL support in the library

If you use the build.sh script for building the project, you do not need to disable anything manually,
the script will automatically disable SSL support if the OpenSSL library is not installed in the system.

If you use raw Makefile to build the project, all you need to adjust CFLAGS and LIBS in Makefile.

  • Remove -D_XUTILS_USE_SSL entry from the CFLAGS.
  • Remove -lssl and -lcrypto entries from the LIBS.

Use build script to force disable SSL even if it is installed in the system:

./build.sh --ssl=no

Usage

Just include the required <xutils/*.h> header files in your source code and use -lxutils
linker flag while compiling your project. See the example directory for more information.

Tools & Examples

Use the included script to build or install CLI apps from the tools directory.
The script can be used to build the sources from the examples directory as well.

./libxutils/build.sh --tools --examples

These sources can also be built by using the CMake tool or Makefile from that directory.
You may need to export the SSL flag accordingly if you are doing a build without the script:

cd examples
export XUTILS_USE_SSL=y
cmake . && make

XTOP and more

XTOP is HTOP like performance monitor that supports to monitor CPU, memory, and network traffic into a single window. In addition, it has powerful REST API client/server mode and much more.

After building the sources in tools directory, run sudo make install command to install following apps in the system:

  • xcrypt - File and text encrypt/decrypt tool for CLI
  • xpass - Secure password manager tool for CLI
  • xjson - JSON linter and minifier tool for CLI
  • xhttp - Powerful HTTP client tool for CLI
  • xtop - Advanced resource monithor for CLI
  • xsrc - Advanced file search tool for CLI

Run each of this tool with -h argument to check out the usage and version information.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory