Rust & Wasm

preview_player
Показать описание
Today I'm going to talk about building apps you can deploy anywhere with no installation by using Rust and WebAssembly.

Sponsor: Quadratic - The Data Science Spreadsheet for Engineers

Corrections are in the pinned ERRATA comment.

CREDITS & PROMO
My name is Tris Oaten and I produce fast, technical videos.

Special thanks to my patreon sponsors:
- Affax
And to all my patrons!
Рекомендации по теме
Комментарии
Автор

ERRATA

I was not clear that wasm is only slower than JS in DOM manipulation. If you write pure wasm and webgl, you can smoke JS.

NoBoilerplate
Автор

You certainly have a way of making Rust sound like it came to us as a gift from a Kardashev II civilization.

yondaime
Автор

In my current personal project, I'm writing a backend and several clients all in Rust, including a frontend using Yew. There is one boon that WASM gives you that you didn't touch on. You can directly share libraries between your backend and frontend. No reimplementation. No bugs from translating between languages. You can ensure that the behavior of your data structures is identical between every piece of the project. Fix a bug once, and you're done!!

The message passing pattern showcased is also a fantastic way to handle client-server communication and syncing of shared state.

tylerbloom
Автор

Me: Manipulates DOM directly with JS.
No_Boilerplate: No one manipulates DOM directly.
Me: 😐.

Zedoy
Автор

I completely agree! I use the game framework Macroquad for little games that I make, and it has support for WASM! No lag, no hassle, just "cargo build --release

eboatwright_
Автор

The rust ecosystem never ceases to amaze. I can see that in just years from now, rust will be able to do quite literally everything. A _new_ javascript if you will

mathgeniuszach
Автор

There's something about your videos that makes me so interested in programming in rust. Keep up the good work!

drasleek
Автор

PSA: Remember that rendering to a canvas breaks the accessibility of the page. Screen readers won't read elements aloud, being able to copy-paste text gets lost, no auto reflow is possible with CSS, etc. 🙏👍

Yaxqb
Автор

Man, your content is so minimal, pure & easy to understand.
I am addicted to your channel even though I don't write Rust.

mikopiko
Автор

Tris makes me feel like I know everything CS related just by knowing rust 😂

Rust is my favorite language 🦀

Kfoo-djmd
Автор

I’m finally getting to the point I grok the lifetime errors the compiler is complaining about at a glance, and can instantly think where I messed up and where I need to go fix. It used to be that algebraic data types were my gold standard to consider a modern language usable or not, but now I can’t imagine programming without a borrow checker.

Literally, Ive been working on this personal project (a distributed event framework) for months with type level programming, and at roughly 3500 lines of code before a minimum executable demo, it executed not just successfully but correctly too. Literally first try. I was in shock. I was fully expecting to debug for hours or days. I’m in love with this language.

AndrewBrownK
Автор

I'm learning React right now so I can get a job. If only I could use rust for this! Will definitely look into it more if I ever make my own personal projects.

remiwi
Автор

I bloody love your sponsors. Thats how you everyone should do them. They always have something to do with the video.

nici
Автор

the procedural macros are the most genius and mind blowing feature to ever exist in a programming language, rust basically solved the source generators problem in the most elegant way and went a step beyond

fifty
Автор

The biggest downside is still that Wasm can't interact with the DOM of a website directly and relies on JavaScript. Even if you write everything in Rust to interact with the DOM, Wasm translates it into JS, which then interacts with the DOM. This eventually results in a bottleneck. The guys over at Wasm are saying they're working on a way around this. I'm sure once they have a solution, browsers will need to add support for that. Once this is solved, that's when things will get interesting. Imagine websites running on Rust/Wasm with direct access to the DOM api without the need for JavaScript.

Hobbitstomper
Автор

You present Rust in such a way that I feel like I want to learn it so much... It's just that I JUST got my first programming job a couple of weeks ago and I also have a couple of Java and JS projects still unfinished, and a freelance gig with Python. Yet the less time I have, the more drawn to Rust i become lol

varsketisLT
Автор

Quadratic looks awesome, was just today hearing from a friend that has to fight Excel and VB at work, where he is locked into Microsoft products. This looks like such a cool, modern alternative! I love the idea of bringing python and it's whole ecosystem into the mix.

Mane
Автор

At 0:25 you mentioned that AWS supports Rust. That is sort of true, but not quite. Everywhere that the AWS Rust SDK is mentioned, they state that the SDK is a preview and that it should not be used in production. Rusoto is the alternative

somedooby
Автор

Rust is so blazingly fast, I downloaded and installed it 5 times thinking something was wrong, literally micro seconds installation of the compiler. It was only after running rustc that I found out that the compiler installed already!

ronwabwire
Автор

Really nice video, clear and fast-moving

PromptStreamer