commit 7e63ca87bda65ef7f9f545d4b4d66ab22cd14982 Author: LukeMathWalker Date: Sun Aug 23 11:34:29 2020 +0100 Scaffolding diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7750139 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/target +.idea +tags diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..148d5fd --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,10 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "chapter03-0" +version = "0.1.0" + +[[package]] +name = "chapter03-1" +version = "0.1.0" + diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..912af18 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["chapter03-0", "chapter03-1"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..2840780 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Zero To Production / Code + +This repository complements the [Zero To Production book](https://www.lpalmieri.com/posts/2020-05-24-zero-to-production-0-foreword/): it hosts snapshots of the codebase of our email newsletter project at end of each chapter. + +It is structured as a `cargo` workspace: running `cargo build` will build the codebase for **all** chapters. +If you want to build/test/run the code for a _specific_ chapter, just move into its folder! E.g.: +```bash +# Run tests for the first part of Chapter 3 +cd chapter03-0 +cargo test +``` +Alternatively, from the top-level folder, you can specify the binary you are interested into: +```bash +# Run the application as it is at end of the first part of Chapter 3 +cargo run --bin chapter03-0 +`` diff --git a/chapter03-0/Cargo.toml b/chapter03-0/Cargo.toml new file mode 100644 index 0000000..df9bba7 --- /dev/null +++ b/chapter03-0/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "chapter03-0" +version = "0.1.0" +authors = ["LukeMathWalker "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/chapter03-0/src/main.rs b/chapter03-0/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/chapter03-0/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/chapter03-1/Cargo.toml b/chapter03-1/Cargo.toml new file mode 100644 index 0000000..bea4615 --- /dev/null +++ b/chapter03-1/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "chapter03-1" +version = "0.1.0" +authors = ["LukeMathWalker "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/chapter03-1/src/main.rs b/chapter03-1/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/chapter03-1/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}