GitPedia

Ifmt

Inline expression interpolation for Rust.

From ct-austin·Updated October 31, 2025·View on GitHub·

A small crate which brings inline string interpolation to rust's standard formatting macros. The project is written primarily in Rust, distributed under the Other license, first published in 2019. Key topics include: macro, proc-macro, rust, rust-crate, string-interpolation.

Latest release: v0.3.0
January 13, 2020View Changelog →

ifmt

A small crate which brings inline string interpolation to rust's standard formatting macros.

Getting started

To use ifmt in your project, add

toml
[dependencies] ifmt = "0.3.3"

to your Cargo.toml.

Examples

rust
let four = 4; iprintln!("four plus four is: " four + 4); // four plus four is: 8 iprintln!("here's a hex number: 0x" 0xb0bi64 * 1321517i64 ;x); // here's a hex number: 0xdeadbeef iprintln!("here's a debugging value: " Some(four);?); // here's a debugging value: Some(4)

Supported macros

format!      -> iformat!
print!       -> iprint!
println!     -> iprintln!
eprint!      -> ieprint!
eprintln!    -> ieprintln!
write!       -> iwrite!
writeln!     -> iwriteln!
panic!       -> ipanic!
format_args! -> iformat_args!

License

This project is licensed under the MIT license or the Apache 2.0 license at your option.

Contributors

Showing top 4 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from ct-austin/ifmt via the GitHub API.Last fetched: 6/26/2026