5 ms·
Hi Dave, I just found out about your tool from this post and it looks amazing! I was about to download it to try it out but I'm now hesitant to try (and possibl
by jonpurdy 5y ago
Hi Dave, I just found out about your tool from this post and it looks amazing! I was about to download it to try it out but I'm now hesitant to try (and possibly later purchase) if it's being rewritten in Rust + Electron rather than a native Mac app. I wouldn't want to wake up one day and find a great native app has been replaced by an Electron app after paying $100 for it. Unless you were planning on Electron for Windows and keeping the Mac app native?
- dceddia 5y agoHey! The current plan is to offer both versions, at least until the Rust/Electron app is at feature parity with the Mac app. In any case, the Mac app will continue to work, and you wouldn't be forced to switch versions. On the Rust/Electron side, all the heavy lifting is done in Rust-land, and so far, it's going pretty well. It's not all roses of course - it takes a bounce or two to start instead of launching instantly, and it seems there's not much to be done about Electron's baseline memory usage or size on disk. (I went down a crazy rabbit hole of compiling Chromium/Electron to see if there were things that could be stripped out, because I honestly don't need much, but realized that is a very large undertaking. Possibly another day. Some kind of "Electron Lite" would sure be awesome...) But in general I'm spending an inordinate amount of time paying attention to performance. It was my main concern with the Electron platform. So far I've got playback on par, and stuff like loading files, silence detection, and drawing waveforms is actually faster than the Mac version. It feels snappy.
- PaulDavisThe1st 5y agoCurious to know what your rationale was for choosing Electron? Targetting mobile?
- dceddia 5y agoIt’s mainly for Windows support, with the side benefit of being able to potentially extend to browsers (with WASM). Electron doesn’t run on mobile as far as I know. I looked at a bunch of cross-platform UI toolkits, and everything has its tradeoffs. Qt is probably the most full-featured alternative, and I’ve had experience with it in the past, but I didn’t love the idea of tackling a project this size in C++. On the Rust side, Tauri is very promising but it’s still early days. Aside from the framework, the other big tradeoff is 1 app vs multiple - more “nativeness” for a much slower feature velocity. The big companies like Slack and Figma don’t even make that trade with millions in funding… and it seemed unwise to take that on as a solo bootstrapped developer. In terms of stuff like ecosystem, building/packaging, updater support, and even nice little native details like progress bars on app icons, Electron has a lot going for it. The big downsides in my mind are startup time, baseline memory usage, and disk size. Once it’s up and running, IMO app performance is almost all down to the app’s code. So I’m optimizing where I can - being mindful of algorithms, avoiding memory copies, trying to keep things cache-friendly, avoiding heavy JS stuff, taking copious benchmarks, etc.
- serial_dev 5y agoJust wondering, did you consider Flutter? Thoughts? It would help with both the disk and memory usage, easy to learn after web frameworks (both the framework, Flutter, feels familiar and Dart is super easy to learn), works well with Rust, but of course it has its downsides (no longer can rely on the html js css ecosystem).
- dceddia 5y agoI looked at Flutter briefly. To be honest, I was a little worried about betting on a Google thing, with the ecosystem being comparatively still pretty small, and with Dart. IMO this project is already in debt on innovation tokens[0] given I didn't know Rust coming in, nor much at all about video. And then, hybrid web/native stuff is just not very widespread so there's not a lot of existing answers for things. Lots of digging into code and figuring stuff out. The web stack (Svelte, TypeScript) is the one part of this thing that already felt familiar, and I didn't want to throw that out. 0: from Choose Boring Technology :) http://boringtechnology.club/ http://boringtechnology.club/
- phist_mcgee 5y agoHave you investigated Tauri [1]? It's a lightweight wrapper around native web views that connects to a rust backend. I've had great success with it so far. [1] https://tauri.studio/ https://tauri.studio/
- dceddia 5y agoYeah I looked at Tauri! It's pretty great and I'm excited to see where it goes. I didn't end up going with it because I had a hard time figuring out how to efficiently send data from Rust -> browser without making a copy, and Tauri is still fairly early on the native integration stuff. I'm definitely going to keep an eye on it though. One benefit of having most of the code in Rust is that I could feasibly port it to another platform.