Skip to content
BENIBIX Learn

Tom's Obvious Minimal Language (TOML)

Development📄 Files & FormatsConfig Files

Also known as TOML, .toml file

A simple format for settings. Titles sit in brackets, with one setting per line.

Think of it like

Think of it like a book with titles. Under each title, each line sets one thing.

Example

Emma sets her Python project's name and version in pyproject.toml. Her build tool reads both from there.

Why it matters

Rust and modern Python tools are set up in TOML. It is clear and hard to get wrong.

Definition

TOML is a simple text format for config files. It groups settings under headings in square brackets, like [package]. Each line sets one value, like name = "shop". It is stricter than YAML, so there are fewer surprises, and it allows comments. Rust projects use it in Cargo.toml, and Python projects use it in pyproject.toml.

Example code

toml
[package]
name = "shop"
version = "1.0.0"
Two settings under one heading.

Common mistake

Leaving quotes off text values. In TOML, name = shop is an error; it must be name = "shop".

Key takeaways

  1. 1
    Headings in brackets. Sections group the settings.
  2. 2
    One value per line. Each line says key = value.
  3. 3
    Strict but clear. Fewer surprises than YAML.

Learn it properly