https://github.com/chrisjmendez/rust-exercises
Answers to basic Dapp problems using Rust
https://github.com/chrisjmendez/rust-exercises
Last synced: 10 months ago
JSON representation
Answers to basic Dapp problems using Rust
- Host: GitHub
- URL: https://github.com/chrisjmendez/rust-exercises
- Owner: chrisjmendez
- License: mit
- Created: 2022-06-07T04:23:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-30T00:24:53.000Z (over 3 years ago)
- Last Synced: 2025-01-25T17:28:47.103Z (12 months ago)
- Language: Rust
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust Exercises
Answers to basic Dapp problems using Rust
Like strumming a guitar or painting on Adobe Illustrator, I learn best through exercises. This collection is organized by theme and aims to explore how to develop a Dapp.
## 00 - Getting Started
Use [```rustup```](https://rustup.rs/) to install rust.
```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
Verify your work
```
which rustup
```
Create a new project using ```cargo```
```
cargo new --bin
```
## 01 - CLI with ```clap```
[```clap```](https://crates.io/crates/clap) is a command-line argument parser which we will use for our CLI. Our CLI will actually be a Rust Macro.
In this example, we will capture the crate version similar to what you would present in cargo.
```
cargo run -- -- RUST
```
**Note:** The ```--``` marks the end of the arguments to cargo.