I wanted to build a desktop app and I had heard great things about Tauri. Unfortunately the existing templates for combining Elm with Tauri either didn’t work for me, or used different components than what I’d have picked.
So I developed my own template:
It took me quite a few tries to find a setup that worked well. (Elm Land didn’t work, Parcel crashed regularly, pure Elm is missing hot reloading, …). In the end I settled with:
elm-watch for hot reloading and bundling. (Since desktop apps don’t have to handle a URL, plain Elm is good enough.) Thanks @lydell for building it!
Sweet. I’ve used Tauri at work for our desktop app. It’s quite nice.
Is there a reason you don’t use vite in your template considering tauri uses vite by default? I haven’t had an experience with bun, but I noticed you chose that.
Vite would have been the next I thing I would have tried if elm-watch hadn’t worked . But I was happy with elm-watch, so I kept it. Is there anything I would gain by using Vite?
Bun is just for installing dependencies and executing the CLI tools. It’s really fast at that, so I like to use it for that nowadays. However, when setting up CI, I realized that it’s not working properly with Windows. So for the Windows build I’m actually using node.js now.
I haven’t used elm-watch either, does it do bundling of javascript? Your template repo doesn’t seem to have any js files or require any bundling of js files/assets.
So for instance how would you call a tauri command from your elm app?