Scaffolding

This commit is contained in:
LukeMathWalker 2020-08-23 11:34:29 +01:00
commit 7e63ca87bd
8 changed files with 55 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/target
.idea
tags

10
Cargo.lock generated Normal file
View file

@ -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"

2
Cargo.toml Normal file
View file

@ -0,0 +1,2 @@
[workspace]
members = ["chapter03-0", "chapter03-1"]

16
README.md Normal file
View file

@ -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
``

9
chapter03-0/Cargo.toml Normal file
View file

@ -0,0 +1,9 @@
[package]
name = "chapter03-0"
version = "0.1.0"
authors = ["LukeMathWalker <rust@lpalmieri.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

3
chapter03-0/src/main.rs Normal file
View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

9
chapter03-1/Cargo.toml Normal file
View file

@ -0,0 +1,9 @@
[package]
name = "chapter03-1"
version = "0.1.0"
authors = ["LukeMathWalker <rust@lpalmieri.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

3
chapter03-1/src/main.rs Normal file
View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}