2 unstable releases

Uses new Rust 2024

0.2.0 Aug 23, 2025
0.1.0 Mar 28, 2025

#2306 in Rust patterns

Download history

66 downloads per month
Used in cdefmt-decoder

GPL-3.0 license

75KB
1.5K SLoC

rformat: A flexible runtime formatting library for Rust, supporting custom and standard formatting traits.

This crate provides a formatting engine similar to Rust's standard formatting macros, but with extensibility for custom types and formatting behaviors.

Unlike Rust's built-in formatting macros, rformat parses the format string at runtime. This means you can generate or modify the format specification dynamically at runtime, rather than being limited to hardcoded, compile-time format strings. This enables advanced use cases such as user-driven formatting, dynamic templates, or runtime format spec construction.

Modules

  • error: Error types for formatting operations
  • fmt: Formatting engine and traits
  • formattable: Type-erased wrapper for formattable values
  • prelude: Commonly used traits and macros

Dependencies

~0.6–1MB
~17K SLoC