kissreplace
KISS template engine for
@VAR@placeholders.
A minimal, zero-macro template engine that replaces @VARIABLE@ patterns in strings and paths.
Designed for build tools, code generators, and configuration templating where simplicity matters.
Features
- Simple syntax:
@VAR_NAME@placeholders, nothing more - Type-safe: Uses
HashMap<String, String>— no proc macros, no DSL - Path-aware: Replace variables in file/directory names, not just file contents
- Graceful degradation: Unknown or invalid variables are preserved as-is
- Optional async: Async API available behind the
asyncfeature flag
Quick Start
Add to your dependencies:
cargo add kissreplace
Basic usage:
use ;
let mut vars = new;
vars.insert;
vars.insert;
let result = vars.replace_str;
assert_eq!;
// Works with paths too:
let paths = vars.replace_paths;
Documentation
Full API reference and advanced usage examples are available in the book.
License
MIT OR Apache-2.0