Build your entire tech stack in Rust

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
tech stocks or groups of technologies that work well together to build complete applications examples include the lamp stack consisting of Linux Apache MySQL and PHP or the myrn stack consisting of mongodb Express react and node.js to name a few but there's a big problem with existing Tech Stacks they don't use rust which obviously makes them inferior I mean if you aren't using rust at this point are you even a real programmer it's time for a new stack a stack which incorporates the world's most loved programming language a stack which allows you to build apps that are blazingly fast memory safe and unnecessarily comp I mean extremely robust introducing the rusty stack a fully oxidized Tech stack allowing you to build back-end web mobile and desktop components using rust the rusty stack consists of four Technologies first up we have rocket rocket is a simple fast and type safe web framework for rust it allows us to Define our backend endpoints in a concise Way by taking advantage of rust's macro system up next surreal DB surreal DB is a new forward-looking database that combines features from relational graph and document paradigms it has a query language called surreal ql which is very similar to SQL allowing us to get up and running quickly next up Towery Towery is a framework for building desktop applications using web Technologies like HTML CSS and JavaScript for the front end and rust for the back end it's similar to electron but produces binaries that are smaller faster and more secure lastly we have you you as a component based UI framework like react except it allows you to write your web apps in Rust which is then compiled down to webassembly Let's explore building a simple to-do list app using the rusty stack before we get started make sure to get your free rust cheat sheet at letsgetrusty.com forward slash cheat sheet we'll start with the back end but will create a new binary called to do API and add all the necessary dependencies which include rocket and surreal DB next we'll Define some helper functionality including an error enum a Prelude containing a generic wrapper type a useful map macro and try from implementations for surreal DB types then we'll implement the data store logic first we'll Define the models then we'll implement the crud operations using The Surreal query language next we'll set up the web server in main first we'll import the needed dependencies then create our endpoints and finally update the main function to start a rocket server instance we also need to do some extra work to configure cores finally we'll create a rocket configuration file to specify the poor our server should use now we can run our server and to verify that it's working using Postman great our server is working next let's implement the front-end clients first we'll create the web client like before We'll add all the required dependencies and create an index.html file which serves as the entry point for our web app we'll also create a style.css file and add some predefined styling next we'll Define the models then we'll Define our app State using a Redux like pattern next we'll add functions that call each one of our API endpoints next we'll create the controller which will contain our business logic and act as the glue between UI components and application state finally we'll Define the UI components starting with the new task form then the task item and then the task list finally we'll finish by creating the root app component in main.rs then we'll pass the root app component to the start app function and run the app to test it out we'll add to do items toggle some and delete others gray our web app works and looks great next we'll implement the desktop client we'll use create Towery app to start a new project then we'll update styles.css and index.html finally We'll add our business logic to main.rs with that let's run the app our desktop app is working and changes on one client are reflected on the other client at the moment Towery only allows us to create desktop apps but in the future we will also be able to create mobile apps there you have it an entire app with multiple clients built using the rusty stack now is it practical for you to build all your applications using the rusty stack probably not but we're not here to do what's practical we're here to do what's Rusty before you go make sure to get your free rust cheat sheet at let's get rusty.com forward slash cheat sheet give the video a like And subscribe to the channel for more rust content with that said I'll see you in the next one foreign
Info
Channel: Let's Get Rusty
Views: 203,207
Rating: undefined out of 5
Keywords: learn rust programming language, learn rust programming, rust programming language, rust programming, rust programming tutorial, learn rust, programming, rust programming language tutorial, rust programming project, rust programming language course, rust programming full tutorial, rust programming 2023, best programming languages to learn in 2023, rust programming 2022, programming in rust, rust in 2023, future of rust, api, surrealdb, tauri, yew, rocket, app development, rust
Id: luOgEhLE2sg
Channel Id: undefined
Length: 7min 22sec (442 seconds)
Published: Fri Mar 03 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.