TLDR; Cargo is a package manager for Rust that handles the dependencies, compiling and distribution. Cargo can publish your package to
crates.ioso that it can be used with other applications within Rust.
To get started with Cargo, see if you have Cargo installed via running
cargo with the help flag:
ubuntuyou might need to run
sudo cargo help.
- Cargo-Watch will watch over the current project’s source code for changes and then run Cargo commands when they occur.
- This will make building and development easier!
To install the cargo-watch, run this command below in shell on the dev operating system.
cargo install cargo-watch
The default cargo watch that we are currently using is:
cargo watch -q -c -x run
(From the Official Rust Lang Website) This book assumes that you’ve written code in another programming language but doesn’t make any assumptions about which one. We’ve tried to make the material broadly accessible to those from a wide variety of programming backgrounds. We don’t spend a lot of time talking about what programming is or how to think about it. If you’re entirely new to programming, you would be better served by reading a book that specifically provides an introduction to programming.
The aim of this tutorial is to take you to a place where you can read and write enough Rust to fully appreciate the excellent learning resources available online, in particular The Book. It’s an opportunity to try before you buy, and get enough feeling for the power of the language to want to go deeper.
This small book describes how to use Rust and WebAssembly together.
This Rust Cookbook is a collection of simple examples that demonstrate good practices to accomplish common programming tasks, using the crates of the Rust ecosystem.
This is a quick repo / guide on a Rust MySQL Microservice!
- Official Repo
We plan to extend Strapi via the Rust MySQL Microservices ^ example above but isolating layers, such as login, register, ect..
On Linux or MacOS or (WSL on Windows):
According to Chapter 1.1 from the Official Book to install rust you can use the following script:
Command to install via
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh
-> The command downloads a script and starts the installation of the
rustuptool, which installs the latest stable version of Rust. You might be prompted for your password. If the installation is successful, the following line will appear: ->
Rust is installed now. Great!
- You will also need a linker, which is a program that Rust uses to join its compiled outputs into one file. It is likely you already have one. If you get linker errors, you should install a C compiler…
There are a couple options for running a HTTP server in Rust.
- Axum is an ergonomic and modular Rust web application framework.
- Github Repo
- Axum can be extended through Tower, which is an ecosystem of middleware, services and utilities
- Actix is TO:DO
- Rocket is TO:DO
Youki is an Open Container Initiative runtime specification library written in Rust.
Official Youki Repo
There are some issues with some devices within
CGroups v2 that should be noted.
Since youki is a low-level runtime, its recommend that you combine it with a high-level runtime, such as Docker / Podman.