Tombi TOML Toolkit

repository·main·Indexed 21 days ago

https://github.com/tombi-toml/tombi

A comprehensive TOML toolkit providing formatting, linting, and language server capabilities. The ecosystem includes crates for file-based caching (tombi-cache), date-time serialization (tombi-date-time), document tree representation (tombi-document-tree), and schema validation via JSON Schema (tombi-schema-store, tombi-validator). It features a high-performance parallel glob library (tombi-glob), a lossless syntax tree implementation (tombi-rg-tree), and an extensible plugin system for specialized TOML files like Cargo.toml.

Tokens
137.9K
Snippets
503
Records
731
Agent score
77%

What's inside Tombi

  1. Overview of Red Green Trees (rg-tree)

    main
    The rg-tree crate provides an implementation of Red Green Trees, also known as Lossless Syntax Trees, for Rust. Inspired by rowan from rust-analyzer, it is designed to be a fast, safe, and convenient way to handle syntax trees while preserving all original source information (including whitespace and comments) for lossless transformations.
  2. Overview of tombi-glob

    main

    tombi-glob is a high-performance Rust library designed for parallel directory traversal and glob pattern matching. It is optimized for speed and memory efficiency, making it suitable for large directory structures. Key capabilities include:

    • Fast Glob Pattern Matching: Uses an NFA-based algorithm via fast-glob.
    • Parallel Directory Traversal: Leverages Rayon for high-speed parallel processing.
    • Async Support: Provides runtime-independent async file search functionality.
    • Git Integration: Automatically recognizes and respects .gitignore files.
    • Memory Efficiency: Designed to operate efficiently even with massive directory trees.
  3. Overview of the toml-version crate

    main
    The toml-version crate is a specialized utility designed to centralize the logic for handling different versions of the TOML specification. It is used by other crates within the Tombi ecosystem to resolve dependencies and ensure consistent behavior when logic must vary based on the specific TOML version being processed.
  4. Overview of the tombi package

    main

    The tombi package is a reserved package intended to serve as the core library for the Tombi ecosystem. While currently a placeholder, its future purpose is to provide a library that automatically reads Tombi configuration files and generates formatted text.

    Planned features include:

    • Implementation of serde::Serialize and serde::Deserialize for Tombi data structures.
    • Integration with tombi::Document.
    • Native support for TOML configuration (potentially abstracting away the toml crate dependency).
  5. Overview of Tombi TOML Toolkit

    main
    Tombi (pronounced /toɴbi/) is a TOML toolkit that provides a Formatter, Linter, and Language Server. It is designed to improve the developer experience when working with TOML files across various editors and environments.
  6. Use the Tombi Cargo Extension for workspace navigation

    main

    The Tombi Cargo Extension enhances the Tombi Language Server with specific functionality for Rust projects. Its primary feature is Workspace Root Navigation, which allows you to jump directly from a member crate's Cargo.toml to the workspace root Cargo.toml (the one containing the [workspace] section).

    This navigation is triggered when you are working in a Cargo.toml file that contains either:

    • workspace = true
    • *.workspace = true settings

    This is particularly useful in large Rust projects to quickly access global workspace configurations from individual member crates.

  7. Use tombi-uri for cross-platform Url compatibility

    main

    The tombi-uri crate provides a utility layer for Url compatibility across different platforms, specifically addressing limitations in WASM environments.

    In non-WASI WASM environments, standard methods like url::Url::from_file_path (which handle file:// URLs) are often unavailable. This crate provides compatible functions that gracefully fallback to Err(()) in these scenarios, preventing runtime crashes or compilation errors in WASM-targeted builds.