{"id":16572131,"url":"https://github.com/eddelbuettel/rcpptoml","last_synced_at":"2025-10-18T15:20:52.513Z","repository":{"id":29502102,"uuid":"33040061","full_name":"eddelbuettel/rcpptoml","owner":"eddelbuettel","description":"Rcpp Bindings to C++ parser for TOML files","archived":false,"fork":false,"pushed_at":"2025-03-08T15:02:58.000Z","size":632,"stargazers_count":36,"open_issues_count":1,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T03:11:13.697Z","etag":null,"topics":["c-plus-plus-11","cran","r","r-package","toml","toml-parser","toml-parsing"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eddelbuettel.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-28T16:11:30.000Z","updated_at":"2025-03-08T15:03:01.000Z","dependencies_parsed_at":"2024-12-26T19:06:35.746Z","dependency_job_id":"12e1d0fc-6b9f-4a6e-aeca-818a6276c335","html_url":"https://github.com/eddelbuettel/rcpptoml","commit_stats":{"total_commits":201,"total_committers":8,"mean_commits":25.125,"dds":0.06965174129353235,"last_synced_commit":"16edc25eb915e5fe3f3eecb2a3c27e1be814806f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Frcpptoml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Frcpptoml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Frcpptoml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Frcpptoml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddelbuettel","download_url":"https://codeload.github.com/eddelbuettel/rcpptoml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252771772,"owners_count":21801777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus-11","cran","r","r-package","toml","toml-parser","toml-parsing"],"created_at":"2024-10-11T21:26:30.062Z","updated_at":"2025-10-18T15:20:47.490Z","avatar_url":"https://github.com/eddelbuettel.png","language":"C++","funding_links":[],"categories":["Data Formats"],"sub_categories":[],"readme":"## RcppTOML: Rcpp bindings for [TOML](https://toml.io/en/)\n\n[![CI](https://github.com/eddelbuettel/rcpptoml/workflows/ci/badge.svg)](https://github.com/eddelbuettel/rcpptoml/actions?query=workflow%3Aci)\n[![License](https://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html)\n[![CRAN](https://www.r-pkg.org/badges/version/RcppTOML)](https://cran.r-project.org/package=RcppTOML)\n[![Dependencies](https://tinyverse.netlify.app/badge/RcppTOML)](https://cran.r-project.org/package=RcppTOML)\n[![Downloads](https://cranlogs.r-pkg.org/badges/RcppTOML?color=brightgreen)](https://www.r-pkg.org/pkg/RcppTOML)\n[![Last Commit](https://img.shields.io/github/last-commit/eddelbuettel/rcpptoml)](https://github.com/eddelbuettel/rcpptoml)\n\n### What is TOML?\n\n[TOML](https://toml.io/en/) is a configuration file grammar for humans. It is easier to read and\nedit than the alternatives yet arguably more useful as it is strongly typed: values come back as\ninteger, double, (multiline-) character (strings), boolean or Datetime. Moreover, complex nesting\nand arrays are supported as well.\n\nFor several years, this package used the C++11 library\n[cpptoml](https://github.com/skystrife/cpptoml) written by [Chase\nGeigle](https://github.com/skystrife).  However, as that library is no longer maintained, current\nversions now use the newer C++17 library [toml++](https://github.com/marzer/tomlplusplus) by [Mark\nGillard](https://github.com/marzer).\n\n\n### Example\n\nConsider the following [TOML](https://toml.io/en/) input example input:\n\n```toml\n# This is a TOML document.\n\ntitle = \"TOML Example\"\n\n[owner]\nname = \"Tom Preston-Werner\"\ndob = 1979-05-27T07:32:00-08:00 # First class dates\n\n[database]\nserver = \"192.168.1.1\"\nports = [ 8001, 8001, 8002 ]\nconnection_max = 5000\nenabled = true\n\n[servers]\n\n  # Indentation (tabs and/or spaces) is allowed but not required\n  [servers.alpha]\n  ip = \"10.0.0.1\"\n  dc = \"eqdc10\"\n\n  [servers.beta]\n  ip = \"10.0.0.2\"\n  dc = \"eqdc10\"\n\n[clients]\ndata = [ [\"gamma\", \"delta\"], [1, 2] ]\n\n# Line breaks are OK when inside arrays\nhosts = [\n  \"alpha\",\n  \"omega\"\n]\n```\n\nIt can be read in _one statement_ and once parsed, R now has properly _typed_ input as shown in\ndefault print method:\n\n```r\nR\u003e library(RcppTOML)\nR\u003e parseTOML(\"inst/toml/example.toml\")\nList of 5\n $ clients :List of 2\n  ..$ data :List of 2\n  .. ..$ : chr [1:2] \"gamma\" \"delta\"\n  .. ..$ : int [1:2] 1 2\n  ..$ hosts: chr [1:2] \"alpha\" \"omega\"\n $ database:List of 4\n  ..$ connection_max: int 5000\n  ..$ enabled       : logi TRUE\n  ..$ ports         : int [1:3] 8001 8001 8002\n  ..$ server        : chr \"192.168.1.1\"\n $ owner   :List of 2\n  ..$ dob : POSIXct[1:1], format: \"1979-05-27 15:32:00\"\n  ..$ name: chr \"Tom Preston-Werner\"\n $ servers :List of 2\n  ..$ alpha:List of 2\n  .. ..$ dc: chr \"eqdc10\"\n  .. ..$ ip: chr \"10.0.0.1\"\n  ..$ beta :List of 2\n  .. ..$ dc: chr \"eqdc10\"\n  .. ..$ ip: chr \"10.0.0.2\"\n $ title   : chr \"TOML Example\"\nR\u003e\n```\n\nSee the other examples and the [upstream documentation](https://toml.io/en/) for more.\nAlso note that most decent editors have proper [TOML](https://toml.io/en/) support\nwhich makes editing and previewing a breeze:\n\n![](https://raw.githubusercontent.com/eddelbuettel/rcpptoml/master/local/emacsAndTOML.png)\n\n### Installation\n\nInstallation from source requires a C++17 compiler, and `g++` versions 8 and onward should suffice.\n\n#### From CRAN\n\nThe package is on [CRAN](https://cran.r-project.org) and can be installed\nfrom every mirror via\n\n```{.r}\ninstall.packages(\"RcppTOML\")\n```\n\n#### From the ghrr-drat\n\nDevelopment releases may be provided by the\n[ghrr](https://ghrr.github.io/drat/) repository which can accessed via\n\n```{.r}\n## if needed, first do:  install.packages(\"drat\")\ndrat::addRepo(\"ghrr\")\n```\n\nafter which `install.packages(\"RcppTOML)` which access this repo.\n\nAlternatively, set the repo information on the fly as _e.g._ in\n\n```r\nrepos \u003c- c(\"https://ghrr.github.io/drat\", \"https://cloud.r-project.org\")\ninstall.packages(\"RcppTOML\", repos=repos)\n```\n\nwhich points to the [ghrr](https://ghrr.github.io/drat/) repository as well as a standard CRAN\nmirror, but just for the length of this installation step.\n\n### Status\n\nEarlier versions relied upon [cpptoml](https://github.com/skystrife/cpptoml) and were feature-complete with\n[TOML v0.5.0](https://toml.io/en/v0.5.0) (see the\n[tests/](https://github.com/eddelbuettel/rcpptoml/tree/master/tests) directory).  They already parsed\neverything that the underlying [cpptoml](https://github.com/skystrife/cpptoml) parsed with the same\n(sole) exception of unicode escape characters in strings.\n\nSince switching to [toml++](https://github.com/marzer/tomlplusplus) the package takes advantage of its  comprehensive TOML v1.0.0 support and should now be fully 1.0.0 compliant. Some new tests were added to demonstrate this.\n\nAs [toml++](https://github.com/marzer/tomlplusplus) also offers export to JSON and YAML as well as\nTOML writing, we may add support to some of these features going forward.\n\n\n### Continued Testing\n\nAs we rely on the [tinytest](https://cran.r-project.org/package=tinytest) package, the\nalready-installed package can also be verified via\n\n```r\ntinytest::test_package(\"RcppTOML\")\n```\n\nat any point in time.\n\n### Author\n\nDirk Eddelbuettel\n\n### License\n\nGPL (\u003e= 2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddelbuettel%2Frcpptoml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddelbuettel%2Frcpptoml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddelbuettel%2Frcpptoml/lists"}