gtmpl-rust
The Golang Templating Language for Rust
[]
= "0.1.2"
Current Limitations
This is work in progress. Currently the following features are not supported:
- complex numbers
- comparing different number types
eq 1 1.0
will befalse
- the following functions have not been implemented:
html
,js
,call
andprintf
For now we use serde_json's Value as internal data type. However, this can not support passing functions to the context. In a future release we will move to a custom data type that will be compatible with serde_json.
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.
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.