ToFu is a versatile, platform-independent library offering a comprehensive suite of data structures, algorithms, and a generic Tofu type, all designed to facilitate high-performance and reliable software development. Written in both C and C++, ToFu is engineered to deliver optimal performance across a wide range of operating systems. The library employs the Meson build system, ensuring a streamlined development and deployment process.
- Cross-Platform Compatibility: Ensures consistent performance and functionality across major operating systems, including Windows, macOS, and Linux.
- Modular Design: Provides a suite of modular components that can be easily integrated and customized to suit specific project needs.
- Efficient Build System: Utilizes the Meson build system for its C and C++ components, known for fast build times and a user-friendly syntax.
- High Performance: Implemented in C and C++ to maximize performance and resource efficiency, suitable for both desktop and embedded applications.
- Extensive Documentation and Examples: Includes comprehensive documentation and example code to help developers get started quickly and effectively.
To get started, ensure you have the following installed:
- Meson Build System: If you don’t have Meson
1.8.0
or newer installed, follow the installation instructions on the official Meson website. - Conan Package Manager: If you prefer using Conan, ensure it is installed by following the instructions on the official Conan website.
To add a git-wrap, place a .wrap
file in subprojects
with the Git repo URL and revision, then use dependency('fossil-tofu')
in meson.build
so Meson can fetch and build it automatically.
packages directly from a GitHub repository if it contains a valid conanfile.py
.
conan install git+https://github.com/fossillogic/fossil-tofu.git#v0.2.2 --name fossil_tofu --build=missing
Add the fossil-tofu.wrap
file in your subprojects
directory and include the following content:
[wrap-git]
url = https://github.com/fossillogic/fossil-tofu.git
revision = v0.2.2
[provide]
dependency_names = fossil-tofu
Note: For the best experience, always use the latest releases. Visit the releases page for the latest versions.
ToFu offers configurable options to tailor the build process to your needs:
- Running Tests: To enable testing, configure the build with
-Dwith_test=enabled
.
Example:
meson setup builddir -Dwith_test=enabled
The project is designed so that test cases serve two purposes:
- ✅ Unit Tests – validate the framework’s correctness.
- 📖 Usage Samples – demonstrate how to use these libraries through test cases.
This approach keeps the codebase compact and avoids redundant “hello world” style examples.
Instead, the same code that proves correctness also teaches usage.
This mirrors the Meson build system itself, which tests its own functionality by using Meson to test Meson.
In the same way, Fossil Logic validates itself by demonstrating real-world usage in its own tests via Fossil Test.
meson test -C builddir -v
Running the test suite gives you both verification and practical examples you can learn from.
For those interested in contributing, reporting issues, or seeking support, please open an issue on the project repository or visit the Fossil Logic Docs for more information. Your feedback and contributions are always welcome.