Registry / utility / const-format

const-format

JSON →
library0.2.36rscratesunverified

Compile-time string formatting with macros like `concatcp!` and `formatcp!`.

# Cargo.toml [dependencies] const_format = "0.2.36"
INSTALL
IMPORT
SIG · CONST-FORMAT
C
const-format
utilityrustv0.2.36
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

formatcp
use const_format::formatcp;

Creates a compile-time formatted string constant.

use const_format::formatcp; const GREETING: &str = formatcp!("Hello, {}!", "world"); fn main() { println!("{}", GREETING); }
Debug
Known issues
gotchaOnly supports a subset of formatting features; runtime formatting is not available.
fix
Use `std::format!` for runtime formatting when compile-time is not required.
affects: >=0.2.0
Upgrade
Version history
0.2.36latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
const-format — cargo add const-format · libregistry