Electron, but make it zesty

Issue #311.August 5, 2024.2 Minute read.
Bytes

Today’s issue: Galileo takes on Google, some good old fashioned benchmarketing, and the Rust library that just lit the world’s financial markets on fire.

Welcome to #311. Amber is the color of your energy.


Eyeballs logo

The Main Thing

A chihuahua looking scared

My laptop fan watching me open Slack, Discord, VS Code, and Figma simultaneously

DX vs. UX

Tauri just released a v2.0 RC of its toolkit for building cross-platform desktop apps from a single codebase using web technologies like HTML, CSS, and JavaScript.

And since there aren’t a ton of exciting new features in this release, let’s break down what makes Tauri different from Electron – and try to figure out if it’ll be the next big thing in Desktop-Land.

Electron’s approach bundles Node.js on the backend with Chromium on the frontend to create a desktop runtime for web technologies. This provides a great DX, but it also leads to big-‘n-beefy app sizes that’ll make your laptop fan hum louder than my grandma when she’s watching re-runs of The Lawrence Welk Show at 2 am.

Tauri’s approach tries to solve this problem in a few different ways:

  • It uses Rust on the backend, and two libraries (TAO and WRY) on the frontend to provide a much more lightweight webview – without needing to embed Chromium.

  • This results in significantly smaller bundle sizes and less memory usage than Electron apps, plus a flexible architecture that lets you use any frontend JavaScript framework you want.

  • Tauri is also secure by default and provides an isolation pattern to prevent untrusted scripts from accessing the backend from a webview.

Like most Rust-based projects, Tauri comes with one major tradeoff: you’ll need to a bit of Rust. That might not be a dealbreaker for some of you, particularly because you don’t need to be a full-fledged Rust expert to use Tauri, but it’s definitely a hurdle for lots of dev teams.

Bottom Line: Right now, Electron vs Tauri feels like a classic battle of DX vs UX – and we know how those battles usually turn out. But as Tauri continues to mature, and as more developers get comfortable using it, we could start to see it eventually eat into Electron’s desktop dominance.

        

QA Wolf logo

Our Friends
(With Benefits)

Danny Devito looking worried

Mfw my manager tells me to QA test all the features I just pushed

QA Wolf gets you 80% test coverage – with zero extra work

And it’s way less expensive than hiring a full-time QA team, and way more effective than forcing your engineers to do it themselves.

Here’s how it works:

  • They build and automate thousands of tests for you in Playwright to test every single user flow and API. The open-source code is all yours, with no vendor lock in.

  • They provide all the infra to run 100% of your test suite in parallel, so your team can test and deploy continuously.

  • They sort all the real bugs from the flakes with human-verified bug reports, and provide 24-hour test maintenance.

Instead of selling licenses or labor hours, QA Wolf just sells complete test coverage, so your incentives are always aligned.

Schedule a personalized demo – and see how they’ve helped big orgs at Drata, Salesloft, Mailchimp, and AutoTrader ship faster and with fewer bugs.


Pop Quiz logo

Pop Quiz

Presented by Sentry

They’re hosting a free workshop on solving frontend issues with backend tools, where they’ll debug some common perf issues live in a Next.js project.

How can this code be improved?

async function completeCheckout(orderId) {
  await updateAnalytics(orderId);
  const order = await processOrder(orderId);

  return order;
}

Cool Bits logo

Cool Bits

  1. Mark “I am the Redux core team” Erikson just released the revised Redux Essentials tutorial with TypeScript examples, more RTK APIs, and lots of new concept explanations.

  2. FusionAuth is a customer auth platform that’s purpose-built to make developers’ lives awesome. It gives you all the features your app needs plus a customizable, scalable solution you can run on any computer, anywhere in the world. [sponsored]

  3. Robby Pruan wrote A different way to think about TypeScript.

  4. Astro 4.13 introduces stable request rewriting, stable content collection JSON schemas, and some logging improvements.

  5. Rslib is an Rsbuild-based library build tool that just went public yesterday – and the entire world’s equity markets immediately crashed. Coincidence?

  6. JS-PyTorch is a deep learning JavaScript library that you can use to train, test, and deploy neural networks with Node.js or a web browser.

  7. CarbonQA provides high-quality QA services for dev teams, so you never have to waste engineering time on QA testing ever again. Their US-based QA testers will break your app repeatedly, so your developers don’t have to worry about it. [sponsored]

  8. Igor Zinkovsky and Andy Jiang wrote about Benchmarking AWS Lambda cold starts across JavaScript runtimes on the Deno blog. I bet you’ll never guess which runtime came out on top.

  9. Nx 19.5 comes with newly added support for StackBlitz, Bun, and incremental builds with Vite.

  10. MERJ and Vercel just released some interesting research on How Google handles JavaScript throughout the indexing process that aims to “demystify Google’s rendering through empirical evidence.” I’m pretty sure Galileo was trying to do the same thing before the pope put him under house arrest for the rest of his life.


Pop Quiz logo

Pop Quiz: Answer

Sponsored by Sentry

async function completeCheckout(orderId) {
  await updateAnalytics(orderId);
  const order = await processOrder(orderId);

  return order;
}

Because processOrder doesn’t depend on the result of updateAnalytics, you can parallelize the two invocations.

async function completeCheckout(orderId) {
  const [_, order] = await Promise.all([
    updateAnalytics(orderId),
    processOrder(orderId)
  ])

  return order;
}