Engineer Man - "What's going on 'engineers'?" I guess I don't have imposter syndrome anymore.
@Conlexio4 жыл бұрын
personally i consider myself a scientist (.. computer scientist but still)
@hashkeeper3 жыл бұрын
yeah you're right that really had a positive effect actually, i was like "huh, yeah maybe in a bit it i study"
@DucBanal4 жыл бұрын
Would be really interested to see a more involved project in WebAssembly with Rust. Thanks for the great content.
@EngineerMan4 жыл бұрын
Yep, expect this in the future.
@the1whoplayz4 жыл бұрын
I was just starting to get into WebAssembly and Rust. Thanks for uploading it at a convenient time!
@lucianochadru40642 жыл бұрын
Yeah me too and honestly i don't get the point here. I tough we could build weapps with rust but..... i guess that's not exactly that
@jlegolas-YT4 жыл бұрын
I was interested in Web Assembly, what a great timing!
@betoharres4 жыл бұрын
I liked the simplicity; looking forward into more videos
@singhsaubhik3 жыл бұрын
This was so easy, even easier than using FFI (for other projects). Thank you so much sharing 👏
@scoldingtissue22174 жыл бұрын
My computer literacy is so low that everything in this video was like a blur to me, still interesting to watch though
@jomy10-games3 жыл бұрын
I would love to see more WebAssembly videos!
@HK-sw3vi3 жыл бұрын
my project folder looks exactly the same as yours except 75% of them are either incomplete or empty
@carlosmspk2 жыл бұрын
Don't know about everyone else, but I had to add some stuff to package.json for npm install to work: { "scripts": { "serve": "webpack-dev-server" }, "dependencies": { "wasm-server": "0.0.4", "webpack": "4.43.0", "webpack-cli": "3.3.11" } }
@violentcrumble67204 жыл бұрын
great video thank you, Would love to see more wasm stuff, It would be awesome if you could make a small game in rust that compiles into wasm, I have seen a lot of really awesome visual stuff made with wasm so would love to learn more.
@oyinloluwabalogun48333 жыл бұрын
Hey, when I try to run the server, it prompts me to download the wasm file. Is this because I did something wrong?
@ChamplooMusashi2 жыл бұрын
Happens to me too
@Tantandev4 жыл бұрын
Incredibly well paced and informative!
@JavierHarford2 жыл бұрын
Hey Engineer Man, Thanks for this cool video, hoping that you get round to a more advanced example in the near future
@koensampers55053 жыл бұрын
where do you clarify that the wasmserver should open index.html? for example if you change that name to index2 it wont load.
@user-if7lb8zy8i3 жыл бұрын
I followed all the steps correclty but when I am opening localhost 3000 the wasm file just gets downloaded and I can see any page of any sort
@joaomelo97742 жыл бұрын
hi. great intro video. tks! i would love to learn how to render user interfaces in the browser using the rust+wasm combo you introduced here. all I found talked about using some rust framework. but I'm really curious about the underlying mechanism. do you have any video on that?
@pcfreak19924 жыл бұрын
So the JS files in the pkg directory are not translated (to JS) versions of the Rust code but just “helpers” for loading the WASM code in JS projects?
@EngineerMan4 жыл бұрын
Yep, wasm-pack basically makes a module for you. Although you can just use the .wasm file directly and ignore the rest, if you desire.
I'd recommend parcel because there's no tedious config required (unless you want to). It supports rust and wasm.
@pavelkostetskiy75614 жыл бұрын
overwhelming quality of content)) thank you)
@ElijahLM014 жыл бұрын
for some reason when i attempt to put a function that calls wasm.add into init.js then link it to a button click it gives me an error saying that the function im calling isnt defined. any ideas?
@atridgedcosta43744 жыл бұрын
Thanks for this video! Would be great to see a video on how to debug the webassembly/rust in the browser.
@_prothegee3 жыл бұрын
So basically variables or function from another language translated to javascript? and default runtime is from the browser engine?
@ledues33364 жыл бұрын
Does NGINX support the Wasm MIME type?
@diarmaidmac21494 жыл бұрын
A naiive question but why can't all that be done with just rust? It looks like a mess to me to cross reference javascript and wasm and complete all those tedious steps etc. It would be great to just use a single rust crate to write and compile to wasm without using javascript at all. Thanks for the tutorial! It would be great to see a practical example at some point to increase the incentive to dabble with wasm.
@kartikjavali2054 жыл бұрын
Great content! concisely delivered!!
@SayWhat61874 жыл бұрын
Damn, I was just looking at Yew (Framework for Rust WASM) right now haha!
@ry_fpv3 жыл бұрын
maybe webpack should be installed as devdependencies, but anywhere,very good intro video!!!
@escapefelicity29134 жыл бұрын
OT: How do I tell python to use a GPU or ASIC for sha256?
@iilugs3 жыл бұрын
This madlad is using atom. Much respect
@RobertWildling4 жыл бұрын
Would it be possible to "just" import a root file of a RUST library, convert it to wasm and the access the library's API from Javascript? Any chance to take you up on your statement that you might make more videos on that topic? Would be awesome! Maybe something with audio (maybe file converter? or an effect thingy...)
@ablanchi4 жыл бұрын
Cant wait to see more practical uses. Right now it just seems like 'thats pretty neat, but JS is already pretty fast'. Thanks for the videos as always!
@MrCutter4 жыл бұрын
JS pretty fast? Not really compared to others
@ablanchi4 жыл бұрын
@@MrCutter For the kind of stuff we ask JS to do in the browser, how much faster do you really need? Id love to see examples of parts of web applications that justify using wasm, with all its drawbacks.
@nangzdk4 жыл бұрын
Man people really hate javascript. Lot of steps to just write in a different language! Kidding! Nice video!
@ErnestGWilsonII4 жыл бұрын
Thank you for taking the time to make this video and share it with all of us! Can you please be more specific about how a function in Rust apparently named fn was mapped up to a method in JavaScript with .add? I am still a little bit lost, as I do not know Rust (but I am trying to learn). Can you give the same super simple example where you have a couple of functions in Rust and then you call those functions from JavaScript? I am currently tripped up on how it maps up from JavaScript into Rust and I suspect if we had a couple of functions with various names that would help clarify things for me. Again thank you for making this video, I am subscribed with notifications turned on and of course thumbs up!
@EngineerMan4 жыл бұрын
I think you just misread. It's written as `pub fn add`. `pub fn` is the designator in rust for a public function and then `add` is simply the name of the function.
@ErnestGWilsonII4 жыл бұрын
@@EngineerMan thank you for responding, yes lack of understanding on my part and your clarification was excellent!
@y09i_4 жыл бұрын
why would it not replace javascript though if it is just faster? We can probably compile javascript to webassebly too, if we want to keep using javascript.
@rodrigocorrea77084 жыл бұрын
Hey Engineer Man, thanks for the video! May I ask which theme are you using in Atom?
@EngineerMan4 жыл бұрын
It's the default, One Dark.
@rodrigocorrea77084 жыл бұрын
Engineer Man Thank you!
@codebroker_4 жыл бұрын
When i run the wasm-server and go to localhost:3000, it just downloads the index.html file. What did I do wrong?
@elthomas_4 жыл бұрын
Me too I fixed it by using npm "serve" instead of "wasm-server"
@89blumenkohl3 жыл бұрын
@@elthomas_ serve what?
@89blumenkohl3 жыл бұрын
cd dist; python -m http.server 3000
@therealdjflip4 жыл бұрын
which plugin are you using to display the errors on the eft ?
@EngineerMan4 жыл бұрын
What do you mean errors?
@therealdjflip4 жыл бұрын
@@EngineerMan bad wording on my part @ 2:21 where the red! comes up etc
@EngineerMan4 жыл бұрын
It's rls which is part of the rust-ide package.
@therealdjflip4 жыл бұрын
Engineer Man cheers
@MichaelMantion4 жыл бұрын
Exactly the video I needed from the youtuber I prefer. Am I dying?
@EngineerMan4 жыл бұрын
Nope you're very much alive.
@rish14594 жыл бұрын
Awesome content; do you foresee any issues where wasm may not be universally implemented across servers? That is, could the implementation be server dependent (write the implementation one way for one server and another way for others)? When do you foresee widespread server support for WASM?
@EngineerMan4 жыл бұрын
I expect there to be widespread support among modern browsers. The stakeholders with respect to WASM include folks like Mozilla, Google, Microsoft, and Apple. None of the four stand to gain by bucking the system.
@rajeshwaris66634 жыл бұрын
What distro youre on ?
@zemariagp4 жыл бұрын
Great stuff
@T1Oracle4 жыл бұрын
This isn't working, "wasm-server" is serving my bundle.js as "text/html"
@adamturner62494 жыл бұрын
I only know Python and have been wanting to branch out into a lower-level, statically typed language. Recently I’ve been looking into Rust and this video helped me settle on it as the one I want to move forward with. Thanks, Engineer Man!
@EngineerMan4 жыл бұрын
Rust is a fine choice indeed!
@unsafecast36364 жыл бұрын
Wasm doesn’t get compiled to native. It’s a stack machine
@IoannisAudet3 жыл бұрын
Wait.... why does MDN Rust Webassembly tutorial looks exactly like this tutorial?
@coryulrich64894 жыл бұрын
This reminds me of that programming parody where you just pay some code and suddenly have Minecraft.
@user-or7ji5hv8y4 жыл бұрын
When does JavaScript breakdown?
@hashkeeper3 жыл бұрын
epic! thanks
@Dev_Everything2 жыл бұрын
Please do this in C++
@Eugensson4 жыл бұрын
Does not work for me - firefox suggests downloading the WASM file
@heidtmare4 жыл бұрын
this is happening to me too, i also tried Brave
@elthomas_4 жыл бұрын
Fixed this by using npm "serve" instead of "wasm-server"
@89blumenkohl3 жыл бұрын
cd dist; python -m http.server 3000
@martinmaurer39352 жыл бұрын
His face at 6:33 ... priceless :D ..
@DeLaCruzer112 жыл бұрын
Didnt Java tried that before?
@619frank4 жыл бұрын
Awesome
@SteveHazel4 жыл бұрын
i mean, i shouuuld learn webpack and rust (i guess? webpack at least). i kiiiiiinda wish ya used c instead of rust though... for us old timers...
@avi124 жыл бұрын
Omg, you can just in time! I'm trying to mess with WebAssembly and C++
@Chaosman884 жыл бұрын
whould you do a similar series with python?
@potatify68294 жыл бұрын
Hey peeps
@sunhsiang66444 жыл бұрын
Emmm Response has unsupported MIME type
@dieweltentdecker58784 жыл бұрын
Pls make a AI video over adb.
@btarg14 жыл бұрын
this is a very complicated way to add two numbers together... lol
@Nexus-rt1bm4 жыл бұрын
"This is a library you can get very quickly" No, not at all.
@alexandervonkoenigsegg10694 жыл бұрын
I read "Getting stabbed with WebAssembly"
@Nexus-rt1bm4 жыл бұрын
Same thing at this point
@diablo.the.cheater4 жыл бұрын
webassembly is the thing of the devil, the browser should only have javascript, and the desktop application ought to be made in electron, the mobile apps as pwa and the servers run only node.js, that is the way
@baddlyghost55094 жыл бұрын
First
@ashishbisoi74884 жыл бұрын
second
@TechdubberStudios4 жыл бұрын
"We were able to add two numbers without writing any javascript" *literally writes import * as wasm let res = wasm.add(2,8) console.log(2,8)" No, this does not show the potential of webassembly. This could be done with just JavaScript in fewer lines of code, without using a bundler. To actually show the potential of WASM you'll have to actually do highly computational stuff, and create a benchmark between javascript code and wasm code @ runtime. If i didn't know what WASM is all about, I would've stuck with JavaScript without even considering looking into WASM.
@HotRatsAndTheStooges4 жыл бұрын
This wasn't meant to show the potential of wasm, it was meant to show how you can use wasm in your own project. hence the title "Getting started"
@zemariagp4 жыл бұрын
Potential Noun 1. latent qualities or abilities that may be developed and lead to future success or usefulness. According to this, I see the potential.
@ZacKoch4 жыл бұрын
Oof. This one went way over your head didn't it @Aruxandei Cosmin
@tayfun63784 жыл бұрын
so can we say it's for lazy people who cannot learn JS?
@shekishral65702 жыл бұрын
No, mainly meant to be used by javascript developers for performance reasons