GithubHelp home page GithubHelp logo

steadylearner / rust-full-stack Goto Github PK

View Code? Open in Web Editor NEW
1.5K 34.0 124.0 29.3 MB

Rust projects here are easy to use. There are blog posts for them also.

Home Page: https://www.steadylearner.com

License: MIT License

Shell 0.31% Go 2.04% Rust 78.47% CSS 10.94% HTML 2.54% Python 2.39% Dockerfile 0.01% PLpgSQL 0.20% Vue 0.19% TypeScript 1.09% Makefile 0.03% C++ 0.25% SCSS 1.02% EJS 0.50%
rust-frontend rust-chat rust-yew fullstack-rust steadylearner sitemap rust rocket-rs websocket yew

rust-full-stack's Introduction

Donate

How to be a full stack Rust Developer

Read Rust API guideline. Test code here and refer to the Rust blog posts at Steadylearner.

If you need or know someone to hire a full stack developer, please contact me. I also do freelance.

If you want the similar one for Ethereum, visit eth-diary repository.

Rust full stack chat app

The reason to use this repository

Everything is simple with examples but it is not easy to make them with Rust.

Use code here and spare your time.

Crates by Steadylearner

born python and rust comparision example

born macro expansion example

React and Rust web project demo that you can login

You can read server side code made with Rust Warp framework.

React Rust demo

Smart compose demo with React

Smart compose demo with React

Node project examples

Transcriber by Steadylearner

Contact

Use them if you need a personal help or need a new developer in your company.

  1. LinkedIn or Twitter
  2. Telegram

The current state of this repository

I will update www.steadylearner.com Rust Rocket website. I knew that there was a problem with a view count update but was ignoring that. I will start after my current freelance work.

I am working while learning blockchain technologies. There will be less updates than before.

Rust

* Update Steadylearner with [a new Rocket async code](https://github.com/SergioBenitez/Rocket) and share some parts of it here.

Interesting projects and blog posts from others

CLI

If you want to make some apps, refer to the official documenation and the code snippet used there.

Cargo packages

Use $du -h ./foldername first before you use plugins that delete codes to compare.

Error handling

Read how std error works with official documenation. Learn how to use cusotm error types.

Then, use thiserror to build a web server, library etc. Use anyhow with it when necessary.

Future

  1. epoll, select, poll, epoll difference
  2. async explanation in low level
  3. Epoll, Kqueue and IOCP explained in Rust
  4. Green thread in Rust, Futures explained
  5. Rust async book, tokio, async-std, async executors
  6. futures crate documentation and future by example
  7. embed-async-await
  8. a primer to Rust async, A practical guide to async in Rust

Macro

How to publish a cargo package

Read rustdoc and cargo documentation for it.

Then, refer to cargo-publish-example and its dev.py to help the development process.

When you are ready to publish, read publishing to crate io and the similar one from cargo.

Optionally, you can include doc-comment to test code exampels in README.md. You can also dynamically create Rust documentation with it.

Refer to them also.

Start

First, clone this repository.

$git clone https://github.com/steadylearner/Rust-Full-Stack.git

Prepare Rust development environment with How to install Rust. Then, use one of these commands.

  1. $./install.sh in web folder and $./run-local.sh for a full stack Rust chat app.
  2. $cd static_files && $cargo run --release for JavaScript frontend and Rust server side web app.
  3. $cd JSON_Webservice && $./run-local.sh for YouTube vlog example with JSON Webservice.
  4. $cd yew/rust_blog && $./install.sh && yarn watch:rs for a Rust blog example.
  5. $cd React_Rust to test a React app with Warp, Rocket, Actix, Express, Restify, Django, Golang, Vibora etc.
  6. $cd sitemap if you want to build sitemap automatically with a database.

star and share it with others if you want more.

Install and Deploy Rust

  1. How to install Rust
  2. How to deploy Rust Web App

Docker and AWS

If you have a potent machine and ready to wait all again, refer to this.

Docker and Rust by Steadylearner

  1. How to use Docker commands
  2. How to use Docker with Rust

Warp

  1. How to use Rust Warp, Hello, World with include!
  2. Use it with React single page app.
  3. CRUD REST API example with a database integration.
  4. Use it with Tera template engine.
  5. Rough login and private routes implemenation - Refer to Yew + Rocket full stack example. and warp-api-starter-template

Frontend

NPM and Rust by Steadylearner

  1. How to use Rust Yew
  2. How to use a modal in Rust
  3. How to use routers in Rust Frontend
  4. How to modulize your Rust Frontend
  5. How to use NPM packages with Rust Frontend
  6. How to use markdown with Rust Frontend

Server

Rust equivalent server and client code

  1. How to use Rust Tera for undefined paths
  2. How to make Rust JSON Webservice with YouTube API
  3. How to use CORS and OPTIONS HTTP request with Rust Rocket
  4. How to serve static files with Rust
  5. How to use a single page app with Rust
  6. How to use gRPC with Rust Tonic and Postgresql database
  7. How to use React with Rust Actix

Full Stack

Rust Router Example

  1. Rust Chat App
  2. Fullstack Rust with Yew
  3. How to write Full Stack Rust code
  4. How to render a YouTube vlog with Rust Yew fetch API
  5. How to render blog posts with Rust Yew mounted API

Sitemap

Sitemaps with Rust

  1. How to build a static sitemap.xml with Rust
  2. How to build a sitemap.xml with dynamic contents in Rust
  3. How to build a sitemap for images with Rust
  4. How to automate building sitemaps with Rust

Web Scrapers

  1. How to use Python Scrapy to crawl This Week in Rust
  2. Working code of Webscraping with Rust

Selenium

  1. How to use Rust thirtyfour to scrap React app

Blog

  1. Python Blog with posts saved at GitHub
  2. Visit Steadylearner or read blog posts at GitHub

No need for a database because the posts are saved at GitHub. Others can also easily contribute to blog posts with its features.

Email

  1. Rust lettre CLI example with email templates and an attachment
  2. Email REST API JSON webserivce server with Express and Mongoose

Microservices

You can find microservices examples built with Warp, Tonic, Postgresql, Redis.

  1. gRPC Warp client and Tonic server with Postgresql and Redis Wrapper

Bots

Rust Telegram bot

  1. Rust
  2. Golang

With other languages

  1. JavaScript at a web browser
  2. Python

Golang

Refactor a private project and include tests there. Make an open source porject refering to that.

Blockchain

  • Code a complete real project.

React

Browser extensions

Chrome

Payload is chrome api and mainfest.json file.

React Chrome minimal example

Resume

You can find easily testable projects at Resume repository. If you are an employer, contact me and I can show the result with a single command with AWS.

What you will learn with it

The most of the projects here are relevant to Rust. But, you can find the examples of JavaScript, Python, Golang, Docker etc. Just use what solves your problem.

  1. How to use HTML, CSS and Markdown in Rust Frontend
  2. How to include NPM packages and JavaScript modules in it
  3. How to use Rust Yew
  4. How to write components and organize the Rust project
  5. How to build complete Full Stack Rust Web Application
  6. How to modulize your Rust project
  7. How to deploy it
  8. How to write sitemaps and metatags for it

How to contribute

Make an issue. Update deprecated code. Include your project etc.

Warning

I do what I want here. It is a personal repository to learn and prototype new projects.

Commitments

READ MORE

They help you to learn and use Rust better.

rust-full-stack's People

Contributors

steadylearner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rust-full-stack's Issues

The installation shell doesn't work

Hi, I cloned the project and ran install.sh of the web folder.
After all, I got an error

warning: 13 warnings emitted
    Finished dev [unoptimized + debuginfo] target(s) in 0.53s
warning: the following packages contain code that will be rejected by a future version of Rust: stdweb v0.4.20
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 2`
    Processing "index.wasm"...
thread 'main' panicked at /Users/username/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-web-0.6.26/src/wasm_context.rs:642:41:
unknown name section chunk type: 7
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error Command failed with exit code 101.

rustc -V
rustc 1.75.0-nightly (cd674d617 2023-10-24)
cargo -V
cargo 1.75.0-nightly (d2f6a0485 2023-10-20)

I am not sure how to fix this issue.
Please help me.

Best Regards

web_scraper build fails on ArchLinux

web_scraper build fails on updated ArchLinux,
despite openssl being already installed (or even reinstalled again to be extra sure ;) that error message is wrong:

$ git clone https://github.com/steadylearner/Rust-Full-Stack.git
$ cd web_scraper
$ cargo build
   Compiling openssl-sys v0.9.40
   Compiling lazy_static v0.2.11
   Compiling indexmap v1.0.2
   Compiling procedural-masquerade v0.1.6
   Compiling want v0.0.6
   Compiling idna v0.1.5
   Compiling tokio v0.1.13
   Compiling string_cache v0.7.3
The following warnings were emitted during compilation:

warning: /home/gw-t490/github/steadylearner/Rust-Full-Stack/web_scraper/target/debug/build/openssl-sys-1c395a4ee4054614/out/expando.c:4:24: error: pasting "RUST_VERSION_OPENSSL_" and "(" does not give a valid preprocessing token
warning:     4 | #define VERSION2(n, v) RUST_VERSION_ ## n ## _ ## v
warning:       |                        ^~~~~~~~~~~~~
warning: /home/gw-t490/github/steadylearner/Rust-Full-Stack/web_scraper/target/debug/build/openssl-sys-1c395a4ee4054614/out/expando.c:5:23: note: in expansion of macro ‘VERSION2’
warning:     5 | #define VERSION(n, v) VERSION2(n, v)
warning:       |                       ^~~~~~~~
warning: /home/gw-t490/github/steadylearner/Rust-Full-Stack/web_scraper/target/debug/build/openssl-sys-1c395a4ee4054614/out/expando.c:7:1: note: in expansion of macro ‘VERSION’
warning:     7 | VERSION(OPENSSL, OPENSSL_VERSION_NUMBER)
warning:       | ^~~~~~~

error: failed to run custom build command for `openssl-sys v0.9.40`

Caused by:
  process didn't exit successfully: `/home/gw-t490/github/steadylearner/Rust-Full-Stack/web_scraper/target/debug/build/openssl-sys-a792371b6f932029/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
  cargo:rerun-if-env-changed=OPENSSL_DIR
  cargo:rustc-link-lib=ssl
  cargo:rustc-link-lib=crypto
  OPT_LEVEL = Some("0")
  TARGET = Some("x86_64-unknown-linux-gnu")
  HOST = Some("x86_64-unknown-linux-gnu")
  CC_x86_64-unknown-linux-gnu = None
  CC_x86_64_unknown_linux_gnu = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  DEBUG = Some("true")
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-E" "/home/gw-t490/github/steadylearner/Rust-Full-Stack/web_scraper/target/debug/build/openssl-sys-1c395a4ee4054614/out/expando.c"
  cargo:warning=/home/gw-t490/github/steadylearner/Rust-Full-Stack/web_scraper/target/debug/build/openssl-sys-1c395a4ee4054614/out/expando.c:4:24: error: pasting "RUST_VERSION_OPENSSL_" and "(" does not give a valid preprocessing token
  cargo:warning=    4 | #define VERSION2(n, v) RUST_VERSION_ ## n ## _ ## v
  cargo:warning=      |                        ^~~~~~~~~~~~~
  cargo:warning=/home/gw-t490/github/steadylearner/Rust-Full-Stack/web_scraper/target/debug/build/openssl-sys-1c395a4ee4054614/out/expando.c:5:23: note: in expansion of macro ‘VERSION2’
  cargo:warning=    5 | #define VERSION(n, v) VERSION2(n, v)
  cargo:warning=      |                       ^~~~~~~~
  cargo:warning=/home/gw-t490/github/steadylearner/Rust-Full-Stack/web_scraper/target/debug/build/openssl-sys-1c395a4ee4054614/out/expando.c:7:1: note: in expansion of macro ‘VERSION’
  cargo:warning=    7 | VERSION(OPENSSL, OPENSSL_VERSION_NUMBER)
  cargo:warning=      | ^~~~~~~
  exit status: 1

  --- stderr
  thread 'main' panicked at '
  Header expansion error:
  Error { kind: ToolExecError, message: "Command \"cc\" \"-O0\" \"-ffunction-sections\" \"-fdata-sections\" \"-fPIC\" \"-g\" \"-fno-omit-frame-pointer\" \"-m64\" \"-Wall\" \"-Wextra\" \"-E\" \"/home/gw-t490/github/steadylearner/Rust-Full-Stack/web_scraper/target/debug/build/openssl-sys-1c395a4ee4054614/out/expando.c\" with args \"cc\" did not execute successfully (status code exit status: 1)." }

  Failed to find OpenSSL development headers.

  You can try fixing this setting the `OPENSSL_DIR` environment variable
  pointing to your OpenSSL installation or installing OpenSSL headers package
  specific to your distribution:

      # On Ubuntu
      sudo apt-get install libssl-dev
      # On Arch Linux
      sudo pacman -S openssl
      # On Fedora
      sudo dnf install openssl-devel

  See rust-openssl README for more information:

      https://github.com/sfackler/rust-openssl#linux
  ', /home/gw-t490/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.40/build/main.rs:432:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

http://www.steadylearner.com appears to be offline (2023-01-10)

http://www.steadylearner.com appears to be offline (2023-01-10).

Is this project still valid, live, applicable?

To be clear: I'm not trying to be "mean" or act entitled... I super appreciate all the compilation and effort that went into making this project, albeit I'm seeing it for the first time just now. I'm simply asking: is it live and being maintained/applicable (whatever that may mean), either at this github repo or at http://www.steadylearner.com/.

Thanks for any help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.