https://github.com/hashfx/learn-rust
Rust Practice
https://github.com/hashfx/learn-rust
Last synced: 18 days ago
JSON representation
Rust Practice
- Host: GitHub
- URL: https://github.com/hashfx/learn-rust
- Owner: hashfx
- Created: 2024-02-06T15:58:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T11:18:20.000Z (over 2 years ago)
- Last Synced: 2025-02-23T14:44:12.852Z (over 1 year ago)
- Language: Rust
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Setup Rust
### Install Rust
```shell
sudo apt install rustc cargo
```
### init cargo project
```shell
cargo new PROJECTNAME
```
+ cargo.toml is a **cargo configuration file** for packages and dependencies
+ cargo.lock stores versions for all the dependencies
+ update the versions of dependencies: ```cargo update```
### Run
+ ```cd learn_rust/src```
+ Compile rust file ```rustc main.rs```
+ Run compiled file ```./main.rs```