Skip to content

0xEDU/libftpp

Repository files navigation

libftpp

Further Exploration into Advanced C++

Welcome to libftpp – a powerful and modern C++ toolbox without any dependency on external libraries.

🛠 Features

  • 📦 A modular and extensible architecture
  • 🧵 Thread-safe containers and utilities
  • 🔁 Custom implementations of commonly-used design patterns
  • 🌐 High-level abstractions for network programming
  • 🧮 Tailored math utilities and random generators
  • 📚 Zero reliance on external libraries — everything is built from the ground up

📦 Project Structure

libftpp/
├── include/        # Header files for public APIs
├── sources/            # Core library source code, each class in its own file
├── tests/          # Integration tests for the library
└── Makefile        # Build system

🛠 Requirements

  • C++20 or later
  • POSIX-compliant system (Linux, macOS, etc.)
  • GNU Make

🔧 Build Instructions

To build the library, simply run:

make

This will compile the library into a static library file named libftpp.a.

🧪 Running tests

To run the tests, execute the following command:

make test

This will compile the mains in the tests/ directory and link them against the libftpp.a library. The resulting executables will be placed in the bin/ directory.

Most tests are equipped with a test framework that will pretty print the output, but there are a few exceptions:

  • Threading classes need to be manually tested with valgrind --tool=helgrind ./bin/<threading-binary> to check for race conditions or deadlocks.
  • Networking classes should be manually tested by first running the server ./bin/main_server then running clients in separate terminals with ./bin/main_client. The server will print the received messages, and the clients will print the responses from the server.

About

libftpp - Further Exploration into Advanced C++! École 42 project.

Topics

Resources

Stars

Watchers

Forks