Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



You 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: