microtemplate
A fast, microscopic helper crate for runtime string interpolation.
Design Goals
- Very lightweight: I want
microtemplate
to do exactly one thing. There's no reason to include more feature-rich/large libraries likeregex
/handlebars
/tinytemplate
if all you need is string interpolation. -
- Zero extra runtime sub-dependencies: The only dependencies used are for the derive macro, which is handled at compile time.
- Fast: I'm interested in making this library as fast as I can make it. It's extremely fast right now, but I do not believe it is perfect.
- Simple.
Quickstart
Add microtemplate
to your dependencies:
[]
= "1.0.3"
Usage example (from the tests):
use ;
// This derive allows microtemplate to use the struct as substitutions.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
If you have any bug reports, improvements, or feature requests, please make an issue