I'm building a multi-platform app, where the GUI is used during install and very seldomly users wll open it to check status of the app.
Most of the time it needs to run on startup in the background, possibly as a service (I believe Windows services cannot have a GUI so might be different for Windows).
Was wondering if anyone dome something simliar and can give some pointers.
#Tauri in background
6 messages · Page 1 of 1 (latest)
https://tauri.app/v1/guides/features/system-tray/
You could add the app to the system tray and have it run in the background. A menu in the system tray could be used to display the gui, and when you close the window just hide it instead.
in windows you could auto start it by setting it up in shell:startup
I imagine that's probably the easiest way to get going without having to have separate services running that have to communicate with each other.
What about plugins ? Auto start ?
With windows, like I said, you should just be able to set it up in shell: startup.
With Linux I think you make a .desktop file or something and set it up in there. I'm not as familiar with Linux.
On Mac I have even less of an idea how you do it, but I'm sure you can.
The only real consideration is if you want the app to start running even before a user logs in. On Windows you'd have to make a service rather than just use shell: Startup. On Linux maybe you'd use cron or systemd. I don't really know about Mac. That maybe complicates things a little, but the previous answer should work if you can start it on user login.
As far as plugins go, I suppose that depends on your needs. I'm new to rust, but my understanding is everything needs to be statically linked, so if your plugins involve dynamically loading rust binaries that may not be so easy. So you'd have to figure out how to bundle a plug-in. Could do all JavaScript maybe for your plug-in system.
I did this recently in RustDuck project.
It simple and small code base so you can easily learn from it.
Also it's effective, when the app closed to tray it doesn't take a lot of resources (few mb)
https://github.com/thewh1teagle/RustDuck
GitHub
Cross platform dynamic DNS updater for duckdns.org - thewh1teagle/RustDuck
Will check it out , thanks !