Live data from Hacker News

Building a Slack/Discord alternative with Tauri/Rust

linen.dev

51–60 of 253 posts

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

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

It's been years since I've messed with Java. OpenJDK can do all that? How big are the binaries?

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

#52
post #35

Too bad Elixir/Rust wasn’t used. It seems to be the perfect platform for a communications service (and is also what Discord is built on). And before that, WhatsApps was strictly Erlang.

Anything that's not XMPP or based on it is inferior, IMO. And I'm not saying that for the troll (although it's easy to be dogmatic about such things). Facts are XMPP has awesome server implementations that scale to billions of users (as proven by WhatsApp/ejabberd), and developing new clients is made easy by the sheer number of libraries and platforms supported. XMPP is an established IETF standard that has a compact core and extensibility in mind (so you can remain compatible across a large spectrum of users and use cases while rolling out new and unique features). Because it's federated, it's resilient against most types of monopolistic abuses (as seen with slack and other venture capital endeavors). I would only consider P2P and other federated protocols to be worthy of my (peers) time, but I also haven't seen anything else out there that would make me want to leave the comfort of XMPP and my self hosted instance.

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

#53
post #36

Earlier quoted context omitted.

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.

It's been years since I've messed with Java. OpenJDK can do all that? How big are the binaries?

JLink (JEP 282) does the first part and was released with Java9 (6 years ago), the native compilation stuff is a product of GraalVM. Binaries are reasonably small but it depends of course on what your app is doing. There is a whole ecosystem of web frameworks that's being built on that (quarkus.io, micronaut) and IIRC you can build a simple REST API that ships as a <20MB container.

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

#55
post #10

> Building a slack alternative I've always thought slack was the alternative, to IRC.

IRC was originally an alternative to a BBS… You can keep piling this to no end.

Let’s not forget the Windows Live Messenger. I guess it was more like Discord alternative of that time.

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

#56
post #36

Earlier quoted context omitted.

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.

It's been years since I've messed with Java. OpenJDK can do all that? How big are the binaries?

They're pretty big. I've got a fairly basic JavaFX app that's compiled with Graal, and it weighs in at 98MB, or 32MB when zipped.

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

#57

With Figma being so incredibly performant and robust as a web assembly app, why don't more apps turn to this approach instead?

Figma was started in 2012, while definitely successful, it wasn't exactly built quickly. C++ on WASM is performant, but probably not super easy to bootstrap a new project on.

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

#58
post #14

> Tauri is an open-source electron alternative that is built in Rust. I'm not familiar with Electron development, but isn't the code mostly JavaScript in that case? Does Rust have a meaningful contribution to the performance and the safety of the codebase here? I feel like Rust part would be "spin up the WebView". There is no code in the repository, so I couldn't check that out myself.

> Does Rust have a meaningful contribution to the performance and the safety of the codebase here? It apparently has a tremendous benefits: https://tauri.app/v1/references/benchmarks/

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.
Post reply on HN