Lightweight, modern, and easy-to-use C++ TOML serializer & deserializer.
Table of Contents
Mytoml is a modern, lightweight TOML parsing and serialization library for C++. It provides an easy-to-use interface for working with TOML data, including parsing TOML strings, creating TOML objects, and serializing TOML objects to strings.It provides a simple, type-safe API for working with TOML data in C++ projects.
Toml [Tom's Obvious Minimal Language]
TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics. TOML is designed to map unambiguously to a hash table. TOML should be easy to parse into data structures in a wide variety of languages.
More information about TOML can be obtained at here
π Project Structure
mytoml/
βββ CMakeLists.txt
βββ LICENSE
βββ mytoml.hpp
βββ mytoml.cpp
βββ tests/
β βββ test.c
β βββ test.cpp
βββ examples/
βββ basic.c
βββ basic.cpp
βββ sample.cppPlease ensure your runtime environment meets the following requirements:
- C++11 or newer compiler
- CMake (for building examples/tests)
Mytoml uses following software, tools and services:
- CMake as a general build tool
- (optional) Catch2 for unit and performance testing
- (optional) Mkdocs to build web documentation
- (optional) Doxygen to build code documentation
-
Clone the repository:
git clone https://github.com/djoezeke/mytoml.git
-
Add to your project:
- Copy
mytoml.hppandmytoml.cppinto your project. - Or add as a submodule and include in your build.
- Copy
-
Include in your code:
#include "mytoml.hpp"
-
Compile:
g++ my_source.cpp mytoml.cpp -std=c++17 -o main
π€ If you have a question, please check if it is already answered in the FAQ or the Q&A section. If not, please ask a new question there.
π If you want to learn more about how to use the library, check out the rest of the README, have a look at code examples, or browse through the help pages.
π§ If you want to understand the API better, check out the API Reference. π If you found a bug, please check the FAQ if it is a known issue or the result of a design decision. Please also have a look at the issue list before you create a new issue. Please provide as much information as possible to help us understand and reproduce your issue.
- π¬ Join the Discussions: Share your insights, provide feedback, or ask questions.
- π Report Issues: Submit bugs found or log feature requests for the
mytomlproject. - π‘ Submit Pull Requests: Review open PRs, and submit your own PRs.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/djoezeke/mytoml
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.' - Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
See the CONTRIBUTING.md file for detailed information.
We would like to express our gratitude to the following projects and individuals whose work made this project possible:
- Catch2 as a unit-test framework.
- Clang for coding style checks, and static/runtime analysis.
- CMake for build automation.
- Google Benchmark to implement the benchmarks.
- Material for MkDocs for the style of the documentation site
- MkDocs for the documentation site.
- Valgrind for memory leak check & correct memory management.
- GitHub Changelog Generator to generate the ChangeLog.
The open-source community for their invaluable libraries, tutorials, and support.
Note
If you feel your work should be acknowledged here, please open an issue or pull request.
This project is protected under the MIT License.