| Crates.io | oxc-toml |
| lib.rs | oxc-toml |
| version | 0.14.2 |
| created_at | 2025-12-19 09:39:54.591759+00 |
| updated_at | 2025-12-24 06:52:26.664495+00 |
| description | A TOML formatter library |
| homepage | https://github.com/oxc-project/oxc-toml |
| repository | https://github.com/oxc-project/oxc-toml |
| max_upload_size | |
| id | 1994474 |
| size | 218,318 |
A TOML formatter library.
This library provides TOML formatting capabilities while preserving comments, whitespace, and the original document structure where appropriate.
use oxc_toml::{format, Options};
const SOURCE: &str = "value=1\n[table]\nstring='some string'";
let formatted = format(SOURCE, Options::default());
Format all TOML files in a directory:
cargo run --example format_directory [PATH]
This example uses the ignore crate to walk a directory tree and format all TOML files, respecting .gitignore and other ignore files.
This project is a formatter-only fork of the excellent Taplo project, originally created by Ferenc Tamás.
This fork strips away all non-formatter components from Taplo, including:
The result is a focused, lightweight library that does one thing well: format TOML documents.
Taplo is a comprehensive TOML toolkit that provides:
If you need these features, please use the original Taplo project.
This project maintains the original MIT License from Taplo. See LICENSE for details.