gtmpl-rust
The Golang Templating Language for Rust
[]
= "0.2.0"
Current Limitations
This is work in progress. Currently the following features are not supported:
- complex numbers
- the following functions have not been implemented:
html
,js
,call
andprintf
Usage
Basic template rendering can be achieved in a single line.
extern crate gtmpl;
use gtmpl;
For more examples please take a look at the gtmpl documentation.
Context
We use gtmpl_value's Value as internal
data type. gtmpl_derive provides a
handy derive
marco to generate the From
implmentation for Value
.
See:
- gtmpl_value at crates.io
- gtmpl_value documentation
- gtmpl_derive at crates.io
- gtmpl_derive documentation
Why do we need this?
The main motivation for this is to make it easier to write dev-ops tools in Rust which feel native. Docker and Helm (Kubernetes) use golang templating and feels more native if tooling around them uses the same.