Commit 55d9353

mo khan <mo@mokhan.ca>
2023-02-13 20:52:54
Add notes on cargo
1 parent a0b6be5
1.3/hello_cargo/src/main.rs
@@ -0,0 +1,3 @@
+fn main() {
+    println!("Hello, world!");
+}
1.3/hello_cargo/Cargo.lock
@@ -0,0 +1,7 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "hello_cargo"
+version = "0.1.0"
1.3/hello_cargo/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "hello_cargo"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
.gitignore
@@ -0,0 +1,1 @@
+target/
README.md
@@ -1,2 +1,35 @@
+# Rust Langugage
 
 current: https://doc.rust-lang.org/book/ch01-01-installation.html
+
+# Shell
+
+Compile a single file.
+
+```bash
+$ rustc main.rs
+```
+
+Create a new cargo project:
+
+```bash
+$ cargo new hello_world
+```
+
+Build a cargo project:
+
+```bash
+$ cargo build
+```
+
+Run a cargo project:
+
+```bash
+$ cargo run
+```
+
+Check for errors in a cargo project:
+
+```bash
+$ cargo check
+```