The Unlikely Friendship Between React and Rust

Rate this content
Bookmark

FAQ

Sarah is a founding engineer at Axo.dev, a company focused on developing tools primarily for the Rust community. She discusses various technical topics, including Rust programming and integrating it with other technologies.

Sarah is originally from Portugal, and she shares her experiences and perceptions about Portuguese airports compared to others in the EU during her talk.

The main focus of Sarah's presentation is to discuss the integration of React and Rust, particularly through the development platform called Tari, which is used for building native apps with Rust instead of JavaScript.

Tari is a development tool similar to Electron but uses Rust for backend operations instead of JavaScript. It allows for the creation of native apps and offers better integration with the operating system, leveraging Rust's system-level capabilities for enhanced performance.

Sarah notes that while Rust is advantageous in terms of performance and reliability, it has a steep learning curve, particularly for those accustomed to more forgiving languages like JavaScript. She mentions challenges such as the borrow checker and the complexity of managing strings in Rust.

Sarah highlights Rust's efficiency and reliability, pointing out that if a Rust program compiles, it's very likely to run successfully without errors due to the language's strict compile-time checks.

Sarah compares Tari favorably to Electron, particularly in terms of performance. While Electron is more established and might be easier for web developers due to its use of JavaScript, Tari offers superior performance and better system-level integration thanks to Rust.

Sarah uses her negative experience at Luton Airport as a humorous anecdote to illustrate a point of revelation — realizing the airports in Portugal were not as bad as she initially thought. She expresses her strong preference to avoid returning to Luton Airport.

Sara Vieira
Sara Vieira
26 min
20 Oct, 2023

Comments

Sign in or register to post your comment.

Video Summary and Transcription

This Talk explores the unlikely friendship between React and Rust, showcasing how they can be used together. The speaker demonstrates live coding and explains the process of calling Rust functions from JavaScript using the Tauri framework. The Talk also covers retrieving system information and disk details using Rust's sysinfo library. The speaker emphasizes the importance of serializability and showcases a button and SD card reader as examples of practical applications.

1. Obsession with Airports

Short description:

I'm weirdly obsessed with airports. I thought the same about airports. That's not true because then I went to Luton and my life changed for the worst.

So, let's dive in. Okay, so I don't actually have to do anything on the computer so we can just — yeah, there we go. That's my mouse, as you can see, and I want to say that I am — I'm not an expert in obsessed with airports. I'm weirdly obsessed with airports. I'm still waiting for people, so I'm just going to talk about airports for, like, a minute. So, like, I know there are some people here from Portugal and when you're from Portugal, you kind of assume that everything your country does is kind of, like, below average of other EU countries, so I thought the same about airports. That's not true because then I went to Luton and my life changed for the worst. It was like a realisation moment. I thought, oh, Portugal isn't that bad. I mean, I still left, but sure.

2. The Unlikely Friendship between React and Rust

Short description:

I'm going to be talking about the unlikely friendship between React and Rust. My name is Sarah and I'm a founding engineer at Axo.dev. We do development tools mostly for the Rust community. Rust isn't that bad. If something builds, then it's most likely gonna work. I am here to make you look at Rust code and be like... What the fuck? We're gonna talk about Tari, a native app builder that doesn't use JavaScript in the backend.

Okay. Give me some time for people to come in. But, yeah. So, I'm going to be talking about the unlikely friendship between React and Rust.

So about six months ago, let me just introduce myself. So my name is Sarah, or Sarah, but if you call me Sara, I will answer you in Portuguese and you'll have no idea what's happening so please call me Sarah. That confuses my brain. My name is Sarah and I'm, again, originally from Portugal. I'm a founding engineer at Axo.dev. Axo.dev is a very small company. We are fully... I forgot my phone. Nathaniel, can you bring me my phone? Nathaniel is not there. Sir? Can I get my phone? I need my cheat! I was trying to be an adult and be like, I'm not taking my phone to a talk.

Okay. So, we both... We basically do a lot of like... I mean, you can... If my mom asks, I say I work on computers. I say we do development tools mostly for the Rust community. So, I've been doing Rust. And Rust isn't that bad. Like, I'm not gonna say that it's easy. But you get used to it. You get used to how good it is in terms of... If something builds, then it's most likely gonna work. And that's nice. Right? That is very nice.

So, what is my purpose here today? I am here to make you look at Rust code. I'm here to make you look at it and be like... What the fuck? And be like... Oh, so that's how she fell when she went to Luton. Yeah, that's how I fell when I went to Luton. I have not gone back to Luton. I refuse to go back to Luton. I know there's a tram now, and you don't have to take the bus. I don't care. I will not go back to Luton. Okay. So, we're gonna talk about Tari.

Okay. I can't see anyone, so I'm gonna ask you to make some noise if you've heard of Tari. Okay. I have no idea how much percentage that is. So I'm still gonna talk about it. So, Tari is... So, everyone knows Electron. Tari is the same idea. You can build native apps, but instead of using JavaScript in the backend, like an animal... I'm kidding.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Utilising Rust from Vue with WebAssembly
Vue.js London Live 2021Vue.js London Live 2021
8 min
Utilising Rust from Vue with WebAssembly
Top Content
Rust is a new language for writing high-performance code, that can be compiled to WebAssembly, and run within the browser. In this talk you will be taken through how you can integrate Rust, within a Vue application, in a way that's painless and easy. With examples on how to interact with Rust from JavaScript, and some of the gotchas to be aware of.
Makepad - Leveraging Rust + Wasm + WebGL to Build Amazing Cross-platform Applications
JSNation 2022JSNation 2022
22 min
Makepad - Leveraging Rust + Wasm + WebGL to Build Amazing Cross-platform Applications
Top Content
In this talk I will show Makepad, a new UI stack that uses Rust, Wasm, and WebGL. Unlike other UI stacks, which use a hybrid approach, all rendering in Makepad takes place on the GPU. This allows for highly polished and visually impressive applications that have not been possible on the web so far. Because Makepad uses Rust, applications run both natively and on the Web via wasm. Makepad applications can be very small, on the order of just a few hundred kilobytes for wasm, to a few megabytes with native. Our goal is to develop Makepad into the UI stack of choice for lightweight and performant cross-platform applications. We intend to ship with our own design application and IDE.
High Performance Node.js Powered by Rust and WebAssembly
Node Congress 2022Node Congress 2022
8 min
High Performance Node.js Powered by Rust and WebAssembly
In the post Moore’s Law era, due to limitations of the hardware, we need to squeeze more performance from the existing hardware. That means that the native code provides the best performance. However, the prevalence of native code on the server-side presents challenges to application safety and manageability. The rise and advent of Rust and WebAssembly offers new ways for developers to write high performance yet safe Node.js applications.
In this talk, I will cover the basics of Rust and WebAssembly, as well showcase how to go about their integration with Node.js. You will learn how and when to design a hybrid web application. How can you code the high performance functions in Rust in a Web Assembly virtual machine and finally how to tie everything together in a Node.js JavaScript application.
🚀 Supercharge your NodeJS with Rust
JSNation 2022JSNation 2022
21 min
🚀 Supercharge your NodeJS with Rust
Node.js is great - easy to develop, performant, easy to scale. But there are tasks that are less suited for it - heavy computations or data processing. Join me and learn how you can incorporate Rust as well as WebAssembly into Node and JavaScript and take your performance to the next level!
Type-safe bindings for Node.js with Rust and WebAssembly
Node Congress 2023Node Congress 2023
22 min
Type-safe bindings for Node.js with Rust and WebAssembly
This talk will teach you how to write performance-critical Node.js modules without the burden of distributing platform-dependent artifacts and using the C/C++ toolchain. You will discover how to smoothly integrate Rust code into your Node.js + TypeScript application using WebAssembly. You will also learn how to avoid the typical WebAssembly serialization issues, and understand when other alternatives like Neon or Napi.rs are preferable. Together, we will cross the language bridge between Rust and Node.js while preserving the familiar DX you're used to.
The Oxc Project, and the Effect of Performance Engineering
JSNation 2024JSNation 2024
18 min
The Oxc Project, and the Effect of Performance Engineering
The Oxidation Compiler project is creating a collection of high-performance JavaScript and TypeScript tools written in Rust. It offers fundamental components like parsers and resolvers for developers to utilize, along with CLI applications such as linters and formatters. This talk will introduce the project and explore the impact of a strong focus on performance engineering.