ct-austin/ifmt
Inline expression interpolation for Rust.
{ "createdAt": "2019-04-20T07:44:46Z", "defaultBranch": "master", "description": "Inline expression interpolation for Rust.", "fullName": "ct-austin/ifmt", "homepage": "https://crates.io/crates/ifmt", "language": "Rust", "name": "ifmt", "pushedAt": "2023-09-02T11:54:28Z", "stargazersCount": 200, "topics": [ "macro", "proc-macro", "rust", "rust-crate", "string-interpolation", "strings", "sugar", "syntax" ], "updatedAt": "2025-10-31T01:27:11Z", "url": "https://github.com/ct-austin/ifmt"}A small crate which brings inline string interpolation to rust’s standard formatting macros.
Getting started
Section titled “Getting started”To use ifmt in your project, add
[dependencies]ifmt = "0.3.3"to your Cargo.toml.
Examples
Section titled “Examples”let four = 4;iprintln!("four plus four is: " four + 4);// four plus four is: 8iprintln!("here's a hex number: 0x" 0xb0bi64 * 1321517i64 ;x);// here's a hex number: 0xdeadbeefiprintln!("here's a debugging value: " Some(four);?);// here's a debugging value: Some(4)Supported macros
Section titled “Supported macros”format! -> iformat!print! -> iprint!println! -> iprintln!eprint! -> ieprint!eprintln! -> ieprintln!write! -> iwrite!writeln! -> iwriteln!panic! -> ipanic!format_args! -> iformat_args!License
Section titled “License”This project is licensed under the MIT license or the Apache 2.0 license at your option.