https://github.com/vlad441/ncpp
Минималистичная системная библиотека / Minimalistic system library
https://github.com/vlad441/ncpp
bigint bson cbor cpp98 gui hashing http http-server json libary md5 minimalistic network sha256 system tcp tcp-server udp winxp zero-dependency
Last synced: 6 days ago
JSON representation
Минималистичная системная библиотека / Minimalistic system library
- Host: GitHub
- URL: https://github.com/vlad441/ncpp
- Owner: vlad441
- License: other
- Created: 2025-05-05T23:21:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-05-06T16:04:51.000Z (6 days ago)
- Last Synced: 2026-05-06T16:35:17.799Z (6 days ago)
- Topics: bigint, bson, cbor, cpp98, gui, hashing, http, http-server, json, libary, md5, minimalistic, network, sha256, system, tcp, tcp-server, udp, winxp, zero-dependency
- Language: C++
- Homepage: http://ncpp.art
- Size: 874 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-EN.md
Awesome Lists containing this project
README
 [](https://ru.cppreference.com/w/cpp/98) [](https://ru.cppreference.com/w/cpp/11) [](README.md) [](README-EN.md) [](docs/ru/introduction.md) [](docs/en/introduction.md) [](https://github.com/vlad441/ncpp) [](https://github.com/vlad441/ncpp/blob/main/UNLICENSE) [](https://www.microsoft.com/windows) [](https://kernel.org)
**ncpp** (Node C++) — a minimalistic system library that aims to provide a simple and efficient cross-platform multitool inspired by Node.js documentation.
ncpp offers implementations across various domains for C++98 standards and above, such as buffer handling, files, networking, encryption, and more, while minimizing external dependencies and maintaining a minimal footprint.
[Features](#features)
[Build](#build)
- [Dependencies](#dependencies)
- [Direct Source Inclusion](#direct-source-inclusion)
[Usage](#usage)
- [Examples](#examples)
[Documentation](#documentation)
## Features
- **Core:**
- Standard containers: Array, String, Buffer, HashMap.
- Standard conversions: numbers <-> strings, etc.
- **System:**
- Standard I/O (readline/print).
- File system operations.
- System information gathering.
- Process and thread management.
- Console: console management.
- Network: Sockets (TCP/UDP/Unix), HTTP client, TCP/HTTP server, WebSockets.
- Date and system time utilities.
- **Structures and Algorithms:**
- CBOR/JSON/BSON support.
- BigInt: Arbitrary-precision integers.
- **Cryptography:**
- Hashing (MD5, SHA1/2/3).
- Symmetric encryption (AES).
- **Graphics:**
- WinApi/X11 window initialization.
- OpenGL context initialization.
- Event handling.
## Build
- **Compiler Support**:
- [x] GCC/MinGW >= 3.4.2 (recommended >= 4.9.2)
- [x] Clang >= 3.5.2
- [ ] ~~MSVC~~ (not planned)
- **Standard Support**: >= C++98
- **OS Support**:
- [x] Windows XP/7/10+
- [x] Linux >= 2.6.18 (recommended >= 3.10.0)
- [x] X11
- [ ] Wayland
- [ ] FreeBSD (not planned in the near future)
- [ ] Android (not planned in the near future)
- [ ] ~~MacOS, iOS~~ (not planned)
### Dependencies
The project strives to minimize external dependencies, though some components may require additional packages:
- **Windows**: - (All necessary components are already included in the standard system setup)
- **Linux**: Requires `glibc`/`musl` (Usually included in the minimal setup of any distribution)
For `GUI`, `GL`, and `Experimental` components, the following packages may be required:
```bash
# GUI -> X11 packages:
apt install libx11-dev libxtst-dev -y --no-install-recommends
# GL -> OpenGL packages:
apt install libgl1-mesa-dev -y --no-install-recommends
# Experimental -> Audio:
#apt install libasound2-dev -y --no-install-recommends
# Experimental -> Images: Requires stb_image implementation (Not included in the project code)
```
### Direct Source Inclusion
This is the primary (and currently only) method, especially if you want to manually choose the optimization level when compiling each project for a specific platform.
To simplify and speed up the build, a `Unity Build` style is used, where a single translation unit (master file) is compiled from `.cpp` files in the required sequence. This helps with optimizations but may consume more memory compared to classical modular builds.
You can use the `make.sh`/`make.bat` scripts in the `scripts` directory for this purpose. (Must be run from the `scripts` directory).
By default, the script will build the `example.cpp` located in the project root.
Additionally, you can simply include the master file `#include "src/ncpp.cpp"` in your code. This will include the full library implementation into your file.
(Note: in this case, you may need to manually set compiler flags and link system libraries).
#### Windows
```batch
git clone --single-branch --branch main --depth 1 https://github.com/vlad441/ncpp.git
::Or: you can download the archive: https://github.com/vlad441/ncpp/archive/refs/heads/main.zip
::Since Git automatically converts line endings to LF, you may need to change the line ending format to CRLF for make.bat when downloading the archive
cd ncpp/scripts
make.bat
```
#### Linux
```bash
git clone --single-branch --branch main --depth 1 https://github.com/vlad441/ncpp.git
#Or: you can download the archive: https://github.com/vlad441/ncpp/archive/refs/heads/main.zip
cd ncpp/scripts
chmod 755 make.sh
bash make.sh
```
## Usage
### Examples
You can check out the simple [example.cpp](example.cpp) in the root of the project.
You can also find a few examples in the [examples section](docs/ru/introduction.md#examples) of the documentation.
## Documentation
For more detailed information, you can find the documentation [here](docs/en/introduction.md).