Skip to content

Commit

Permalink
blanket workspace template
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheyca committed Feb 21, 2024
1 parent a64e7c3 commit ec0b6ef
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions src/exercises/multiple_blanket.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,75 @@ mod external {
}
# }
```

Template for a workspace:

```toml
# Cargo.toml
[workspace]
members = ["a", "a1", "a2", "common"]

[workspace.package]
version = "0.0.1"
edition = "2021"
publish = false

[package]
name = "solution"
version.workspace = true
edition.workspace = true
publish.workspace = true

[dependencies]
a.path = "a"
a1.path = "a1"
a2.path = "a2"
common.path = "common"
```

```toml
# a/Cargo.toml
[package]
name = "a"
version.workspace = true
edition.workspace = true
publish.workspace = true

[dependencies]
a1.path = "../a1"
a2.path = "../a2"
common.path = "../common"
```

```toml
# a1/Cargo.toml
[package]
name = "a1"
version.workspace = true
edition.workspace = true
publish.workspace = true

[dependencies]
common.path = "../common"
```

```toml
# a2/Cargo.toml
[package]
name = "a2"
version.workspace = true
edition.workspace = true
publish.workspace = true

[dependencies]
common.path = "../common"
```

```toml
# common.Cargo.toml
[package]
name = "common"
version.workspace = true
edition.workspace = true
publish.workspace = true
```

0 comments on commit ec0b6ef

Please sign in to comment.