paint-brush
Fast and Simple Rendering in Rust using Proc Macrosby@MertzAlertz
1,755 reads
1,755 reads

Fast and Simple Rendering in Rust using Proc Macros

by Pete Mertz4mApril 10th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

I’ve been working on a project called <a href="https://github.com/trezm/thruster" target="_blank">Thruster</a> 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 <code class="markup--code markup--p-code">proc_macro_derive</code> in Rust. <a href="https://open.spotify.com/track/60ZYLVPmSNY9r0Uquaivvs?si=b5BbeA1tSLeIG2VNzjQhXw" target="_blank">Cue the Indiana Jones music</a>.

Company Mentioned

Mention Thumbnail
featured image - Fast and Simple Rendering in Rust using Proc Macros
Pete Mertz HackerNoon profile picture
Pete Mertz

Pete Mertz

@MertzAlertz

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Bitcoininsider