webassembly system interface (wasi) changes everything.. getting started tutorial using rust & wasm

  Рет қаралды 18,808

Chris Hay

Chris Hay

Күн бұрын

Пікірлер: 49
@shlomohassid5888
@shlomohassid5888 9 ай бұрын
Chris! You have great tutorials and content. This should be a 1.2m subscribers channel - Keep up the good work and PLZZZZZZ don't become like all those programming "influencers"... I like that your content has no "noises", no "extra hyping", clear and clean voice, and no fancy ridiculous editing.
@chrishayuk
@chrishayuk 9 ай бұрын
Very kind, tbh, I’ve experimented a lot, including background music etc, just doesn’t work, so i landed on this. I do all the editing myself hence why I keep it simple. lol. Thanks for the kind comments. I always try and keep things that one level deeper but hopefully just one level and no more
@BinaryReader
@BinaryReader 2 жыл бұрын
These videos are incredible. Thank you for making them!! Such a rapid and pragmatic way to show these emerging developer technologies. I'm very keen on the WASI spec, sorta anticipate a time where the defacto deployment preference will be pushing WASM assemblies up to cloud providers, with the cloud providers able to trivially sandbox process IO behind WASI sys calls (and balance execution on shared hardware). Can totally see it being a slick alternative to current docker deployments. Ideally just need really optimized high level language runtimes to be running on WASM to make it practical for most devs (me specifically :P). Rust is nice, would prefer JS/TS or C#.
@chrishayuk
@chrishayuk 2 жыл бұрын
i have one in the pipe for assemblyscript and as-wasi (which is really typescript). If you check my WAPM video out, it'll give you most of what you need. and totally agree on the push wasm assemblies point.. i really do see wasm as the future universal binary
@PaulEmsley
@PaulEmsley 2 жыл бұрын
Ctrl-E to go to end of line in the terminal. Use Crl-R for history-search-backwards. Thanks for the video - I will probably use wasi myself now.
@chrishayuk
@chrishayuk 2 жыл бұрын
Thanks for sharing
@casualweekday-ytshadowbang2469
@casualweekday-ytshadowbang2469 Жыл бұрын
Best explanation I’ve watched so far on this topic. Great video!
@chrishayuk
@chrishayuk Жыл бұрын
Awesome, thank you!
@ishangrover1453
@ishangrover1453 11 ай бұрын
Quick & Nice explanation
@codetothemoon
@codetothemoon 2 жыл бұрын
Great video Chris!
@chrishayuk
@chrishayuk 2 жыл бұрын
Thank you so much
@1414tyty
@1414tyty Жыл бұрын
It seems like you could design an Operating System to bridge the wasi hardware gap. No linux, just "drivers" to coordinate with the system interface. Not sure if there's anything to gain from this, but seems really cool!
@1414tyty
@1414tyty Жыл бұрын
In this way, wasi would be your "OS" target. I wonder if the system interface is missing any important features to be a full fledge target?
@karelhrkal8753
@karelhrkal8753 2 жыл бұрын
Imagine video games mods being written in WASM instead of Lua.
@ay-pj8co
@ay-pj8co 2 жыл бұрын
TS is compiled to JS now just like C++ was compiled to C at first. I think just like C++ TS will not be compiled to its older subset. I can see TS being compiled to WASM to run natively on browsers in the future.
@jfk1337
@jfk1337 2 жыл бұрын
I think something like this exsits, assemblyscript
@ay-pj8co
@ay-pj8co 2 жыл бұрын
@@jfk1337 yes but there are too many differences between assemblyscript and typescript for it to be considered a typescript to wasm compiler imo. Its more like a new but very similar language.
@stinkytoe
@stinkytoe 2 жыл бұрын
It would be interesting if wasi (or something similar) became the next application deployment environment. Never mind Docker, this could also replace Java as the go-to cross-platform target. How far from a good, cross platform GUI widget library are we?
@chrishayuk
@chrishayuk 2 жыл бұрын
agree. i have high hopes for webassembly becoming the universal binary for gui stuff, i think blazor is where good ground is being made
@AlexanderSuraphel
@AlexanderSuraphel 2 жыл бұрын
I think Flutter is a great solution. It basically supports all the platforms you can think of and you can use wasm Dart package to run your wasm files if you want.
@AlexanderSuraphel
@AlexanderSuraphel 2 жыл бұрын
@@chrishayuk I think Flutter is a better GUI solution if you want to target Mobile and Linux too.
@diligencehumility6971
@diligencehumility6971 Жыл бұрын
Been a C# dev for a decade+. Been looking into C and C++ for performance reasons, and thus also been looking into Rust, which seems to be replacing C/C++ completely (since it has same/better performance, guaranteed no memory leaks and null pointers, and is even compatible with C/C++ libs.) Now I am learning the greatness of a standardized system interface (across platforms) which WASI seems to bring. But I don't understand. Will everything be complied to Javascript as is the case for WASM?
@ongeri
@ongeri Жыл бұрын
Your last line is a bit wrong, things are not compiled to js in wasm, browsers have the ability to run wasm binaries directly and js is only needed to do some dom interactions
2 жыл бұрын
I only need concurrency and http requests and I could start using this for everything.
@АнатолийБугаков-е9г
@АнатолийБугаков-е9г 2 жыл бұрын
Is wasm64 not availiable yet? That means every usage of f64 wouldn't be valid?
@itacirgabral8586
@itacirgabral8586 Жыл бұрын
fast fun
@chrishayuk
@chrishayuk Жыл бұрын
glad you liked
@AlexEllwein
@AlexEllwein 2 жыл бұрын
Hmm, even with the sandboxing, you can still do harm to the underlying system. Imagine writing an infinitely big file. Or using up all CPU...
@alanhoff89
@alanhoff89 Жыл бұрын
That's why there are CPU and FS quotas
@gabekoleszar3604
@gabekoleszar3604 2 жыл бұрын
I liked the video but the music in the introduction was quite jarring, I don't think it fits your tone
@rumplstiltztinkerstein
@rumplstiltztinkerstein 2 жыл бұрын
a bit loud lol
@chrishayuk
@chrishayuk 2 жыл бұрын
yeah, still trying to optimize this, good feedback
@Mempler
@Mempler Жыл бұрын
Tune down that intro song, it literally blew off my phone's speaker
@peppybocan
@peppybocan 2 жыл бұрын
An application which has access to filesystem, network and IO is inheritely not safe and breaks the encapsulation. I think WASI is going contrary to the spirit of WASM.
@evolutionx1
@evolutionx1 2 жыл бұрын
This would be solvable with a permissions system, like how we can already request access to camera and microphone for video calls.
@stickyfingies
@stickyfingies 2 жыл бұрын
@@evolutionx1 WASI feels redundant , we're basically re-implementing the operating system at this point lol
@stickyfingies
@stickyfingies 2 жыл бұрын
With obvious gains ofc to portability and cross-platform apps... but WASI feels like a very heavy abstraction to achieve that (from a performance perspective). Is that just me? Maybe I'm missing something about WASM.
@sohn7767
@sohn7767 2 жыл бұрын
@@stickyfingies Let’s take this perspective: Many languages compile to wasm and interoperate easily with wasm libraries. Plus it’s quite secure. Now it would be nice to salvage this power for applications outside your browser. Where? Imagine a wasm plug-in system for your text editor. People could write their plug-in in their language of choice, since wasm is a compilation target. No need to be locked to vimscript, lua, elisp, etc. Wasi makes this possible. Also, Write python apps without dependency hell? Hell yes. As for performance it’s “near native” so a little bit slower in exchange for portability. Areas where cutting edge performance is desired ofc you won’t use wasi. Another comparison: “Java: write once, run everywhere.” => Only true for the jvm ecosystem. Call Java outside of it or in the browser? Good luck. Despite this, Java has become popular. Wasm + wasi would be: “compile once, run everywhere” => Browser, on your operating system, inside of other languages…
@sohn7767
@sohn7767 2 жыл бұрын
@@hermes6910 not sure what you’re asking. If you’re asking why you why would write Java/python to build a wasm app, then yes it’s a weird idea. If you’re building a brand new app, you wouldn’t choose those technologies. But you can port already existing code to wasm and use it that way. And it’s only a little bit slower
Getting Started with WebAssembly (WASM) with Rust Lang
33:10
Chris Hay
Рет қаралды 11 М.
Rust & Wasm
9:38
No Boilerplate
Рет қаралды 196 М.
Walking on LEGO Be Like... #shorts #mingweirocks
00:41
mingweirocks
Рет қаралды 5 МЛН
бабл ти гель для душа // Eva mash
01:00
EVA mash
Рет қаралды 7 МЛН
Motorbike Smashes Into Porsche! 😱
00:15
Caters Clips
Рет қаралды 22 МЛН
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 42 МЛН
WASI: a New Kind of System Interface
37:12
InfoQ
Рет қаралды 19 М.
rust runs on EVERYTHING (no operating system, just Rust)
18:10
Low Level
Рет қаралды 361 М.
WebAssembly On The Server??? Why?
13:42
Code to the Moon
Рет қаралды 38 М.
The Truth about Rust/WebAssembly Performance
29:47
Greg Johnston
Рет қаралды 184 М.
what happens if you give claude's system prompt to llama3...
19:51
Building micro-services in Rust using gRPC!
9:22
Let's Get Rusty
Рет қаралды 56 М.
Walking on LEGO Be Like... #shorts #mingweirocks
00:41
mingweirocks
Рет қаралды 5 МЛН