浏览代码

Cargo project, README & gitignore

Emilio González Montaña 4 年之前
当前提交
7287416fb3
共有 4 个文件被更改,包括 25 次插入0 次删除
  1. 3 0
      .gitignore
  2. 9 0
      Cargo.toml
  3. 7 0
      README.md
  4. 6 0
      src/main.rs

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+/.idea
+/target
+/Cargo.lock

+ 9 - 0
Cargo.toml

@@ -0,0 +1,9 @@
+[package]
+name = "variables"
+version = "0.1.0"
+authors = ["Emilio González Montaña <emilio@ociotec.com>"]
+edition = "2018"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]

+ 7 - 0
README.md

@@ -0,0 +1,7 @@
+# 04 - Variables
+
+## Build & run
+
+```
+cargo run
+```

+ 6 - 0
src/main.rs

@@ -0,0 +1,6 @@
+fn main() {
+    let mut x = 45;
+    println!("The value of x is {}", x);
+    x = 60;
+    println!("The value of x is {}", x);
+}