Skip to content

Replace cpptoml with tomlplusplus#449

Open
stanbot8 wants to merge 2 commits intoBioDynaMo:masterfrom
stanbot8:feat/replace-cpptoml-with-tomlplusplus
Open

Replace cpptoml with tomlplusplus#449
stanbot8 wants to merge 2 commits intoBioDynaMo:masterfrom
stanbot8:feat/replace-cpptoml-with-tomlplusplus

Conversation

@stanbot8
Copy link

@stanbot8 stanbot8 commented Feb 20, 2026

Summary

cpptoml is unmaintained (last commit 2018) and only supports TOML v0.5. This replaces it with tomlplusplus v3.4.0, an actively maintained, header-only TOML v1.0 parser.

Changes

  • Updated all config parsing in param.cc, param_group.cc, simulation.cc
  • Added a TomlConfig typedef (using TomlConfig = toml::table) in param_group.h so downstream AssignFromConfig signatures reference the typedef instead of the concrete library type
  • Kept a thin cpptoml.h compatibility wrapper so existing BDM_ASSIGN_CONFIG_VALUE macros continue to work
  • Removed the bundled cpptoml source

The TomlConfig typedef means downstream simulations can use the full tomlplusplus API (e.g. config.at_path(), dotted keys, TOML v1.0 features) without coupling to a specific library. This enables cleaner config handling in projects like my skin simulation that use modular multi-file TOML configs.

Test plan

  • CI build passes
  • TOML config parsing works correctly (simulation parameters, visualization, neuroscience params)

Migrate all TOML parsing from cpptoml to tomlplusplus. Introduce a
TomlConfig typedef to insulate downstream code from the concrete
library. Keep cpptoml in third_party/ with a deprecation pragma so
existing includes still compile. Move BDM_ASSIGN_CONFIG_VALUE macros
to a new toml_config.h and turn the old cpptoml.h utility header
into a forwarding shim with a deprecation warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant