Developing a Tauri app over SSH #6357
GeckoEidechse
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
Hey, did you find another way to do this in the end? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Update: my awful, janky solution is this:
rsync ./airhorn [email protected]:~/projects/airhorn/target/debug/airhorn
./airhorn The stuff after the
It's not a great solution by any means, but it works. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
I have a laptop that is quite weak and compiling any Rust project, especially one with many dependencies can take quite a long time. At the same I have remote access to a desktop that is powerful. As such doing development via a remote connection, e.g. using Visual Studio Code Remote - SSH is nice way to work on a light and mobile device while also having access to powerful hardware.
Problem
Now developing GUI applications remotely is always a struggle.
Either one has to initiate a remote desktop session, X-forwarding (if on X11), or stub out the GUI aspects of the application and rely solely on CLI inputs.
Overall, all approaches have some drawback, remote desktop or X-forwarding means larger latency and higher data transmission (i.e. sending each frame of the application/desktop) and relying solely on CLI inputs means any GUI development is completely impossible.
Solution?
This is where technologies like Electron or Tauri (👀) have their advantage as the GUI aspect of the application can be run entirely in the browser.
This means we could simply launch an SSH Tunnel to our remote development machine and load (the GUI part of) our application in the browser like we would a normal webpage.
For a taste of this, one can setup their dev environment to tell Tauri to load the GUI from a local webserver as described in this YouTube video.
When set up like this one can also just access the GUI part via a browser.
Now the issue is that any
invoke()
call simply won't work when run in the browser as it tries to call into some native function(?).As such for this setup to work we would need some form of proxy that basically turns every
invoke()
into a call to the proxy itself and then the proxy would pass the call and arguments to the native function, as well as returning the results of the function call.So the setup would look something like this
Drawbacks
This approach is not without drawbacks. Most importantly native elements of Tauri do not translate to a browser session and would have to be either simulated/converted to HTML UI elements or would simply stay inaccessible.
Beta Was this translation helpful? Give feedback.
All reactions