Fast and Simple Rendering in #rust using Proc Macros
▻https://hackernoon.com/fast-and-simple-rendering-in-rust-using-proc-macros-f0d919eb6475?source=
I’ve been working on a project called Thruster recently, and needed a way that a developer could reasonably use templates. Thruster is a middleware based web server written in Rust (get it, th-rust-er? I’m working on my tight 5 for amateur night at The Apollo,) and as such, I needed a way to load HTML templates and insert variables into them in a performant way. Rather than poking around the numerous existing libraries and choosing one made by someone I don’t know — stranger danger! — I decided to make it myself. This article is about that journey, the unbelievably thrilling adventures of writing my first proc_macro_derive in Rust. Cue the Indiana Jones music.The first thing you need to know, is that I’m not what I’d call a systems guy. I picked up rust because I wanted a newer language that was (...)
#rendering-in-rust #proc-macros #web-development #programming