5 ms·
I see your app is MacOS only at the moment. Are you re-writing it in Electron or what? Very curious
by gnrlst 5y ago
I see your app is MacOS only at the moment. Are you re-writing it in Electron or what? Very curious
- protonimitate 5y agoAlso curious - I'm spinning up a small side project with Rust and Svelte. Was looking in Tauri as a replacement for Electron but wondering what other approaches people have worked with (assuming this is a cross platform desktop app, that is).
- dceddia 5y agoTauri seems like a nice option. It's not as full-featured as Electron yet but their focus on security is great to see (last I saw they were getting the codebase professionally audited). The main reason I didn't go with it was just that doesn't seem to (yet?) suit my use case with zero-copy data transfer between Rust <-> Browser. My hope is that by writing most of my backend in Rust, that it'd be easy-ish to switch to Tauri or other options if something changes down the road.
- akiselev 5y agoI'm using quickjs (rquickjs specifically) to bind GTK's C API to Javascript and adding a light DOM wrapper (get/setAttribute, add/removeEventListener, etc) that covers all the functionality Svelte needs. I've had to make a few modifications to the compiler (<10 lines total) to get binding and CSS working but so far it's been great. Working in GTK with hot reload and instantaneous esbuild rebuilds is.... insane.
- dceddia 5y agoYeah, rewriting it with Electron + Svelte + a Rust backend for the heavy lifting. I looked at alternatives to Electron because I wanted to avoid the bloat, but nothing felt like the right fit. Tauri (https://tauri.studio/ https://tauri.studio/) is the most exciting, but I couldn't find a good way to get raw video frames into the UI without a bunch of expensive copies or serialization. I also looked at native toolkits like Qt (I've worked with it in the past) but I didn't love the idea of building lots of custom UI components without the benefit of HTML + CSS. So for now it's Rust + Electron, and I'm paying extra attention to performance.
- vips7L 5y agoDid you look at .Net solutions like Maui, xamarin, uno platform, or AvaloniaUI?
- dceddia 5y agoMy thought process was, if I’m gonna have to rewrite the app, I may as well use the web dev skills I already have, so that at least the UI work will be in my wheelhouse. Rust is new to me, as is low-level ffmpeg stuff, both of which I’ve had to learn from scratch. I learned Swift in order to build the Mac app, and I know from that experience that building custom UI controls while learning a new ecosystem slowed me down a lot. I didn’t love the idea of repeating that experience, and where I’m headed there’s gonna be a good bit of custom UI.
- spoils19 5y agoSounds like an easier process for you, but at the cost of your users. This proliferation of web tooling when it clearly doesn't suit the environment (desktop) is part of the reason why our software is getting slower, even as our hardware is improving.
- cakoose 5y agoNot always at the cost of the users? If dceddia is able to add features and fixes more quickly, that's good for users too. And if Svelte on the desktop becomes popular, people will likely come up with more efficient options. For example, a more efficient Electron or something like "Svelte Native", which could be a good thing. I'd love if all software were more efficient, but getting up to speed on a new platform has a huge opportunity cost too.
- LinguaBrowse 5y agoNot clear from your wording, but Svelte Native incidentally does exist: https://github.com/halfnelson/svelte-native https://github.com/halfnelson/svelte-native It's a Svelte renderer for NativeScript (a framework targeting iOS and Android), rather than being a port of React Native to Svelte.