That looks a lot like ructe [0], a templating language that I really love. It compiles templates to functions that you can call from Rust using a build script. The functions parameters are accessible from your templates. You can even import and run arbitrary rust code from your app: