Live data from Hacker News

Building a Slack/Discord alternative with Tauri/Rust

linen.dev

201–210 of 253 posts

Re: Building a Slack/Discord alternative with Tauri/Rust

#201
post #182

Earlier quoted context omitted.

> Slack is currently eating 600MB of my RAM, for something I check maybe once an hour. You forgot about the times when two or more of the electron applications you run because you have no other option decide to take 20% CPU each or more. Even if you make it a point of pride to run a computer that eats power measurable in kilowatts per hour, that's bad when on battery at least. And from the article: > One of the main…

> What's the difference? The code of the web engine can be shared among several apps, instead of each of them having its own copy in RAM, making it less of an issue when having several of them. If each of them don't abuse RAM usage of course. Which is a big if of course.

Only if they make use of the same version of electron. Also apps tend to statically link their libs nowadays to reduce the amount of runtime dependencies from what I've seen. And I'm pretty sure apps distributed through flatpak and the like come with their own copy of the corresponding .so and won't share anything either - unless I'm wrong and electron does get shipped in a shared runtime.

Re: Building a Slack/Discord alternative with Tauri/Rust

#202

Good. I've been looking for a Slack alternative Slack's app broke the basic functionality of the main input box where the home and end keys jump to the start and end of the entire input rather than the current line. This turns simple text edits into a chore. I pointed this out to their support staff who responded that the issue wasn't important enough for them to fix. Very disappointing

This is very much the same issue I have with the message input box on the Threads feature of Discord. It works on "normal" messages (those outside the forums feature) but if it's in those, the home key sends the cursor straight to the very start.

Re: Building a Slack/Discord alternative with Tauri/Rust

#203

Earlier quoted context omitted.

Overprivileged HN-commenter believes that upgrading RAM is something that every user can afford, wants to afford (oh, I'm sorry, let me blow 50 bucks for your pretty eyes because you couldn't be arsed to not blast a whole javascript runtime on your app that you're forcing me to use to upgrade my drivers or launch a game), ignores physical limitations (unupgradable laptops, already maxed out configs from back in the d…

He's right though, most people really don't care about 600 MB of RAM or whatever.

> most people really don't care about 600 MB of RAM

There’s a difference between not caring that your computer is sluggish because of its programs, and not being able to tell the difference and demand less sluggish alternatives.

Normies put up with poor user experiences to the exact degree that software engineers deliver them.

That my UI should be significantly slower than my screen’s framerate is a false premise.

Re: Building a Slack/Discord alternative with Tauri/Rust

#204
post #195

Earlier quoted context omitted.

JavaFX supports a WebKit based WebView widget, but it's optional. If you don't use it it's not bundled. If you do then you pay the cost of including the WebKit build which is ~80mb. In practice the need for WebKit is going down over time. For basic rich text you can render Markdown to JavaFX nodes directly, for more advanced stuff you could transform [X]HTML to FXML, you don't need it for video or audio, there's a na…

Are you the Mike Hearn from the bitcoin and "history is a scam" fame? Cool to see you here :) I somehow am (positively!) surprised to see your name in relation to Java GUI frameworks. Hydraulic Conveyor looks interesting, is it planned to support GraalVM's native-image? Would it work with Scala/ScalaFX?

Haha, it's amusing that the history essays are one of the things you remember :)

Yes I think you can compile Scala and ScalaFX apps down to native binaries this way. Look at Gluon Substrate:

https://github.com/gluonhq/substrate

One of our customers is experimenting with shipping such apps with Conveyor. There's a discussion ongoing here:

https://github.com/hydraulic-software/conveyor/discussions/6...

We got a console hello world working, albeit the DX is a bit rough. You need some ugly config boilerplate and some additional Native Image json files. But, it works, at least enough to create a Mac package with the regular Conveyor feature set. There are some limits though. I think the WebView doesn't work when the app is natively compiled this way. There's also someone in our Discord who has been trying it with Compose apps.

If it all starts working well it could be quite interesting for desktop app development, as suddenly you could use high level languages and portable UI toolkits but with the sort of startup time, performance and memory usage you'd expect from native apps (modulo binary size which is still quite large). If you want to use HTML as the UI then you can use the Chromium Embedding Framework, which would give you an Electron-like experience but with many more available languages:

https://hydraulic.dev/blog/13-deploying-apps-with-jcef.html

For a Slack competitor like Linen it would make more sense to use web UI because of the video calling/WebRTC stuff. OTOH if you don't care about that, it'd be (imo) easier and more direct to not use HTML. Proper GUI toolkits give you a lot of stuff out of the box like virtualized list views which HTML still doesn't; useful for scrolling over huge datasets like chat logs.

I've been using JVM GUI for years for various tasks. It was appropriate for Bitcoin tasks because it's immune to injection attacks, because you can run everything locally with P2P protocols like the original Bitcoin app did, it's portable etc. Also I learned GUI programming decades ago and find classical UI toolkit concepts like VBox, HBox, StackPane, TableView etc more intuitive than HTML.

Re: Building a Slack/Discord alternative with Tauri/Rust

#205

Earlier quoted context omitted.

Overprivileged HN-commenter believes that upgrading RAM is something that every user can afford, wants to afford (oh, I'm sorry, let me blow 50 bucks for your pretty eyes because you couldn't be arsed to not blast a whole javascript runtime on your app that you're forcing me to use to upgrade my drivers or launch a game), ignores physical limitations (unupgradable laptops, already maxed out configs from back in the d…

He's right though, most people really don't care about 600 MB of RAM or whatever.

Most people do care, they just don't know that better performance is possible because they've been fed Electron crap for the past few years.

Re: Building a Slack/Discord alternative with Tauri/Rust

#206

Earlier quoted context omitted.

There are a lot of Apple users here and I'm pretty sure that Apple charge $200 for that $1 worth of RAM ;-)

Apple charges $200 for 8GB additional RAM. So the cost of 600MB of Apple RAM in $15. That's the cost of 1 month of a subscription to Slack. You're likely to use your laptop for ~4years = 50months, so the RAM cost of Slack is around 2% of overall Slack cost, even on Apple hardware. Users pay 2% more to get more RAM, Slack developers have 200% productivity thanks to not having to deal with low-level optimization crap,…

The thing is that slack developers are not the only ones that think that way. So now people lose some percentage to their mail client, their chat client, their ide,... A bit more ram for developer comfort, a bit more processing power, a bit more to download,...

Additionally at the end of the day some people do interact with non developers and realize they tend to have less beefy devices. Being the tech support in the family can be interesting because of that front. For example when I'm asked what's causing my fathers or grandparents relatively new laptop to be so laggy despite how much better it is than the predecessor and finding out there's no happy answer for that. There's no explaining that some software regressed on this front and they should just accept more electronic waste.

Re: Building a Slack/Discord alternative with Tauri/Rust

#207
post #143
post #86

I build and ship a production application using tauri and linux support is the most painful experience I had in a long time. They use WebKit GTK which is really not a good fondation IMO, its hard to test for all versions, its much slower than other browser, it has weird bugs. In general the idea of not shipping a browser bundle is nice, in practice it doesn't really work for a startup. It's just too much unrelated te…

Here is an idea, do a Web application. Most of the Electron junk can be easily done as pure Web application, of course authors don't want to pay for hosting and ship a browser and server with the application. There are a very tiny percentage of such startup ideas that really need features not available on a standard Web browser.

Funny enough that is exactly what we did and our users asked for a desktop application since this is what they were used to by our competitor.

Re: Building a Slack/Discord alternative with Tauri/Rust

#208
post #125

Earlier quoted context omitted.

I have used Tauri (or more accurately, WRY) for Windows and macOS and it worked very great in my opinion. It still needed some tweaks to suit my needs, which was the main reason I didn't use Tauri proper, but I guess your issues are more related to the lack of well-known system web view in linux. It might make sense for Tauri to bundle the browser engine only for linux if this is a big concern.

Shipping an AppImage as an option could help bundle everything needed.

That is what we did when we hit a WebKit bug that caused our users to not be able to launch the app at all. But people dont like it.

Re: Building a Slack/Discord alternative with Tauri/Rust

#209

Earlier quoted context omitted.

There are a lot of Apple users here and I'm pretty sure that Apple charge $200 for that $1 worth of RAM ;-)

Apple charges $200 for 8GB additional RAM. So the cost of 600MB of Apple RAM in $15. That's the cost of 1 month of a subscription to Slack. You're likely to use your laptop for ~4years = 50months, so the RAM cost of Slack is around 2% of overall Slack cost, even on Apple hardware. Users pay 2% more to get more RAM, Slack developers have 200% productivity thanks to not having to deal with low-level optimization crap,…

No, the cost of 600MB of RAM is $200. You just end up having bonus to waste on more electron apps.

This whole "this is how the world works" bullshit is post-hoc rationalisation done by wealthy idiots trying to justify their purchase by saying "it's just 5 cents a day if you consider it'll last ten years". This is bullshit and only applies if the purchase you're making is insignificant to you. So, congrats, $200 is insignificant to you. It's not, for most of the world, but you'd see that if you pulled your head out your ass.

This isn't even "not having to deal with low level optimization". Using a normal toolkit is not low level optimization, it's the bare minimum.

Putain, elle est belle la French Tech avec des gens comme ça.

Re: Building a Slack/Discord alternative with Tauri/Rust

#210

Earlier quoted context omitted.

> That might be slimmer than electron, but it’s still ridiculous given what it’s doing. Then I think your beef is with the class of apps, not Tauri or Rust. > Tauri still issues about 25000 syscalls at startup and needs about 300mb of ram for a “hello world” app How many syscalls and how much memory does your web browser require on startup? I'm not the biggest fan of JS apps, Electron, etc., but it's simply ridiculou…

> 1) in the form of code, 2) in a language everyone can learn 3) that runs on everything. The hello world for cross-platform Egui also written in Rust is a 19MB binary and uses 89MB of RAM.

[deleted]
Post reply on HN