fmt
by
fmtlib

Description: A modern formatting library

View on GitHub ↗

Summary Information

Updated 15 minutes ago
Added to GitGenius on March 9th, 2026
Created on December 7th, 2012
Open Issues & Pull Requests: 14 (+0)
Number of forks: 2,920
Total Stargazers: 23,648 (+1)
Total Subscribers: 319 (+0)

Issue Activity (beta)

Open issues: 10
New in 7 days: 0
Closed in 7 days: 2
Avg open age: 213 days
Stale 30+ days: 6
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 1
Comments in 7 days: 1
Events in 7 days: 6

Top labels

  • question (256)
  • invalid (32)
  • help wanted (31)
  • duplicate (28)
  • enhancement (15)
  • wontfix (4)

Most active issues this week

Repository Insights (GitGenius)

Median issue/PR response: 5.8 hours
Mean response time: 104.8 days
90th percentile: 117.9 days
Tracked items: 539

Most active contributors

Detailed Description

The fmt library is an open-source C++ formatting library that provides a modern, fast, and safe alternative to C stdio and C++ iostreams. Written primarily in C++, it implements the C++20 std::format and C++23 std::print standards while offering a format string syntax similar to Python's format method. The library is designed to be both performant and type-safe, addressing longstanding limitations in C++ output formatting.

The core functionality centers on a simple format API with positional arguments for localization support. The library includes a fast IEEE 754 floating-point formatter using the Dragonbox algorithm that guarantees correct rounding, shortness, and round-trip properties. It provides portable Unicode support and a safe printf implementation that includes POSIX extensions for positional arguments. Users can extend the library to support custom user-defined types, and the implementation prioritizes high performance across multiple use cases including integer-to-string conversion, floating-point formatting, and file output operations.

Performance benchmarks demonstrate significant advantages over standard alternatives. In speed tests, fmt::print completes formatting operations in 0.44 seconds compared to 0.66 seconds for libc printf and 1.63 seconds for libc++ std::ostream, making it approximately 50 percent faster than printf. For floating-point formatting specifically, the library achieves 20 to 30 times faster performance than std::ostringstream and sprintf. Compile time remains competitive at 5.0 seconds for optimized builds, comparable to printf at 1.6 seconds and significantly faster than alternatives like Boost Format at 55.0 seconds. The executable size footprint is minimal, matching printf's binary size within rounding error.

The library maintains a minimal, self-contained codebase with no external dependencies and is available under a permissive MIT license. A minimal configuration requires only three header files: base.h, format.h, and format-inl.h. The implementation supports an optional header-only configuration via the FMT_HEADER_ONLY macro and maintains locale independence by default. The codebase is clean and warning-free even under strict compiler flags like -Wall -Wextra -pedantic, and it provides consistent output across different platforms with support for older compilers.

According to GitGenius activity tracking, the repository shows strong community engagement with a median issue and pull request response latency of 5.8 hours across 539 tracked items. The most active contributor is vitaut with 1661 recorded events, followed by dinomight with 27 events and phprus with 26 events. Question-tagged issues dominate the tracker with 255 items, while invalid and help-wanted tags account for 32 and 31 items respectively. The repository maintains overlapping contributors with major projects including ClickHouse, LLVM, and Microsoft VSCode, indicating its adoption in significant production systems.

The library includes extensive testing infrastructure with a comprehensive test suite and continuous fuzzing through the Chromium OSS-Fuzz program. Safety features include compile-time format string validation in C++20 and automatic memory management that prevents buffer overflow errors. Documentation is available at fmt.dev with cheat sheets and interactive examples in Compiler Explorer, while community questions are directed to StackOverflow with the fmt tag.

fmt
by
fmtlibfmtlib/fmt

Repository Details

Fetching additional details & charts...