The Unlikely Friendship Between React and Rust

Rate this content
Bookmark
Watch video on a separate page

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
In this Talk, the speaker demonstrates how to use Rust with WebAssembly in a Vue.js project. They explain that WebAssembly is a binary format that allows for high-performance code and less memory usage in the browser. The speaker shows how to build a Rust example using the WasmPack tool and integrate it into a Vue template. They also demonstrate how to call Rust code from a Vue component and deploy the resulting package to npm for easy sharing and consumption.
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
Welcome to MakePad, a new way to build UI for web and native using WebAssembly and Rust. JavaScript is not suitable for complex applications like IDEs and design tools. Rust, a new programming language, was used to reimagine MakePad, resulting in a fast and efficient platform. MakePad offers live editing, high CPU performance, and the ability to load native instrument components. The future of MakePad includes an open-source release, a design tool, and support for importing 3D models.
🚀 Supercharge your NodeJS with Rust
JSNation 2022JSNation 2022
21 min
🚀 Supercharge your NodeJS with Rust
In this Talk, Dmitry Kudravtsev discusses how to supercharge JavaScript and Node.js using Rust. He introduces NEON, an open-source library for integrating Rust and JavaScript, and explains how to use it to export Rust functions to JavaScript. Dmitry also explores the performance benefits of using native modules written in Rust and WebAssembly. He compares the two approaches and highlights the faster performance of Rust native modules. He concludes by recommending WebAssembly for its ergonomics and portability, while suggesting native modules for extending Node.js with performance code.
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
This talk explores using Rust and WebAssembly to enhance the performance of Node.js applications. By leveraging Rust's efficiency and safety features, and compiling it into WebAssembly bytecode, developers can achieve high-performance computations while ensuring security. WebAssembly enables direct communication with native hardware and is optimized for server-side applications, making it suitable for tasks like AI inference and storage databases. Overall, this talk highlights the potential of combining JavaScript, Rust, and WebAssembly to build performant and portable applications.
Supercharging React Apps with WASM
React Summit 2023React Summit 2023
25 min
Supercharging React Apps with WASM
Watch video: Supercharging React Apps with WASM
WebAssembly is a fast, secure, and portable technology that challenges JavaScript's dominance on the web. It allows for the use of legacy code and expands the scope of functions that can be performed on various devices. WebAssembly can be used for image processing and machine learning, and it has potential applications in UI component libraries. Startups are already incorporating WebAssembly into their web applications, and optimization and performance are key advantages of this technology.
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 explores TypeScript bindings for NodeJS with Rust and WebAssembly, providing an alternative approach for creating native NodeJS modules and automatically generating types. It delves into the use of WebAssembly and Rust for TypeScript modules, showcasing how Rust functions can be defined and imported using the wasm.bindgen library. The Talk also highlights the challenges of string conversion between Rust and JavaScript, the limitations of supporting Rust data types in JavaScript, and the seamless integration of Rust functions into TypeScript apps using tspy. It concludes with the recommendation of TSFI for type-safe bindings and showcases its usage in a TypeScript-based full-text search engine with WebAssembly support.