Getting Started with WebAssembly (WASM) with Rust Lang

  Рет қаралды 11,366

Chris Hay

Chris Hay

Күн бұрын

In this video we create, build and execute some webassembly using Rust. We look at:
- how to scaffold your webassembly project in Rust
- how to build your webassembly project in Rust (including apple m1)
- how to execute your wasm code in node.js
- how rust generated wasm compares to hand-coded wasm
- reverse engineering your wasm to webassembly text format (wat)
00:00 - intro
01:08 - installing wasm-pack
02:50 - creating a rust library for your wasm module with cargo
03:47 - exploring the scaffolded library in vscode
04:59 - modifying the cargo.toml
07:18 - writing some rust webassembky code in vscode
12:28 - building rustlang wasm with apple m1 silicon
14:13 - exploring the generated wasm
15:59 - reverse engineering wasm to wat
17:49 - optimizing the generated release wasm
21:58 - extending your webassembly in rust
22:29 - building your webassembly for node.js
25:40 - executing your rust generated wasm in nodejs
28:42 - handcoding some webassembly
30:00 - comparing rust generated and handcoded webassembly
31:50 - conclusion

Пікірлер: 17
@rehansiddiqui5780
@rehansiddiqui5780 11 ай бұрын
hey Chris, Super amazing. Nice to see you on KZbin
@flopasen
@flopasen 2 жыл бұрын
thanks for the video, the very small tangents you go on are really helpful for newbies to get a background on additional info and possible pathways
@chrishayuk
@chrishayuk 2 жыл бұрын
glad you like.. i'm glad the tangents are useful
@officialp283
@officialp283 2 жыл бұрын
This is a great video! Please do more Rust Videos in the future.
@chrishayuk
@chrishayuk 2 жыл бұрын
thanks paul. i'm enjoying Rust very much, so there will definitely be more vids on it. glad you enjoyed the vid
@aperson4051
@aperson4051 2 жыл бұрын
Hey Chris, it's obvious you're also an artist with the medium, and the colouring is interesting to the eye! but don't you need something in the way of a fill light (i think that's what it's called) there's no separation between you and the background, and the right half of your face is almost completely invisible! Also, is that a Sennheiser MD 421? No point having a mic of such value if your room sounds like shit. Acoustic treatment doesn't have to cost a lot if you're smart with the placement. Cheers for the videos btw, great stuff
@chrishayuk
@chrishayuk 2 жыл бұрын
Really good comments.. you noticed something about that video that I hoped no-one would notice. I forgot to hit record on the sound and for this video i had to use the camera sound. Ooops. Yeah you’re right on the lighting. I need to mix it up a little. Will work on that
@Asgallu
@Asgallu 2 жыл бұрын
Great video!
@chrishayuk
@chrishayuk 2 жыл бұрын
Glad you enjoyed it
@GlobalYoung7
@GlobalYoung7 2 жыл бұрын
thank you 😊
@MrEnsiferum77
@MrEnsiferum77 2 жыл бұрын
This is great. Looks that wasm powered modules will help u to get out of that node_modules hell.
@chrishayuk
@chrishayuk 2 жыл бұрын
i wish that would be true, lol. i do agree though wasm modules could play a powerful and simpler path for sharing modules
@DaveSpadea
@DaveSpadea 11 ай бұрын
I believe you made a mistake when running the last optimized build. You ran cargo build rather than wasm-pack build. I think that’s why the size didn’t change in the last one. Great video! I learned a lot!
@chrishayuk
@chrishayuk 11 ай бұрын
I may have done, I quite often miss things in the moment, thanks for pointing it out
@realfootball338
@realfootball338 7 ай бұрын
Does Rust WAsm supports multithreading with shared memory and atomic operations to write mutexes ?
@ymblender4067
@ymblender4067 2 жыл бұрын
Hi Chris, It's a great video! I use WASM in golang that it slowy then Javascript 10x, how about Rust WASM in browser?
@chrishayuk
@chrishayuk 2 жыл бұрын
tbh.. it's a tricky one. some stuff will be faster, some will be slower. there is ultimately an overhead when you bridge between JS and WASM. i hope that cost will come down with future versions of JS and WebAssembly. ultimately it's about choosing the right use cases for JS and WASM
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 13 МЛН
Balloon Stepping Challenge: Barry Policeman Vs  Herobrine and His Friends
00:28
Чай будешь? #чайбудешь
00:14
ПАРОДИИ НА ИЗВЕСТНЫЕ ТРЕКИ
Рет қаралды 2,8 МЛН
Как быстро замутить ЭлектроСамокат
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 13 МЛН
1 billion row challenge in Rust using Apache Arrow
9:12
Josiah Parry
Рет қаралды 5 М.
iJS 2021: WebAssembly, Rust, and TypeScript - a Match Made in Heaven
45:51
Rust Dublin August 2023 - Rust, Serverless & AWS
59:24
Rust Dublin
Рет қаралды 2 М.
Rust & Wasm
9:38
No Boilerplate
Рет қаралды 186 М.
Carregando telefone com carregador cortado
1:01
Andcarli
Рет қаралды 2,7 МЛН
Девушка и AirPods Max 😳
0:59
ОТЛИЧНИКИ
Рет қаралды 15 М.
Cadiz smart lock official account unlocks the aesthetics of returning home
0:30
i love you subscriber ♥️ #iphone #iphonefold #shortvideo
0:14
Si pamerR
Рет қаралды 2,7 МЛН