On this page:
TOML Config:   Configuration Languages for Racket
9.0.0.6

TOML Config: Configuration Languages for Racket🔗ℹ

Joel Dueck

TOML (Tom’s Obvious Minimal Language) is a configuration file format that’s easy to read due to obvious semantics.

Racket has a spec-compliant TOML parser in the toml package. This package builds on that functionality to provide a #lang for TOML documents, and facilities for building your own custom #langs for TOML documents that validate their contents against an expected schema. This can be useful to authors of Racket frameworks, when they want users to be able to supply configuration data in a friendly syntax, that can also validate itself at compile time.

Bug reports and contributions are welcome at the GitHub repo.

    1 Basic usage

      1.1 Importing data from TOML modules

      1.2 Custom TOML #langs

    2 Module Reference

      2.1 Basic TOML DSL

      2.2 Custom TOML DSLs

        2.2.1 Basic usage (no validation)

        2.2.2 With a schema

        2.2.3 Using additional bindings in the schema

      2.3 Low-level APIs

        2.3.1 Validation

        2.3.2 Syntax reader

    3 Appendix