Web Application with Rust and Web Assembly

preview_player
Показать описание
In this video, I'll show you how to build a simple web application using Rust and WebAssembly. We'll be creating a Tax Calculator that runs right in your web browser. Let's dive in! 🌐✨

📋 Video Outline:
00:00 - Introduction to WebAssembly
02:30 - Setting Up the Project
05:15 - Writing the Rust Code
08:45 - Building the Project with wasm-pack
10:30 - Setting Up the Web Environment
14:00 - Serving the Project

📚 Summary:
Introduction to WebAssembly 📖

What is WebAssembly?
How it works with Rust and JavaScript.
Setting Up the Project 🛠️

Creating a new Rust project.
Configuring it for WebAssembly.
Writing the Rust Code 📝

Implementing the tax calculation logic in Rust.
Building the Project 🏗️

Using wasm-pack to build the project.
Setting Up the Web Environment 🌐

Creating an HTML file to load the WebAssembly module.
Providing a user interface.
Serving the Project 🚀

Using a simple HTTP server to serve the project.
Testing it in a web browser.
🔗 Links and Resources:

🛠️ Tools Needed:
Rust installed on your system.
wasm-pack installed.
A simple HTTP server (e.g., http-server).

📥 Download the Source Code:

🌟 Don't Forget to Like, Comment, and Subscribe! 🌟
If you enjoyed this video or found it helpful, please give it a thumbs up and consider subscribing to my channel for more tutorials. If you have any questions or suggestions, drop them in the comments below. Thanks for watching!

🔖 Hashtags:
#Rust #WebAssembly #Wasm #Programming #WebDevelopment #TaxCalculator #CodingTutorial
Рекомендации по теме
Комментарии
Автор

Hey Bek, just wanted to tell you I joined your channel and using your tutorials. It's amazing. Thank you! Could you make maybe also some advanced stuff like a CRUD app using Rust and WASM or similar, like full app. Thank you ❤

mitaskeledzija
Автор

I managed to run the tutorial as you intended it, the index.html <script> tag referenced the "./tax.js" file and that one imported stuff from "./pkg/tax_wasm.js";
I also had an error because I referenced the button with the wrong ID ("calculate" instead of "calculateButton") and it worked after that.
That was a very nice tutorial, I hate reading docs because it takes literally forever, so these kinds of tuts just get quickly to the point.
Thanks man!

EduardKaresli
Автор

Love this. As a long-time web developer, this looks like a great way to get into lower-level compiled languages while still working primarily in the domain I know and love. Going to have to learn some Rust, but this is exactly what I need to take my JS chess engine to the next level!

risingmojofilter
Автор

I love how he basically ignores all of the AI tab completion suggestions. That matches up very much with my experiences so far :)
Prompted function creation works very well (for zero-brain-functions), but for tab completion, I'm still missing a local (or even free) model.

plapperkfr
Автор

Thanks for your tutorial. I tried it with http-server v14.1.1 and simple-http-server v0.6.9 (rust based) on a linux system. Both worked with an external tax.js file in the script tag. But I don't know why. ^^

ludawig_
Автор

may i know what kind of extension you are using for auto completion ?

hemantakakati
Автор

the only problem you had is using /tax.js before, if you use without /, it should work, also you can catch error
```
run().catch(console.error);
```
you should have set up your vscode to work with js and ts with rust as things gets muddy if you can see any error first hand

codeitlikemiley
Автор

What extension do you use for auto-completion in toml file, plus that check mark I see

informer
Автор

Thanks for the tutorial. Please, next time don’t spend so much time in your implementation details, those are irrelevant. For example: calculate tax implementation.

nvictorme