Live data from Hacker News

Building a Slack/Discord alternative with Tauri/Rust

linen.dev

121–130 of 253 posts

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

#121
post #36

Earlier quoted context omitted.

> why not going for a JVM-based technology? That's cross-platform, and it doesn't require a web browser / webview to show text. Because then you require the user to install a JVM?

You've been able to package your java apps so to not require that from your users for a very long time, and in the more recent years, with the compartmentalization of the JDK, you've been able to ship a very striped down version of it, and even more recently, an AOT compiled/PGO optimized binary, so nowadays you can ship your instant starting/low footprint/well performing java code without Java/a JVM.

TIL, I haven't been using Java-based software for a long time (and I still have vivid memories of having to install the correct version of the JDK before installing one).

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

#122
Unrelated question. Anyone know if it would be difficult to write a SwiftUI “compiler” to non-Mac architectures, including wasm? (I’m not a ui developer). I mean, I realize it is probably non-trivial, like most cross-platform ui, but I have been imagining that Apple would do this since they released it, so that their webapps could be written in SwiftUI instead of whatever they are doing now…

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

#123
post #115
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…

I think using Electron is excusable if you are a startup, like you said your time is limited. It's much less acceptable if you are Slack and still ship a slow bloated Electron app 10 years in.

The truth us that once you have shipped Electron, there's no way back, the cost of switching is too high.

This is not specific to Electron, it's a similar effect with every core technology, all the way to COBOL.

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

#125
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…

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.

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

#127
post #122

Unrelated question. Anyone know if it would be difficult to write a SwiftUI “compiler” to non-Mac architectures, including wasm? (I’m not a ui developer). I mean, I realize it is probably non-trivial, like most cross-platform ui, but I have been imagining that Apple would do this since they released it, so that their webapps could be written in SwiftUI instead of whatever they are doing now…

Yes, it would be difficult. Certainly not impossible, but difficult.

Microsoft has their MAUI project (Multi-platform App UI). It lets you write programs in C# and compile for Windows, macOS, Android, and iOS. AvaloniaUI and Uno Platform are other C# options. Flutter exists for Dart. Compose Multiplatform exists for Kotlin. React Native exists.

All that said, they all have drawbacks/issues. Flutter means ignoring the platform and just drawing things using Skia so Flutter apps feel like Flutter apps, not platform specific apps. Compose Multiplatform is only an alpha for iOS and it's also just drawing on a canvas (though you can break out of that and program specific stuff in iOS's UIKit). Avalonia is Skia and from what I've heard the iOS/Android support is poor compared to desktop OSs. Uno is mostly Skia with some platform-specific widgets, but their desktop support is poor compared to their mobile and WASM support.

MAUI is the only one that's really targeting native widgets on macOS, Windows, iOS, and Android. It seems like it's been a bit of a hard journey for Microsoft there, but it seems to be getting pretty decent in the latest betas (especially if you're using things like the CommunityToolkit MVVM and Markup extensions).

So, it's hard. It's taken many great companies many years to create ok cross platform toolkits. None are really amazing.

I think another thing holding stuff back is WASM. WASM will be getting a lot better, but it's not amazing for UI stuff right now because it means overhead communicating between WASM and JS (and a lot of copying). WASM also isn't great for garbage collected languages at the moment since the language has to ship its garbage collector. This will be changing in the future as WASM gets GC support. Swift's reference counts don't require the same overhead so it might not have that pitfall, but WASM is still usually for things that require lots of calculation compared to the UI work at the moment.

I don't know how much code reuse there would be between SwiftUI and the web if they did create such a compiler. Maybe there's value in using SwiftUI instead of React or whatever on the web. I don't really know.

I think Apple is unlikely to be the company that really pursues a cross-platform toolkit. They want people in their ecosystem and they know that a lot of developers target iOS first.

I guess it really depends on the value Apple would get out of it. Companies have spent a lot of time trying to make cross-platform UI kits over decades and there have been a lot of failures (or successes that don't really seem like successes given a lack of popular adoption). PhoneGap was an early iOS/Android one. RubyMotion has been around since 2012. Java was probably the original "write once, run anywhere with a GUI" language. Tcl/Tk has been around for ages. Qt has been around for a long time. It seems like an area where companies pour money and don't get amazing results. I'm not arguing that the results aren't worth it sometimes to have a single codebase. However, I haven't seen one of these toolkits take over the world despite the clear benefits of writing code once. That doesn't mean that the perfect thing can't be done, but it does make it seem like the difficulty is up there to make something really great.

For Apple, it's probably just not worth it. Most of their web stuff is different enough to what they'd be running on devices that they might not get a ton of value out of it for the difficulty involved. Plus, Apple isn't really looking to support Android, Windows, or Linux.

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

#128
post #58

Earlier quoted context omitted.

According to those benchmarks Tauri still issues about 25000 syscalls at startup and needs about 300mb of ram for a “hello world” app. That might be slimmer than electron, but it’s still ridiculous given what it’s doing.

> 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.

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

#129
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…

I wanted to have apple notes on linux, so I used tauri and just redirected to the apple notes web app.

I could really feel the lag and the lack of snappiness when interacting with that UI.

Its webkit, safari also uses webkit? Why is it so slow?

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

#130

Earlier quoted context omitted.

For me it's probably Ghidra or Jetbrains IDEA in 2023. Both are desktop, thought I could see the debate on whether or not developers are considered mainstream consumers. I use them on Linux and Windows, so I definitely get value out of their cross platform capabilities. I use Eclipse-based tools at work (again, I can see the debate). It seems like Samsung's Smarthings (IoT platform) used to use Groovy, but has recent…

Its never fun finding the correct java version to get ghidra going on a new machine. I don't use java often enough to remember versioning differences between the official and openjdk. I never install the right one on the first try, always requires a trip to the ghidra docs. I must have gone through this 7 or 8 times in the last 5 years. Its also really rare for a desktop app written in java to look good. I'm sure its…

I thought openjdk is the "official" version of Java now (besides Java EE)?
Post reply on HN