4 ms·
I wanted to make a cli tool for rendering templates with mini jinja and also for users to write their own little library of functions/filters etc in Lua using m
by VWWHFSfQ 2y ago
I wanted to make a cli tool for rendering templates with mini jinja and also for users to write their own little library of functions/filters etc in Lua using mlua and then be able to use those in their templates. Unfortunately didn't work. All kinds of issues with mini jinja and mlua interactions when trying to add_filter, add_function, etc.
This was awhile ago though. Maybe something changed and I should try it again
- the_mitsuhiko 2y agoYou cannot register filters with a non 'static lifetime. However it’s not super hard to work around. Usually an Arc<Mutex> is all you need.