Rebuilding the fundamental bricks of the C standard library and creating a personal reusable library for future 42 projects.
This project is the very first milestone of the 42 Paris curriculum.
Its purpose is to reimplement core functions of the C standard library (strlen, memcpy, strchr, β¦), while progressively extending it with higher-level utilities, in order to build a robust and reusable personal C library: libft.
This library is designed to be reused across most 42 projects
(ft_printf, push_swap, minishell, β¦)
and to serve as a long-term foundation for all future C developments.
- Reimplement libc fundamentals (strings, memory, characters, conversions)
- Provide safe and reusable abstractions on top of low-level C APIs
- Add extended utilities beyond the mandatory subject:
- dynamic buffers (
buff_*) - linked lists
- math helpers
- formatted output helpers
- dynamic buffers (
- Ensure:
- strict 42 Norm compliance
- no memory leaks
- well-defined API contracts (ownership, lifetime, error handling)
-
π¦ Dynamic growable buffer API (
buff_*)
Designed to minimize reallocations and simplify string / I/O manipulation. -
π§ Explicit memory contracts
Ownership, borrowing, and lifetime rules are documented for all public APIs. -
π Extended utility set
Helpers that go beyond the libc scope while remaining dependency-free. -
π Fully documented public API
Automatically generated documentation using Doxygen.
The full API documentation is generated from the source code using Doxygen.
It focuses on public interfaces, while internal helpers remain accessible through call graphs for deeper understanding.
β‘οΈ Browse the libft API documentation
The documentation describes:
- function contracts
- ownership & lifetime rules
- warnings and undefined behavior
- public data structures
libft/
βββ libft.h # Public API
βββ src/ # Implementations
βββ docs/
β βββ Doxyfile # Doxygen configuration
β βββ html/ # Generated API documentation
βββ Makefile
βββ README.md
Basic build:
make # build libft.aClean up:
make clean # remove object files
make fclean # remove objects and libraryRebuild:
make re # full rebuildGenerate documentation locally:
make doc # generate docs/html/* filesRun unit tests (using my own test framework)
make test # run unit tests
βBuild your own standard library, and youβll never fear undefined behavior again.β π