#Templating engine (Askama, Tera)
17 messages · Page 1 of 1 (latest)
have you looked into trunk ?
No, not really, but it looks like replacement for tauri?
I'm coming from python world and have a desktop up built with FastAPI with jinja2 templates and HTMX, since python is a deployment nightmare I'm searching for better alternatives, played with tauri for past few days, managed to implement htmx and everything works like a charm. Last missing puzzle is porting those templates, not a deal breaker, but would be awesome to have it :).
tauri itself have static file server (kind of), you can use something to compile anything to html/js/css and save it in dist folder. then tauri will serve that to frontend web-view.
So it's possible to re-build the templates on each reload and serve them updated?
yes, you have to create some kind of server within tauri or as sidecar
I see, since rust is not my native lang probably re-designing frontend will be easier ^^
tauri is like cdn servers and it serve frontend to os web-view on custom protocol for safety. you have then multiple options to play in frontend and backend.
https://v2.tauri.app/develop/tests/webdriver/ page can hlep you understand how things work
No, not really, but it looks like replacement for tauri?
no, trunk is like vite. it compiles rust code for frontend with other stuff. it is used for development server and compile time only.
Got it, one way could be using axum + templating and serve it with tauri, but it's all new for me and at first I'm trying to minimalize friction
will your app get data from your servers ?if yes > then question do you need any code on user device that needs to be not js
you can do most stuff without doing much in rust as long as you are just creating single page app that can run in browser
and if you still need some action or few things needed done privatly use tauri commands or events
yeah, I need a lot of stuff from user, it's an app that simplifies crypto mining, need to gather some hardware info and access to local binaries etc
read everything https://v2.tauri.app/start/
fortend to backend comnications read https://v2.tauri.app/develop/calling-rust/
if you want to add other compiled binaries https://v2.tauri.app/develop/sidecar/ << you can add anything that runs in it and run it from frontend or rust