Skip to content

Commit

Permalink
refactor(build): 📦 Extract shared dependencies to workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
berkus committed Oct 5, 2024
1 parent 4a032b1 commit eeef49a
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 104 deletions.
41 changes: 15 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 31 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
[workspace]
members = [
"machine",
"nucleus",
"bin/chainboot",
"bin/chainofcommand"
]
members = ["machine", "nucleus", "bin/chainboot", "bin/chainofcommand"]
resolver = "2"

[workspace.package]
version = "0.0.1"
authors = ["Berkus Decker <[email protected]>"]
documentation = "https://docs.metta.systems/vesper"
homepage = "https://github.com/metta-systems/vesper"
repository = "https://github.com/metta-systems/vesper"
readme = "README.md"
license = "BlueOak-1.0.0"
categories = ["no-std", "embedded", "os"]
publish = false
edition = "2021"

[workspace.dependencies]
qemu-exit = "3.0"
aarch64-cpu = { version = "9.4.0", git = "https://github.com/rust-embedded/aarch64-cpu", branch = "main" }
tock-registers = "0.9"
ux = { version = "0.1", default-features = false }
usize_conversions = "0.2"
bit_field = "0.10"
bitflags = "2.6"
cfg-if = "1.0"
snafu = { version = "0.8", default-features = false, features = [
"unstable-core-error",
] }
buddy-alloc = { git = "https://github.com/metta-systems/buddy-alloc", version = "0.6.0", branch = "feature/allocator-api" }
once_cell = { version = "1.20", default-features = false, features = [
"unstable",
] }
seahash = "4.1"

[patch.crates-io]
serialport = { git = "https://github.com/metta-systems/serialport-rs", branch = "macos-ENOTTY-fix" }

Expand Down
30 changes: 15 additions & 15 deletions bin/chainboot/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "chainboot"
version = "0.0.1"
authors = ["Berkus Decker <[email protected]>"]
description = "Chain boot loader"
license = "BlueOak-1.0.0"
categories = ["no-std", "embedded", "os"]
publish = false
edition = "2021"
authors.workspace = true
categories.workspace = true
edition.workspace = true
license.workspace = true
publish.workspace = true
version.workspace = true

[badges]
maintenance = { status = "experimental" }
Expand All @@ -25,15 +25,15 @@ rpi4 = ["machine/rpi4"]

[dependencies]
machine = { path = "../../machine" }
aarch64-cpu = { version = "9.4.0", git = "https://github.com/rust-embedded/aarch64-cpu", branch = "main" }
tock-registers = "0.9"
ux = { version = "0.1", default-features = false }
usize_conversions = "0.2"
bit_field = "0.10"
bitflags = "2.6"
cfg-if = "1.0"
snafu = { version = "0.8", default-features = false }
seahash = "4.1"
aarch64-cpu.workspace = true
bit_field.workspace = true
bitflags.workspace = true
cfg-if.workspace = true
seahash.workspace = true
snafu.workspace = true
tock-registers.workspace = true
usize_conversions.workspace = true
ux.workspace = true

[[bin]]
name = "chainboot"
Expand Down
24 changes: 12 additions & 12 deletions bin/chainofcommand/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
[package]
name = "chainofcommand"
version = "0.0.1"
authors = ["Berkus Decker <[email protected]>"]
description = "Host server for chainboot"
license = "BlueOak-1.0.0"
categories = ["no-std", "embedded", "os"]
publish = false
edition = "2021"
authors.workspace = true
categories.workspace = true
edition.workspace = true
license.workspace = true
publish.workspace = true
version.workspace = true

[badges]
maintenance = { status = "experimental" }

[dependencies]
clap = "4.5"
seahash = "4.1"
anyhow = "1.0"
bytes = "1.7"
clap = "4.5"
crossterm = { version = "0.28", features = ["event-stream"] }
defer = "0.2"
futures = "0.3"
futures-util = { version = "0.3", features = ["io"] }
seahash.workspace = true
tokio = { version = "1.40", features = ["full"] }
tokio-util = { version = "0.7", features = ["io", "codec", "io"] }
tokio-stream = { version = "0.1" }
tokio-serial = "5.4"
defer = "0.2"
bytes = "1.7"
tokio-stream = { version = "0.1" }
tokio-util = { version = "0.7", features = ["io", "codec", "io"] }

[lints.clippy]
needless_return = "allow" # clippy hallucinates like chatgpt
46 changes: 21 additions & 25 deletions machine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "machine"
version = "0.0.1"
authors = ["Berkus Decker <[email protected]>"]
description = "Vesper nanokernel shared code library, useful also for the chainboot loader."
documentation = "https://docs.metta.systems/vesper"
homepage = "https://github.com/metta-systems/vesper"
repository = "https://github.com/metta-systems/vesper"
readme = "README.md"
license = "BlueOak-1.0.0"
categories = ["no-std", "embedded", "os"]
publish = false
edition = "2021"
authors.workspace = true
categories.workspace = true
documentation.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
publish.workspace = true
readme.workspace = true
repository.workspace = true
version.workspace = true

[badges]
maintenance = { status = "experimental" }
Expand All @@ -29,21 +29,17 @@ rpi4 = []
test_build = []

[dependencies]
qemu-exit = "3.0"
aarch64-cpu = { version = "9.4.0", git = "https://github.com/rust-embedded/aarch64-cpu", branch = "main" }
tock-registers = "0.9"
ux = { version = "0.1", default-features = false }
usize_conversions = "0.2"
bit_field = "0.10"
bitflags = "2.6"
cfg-if = "1.0"
snafu = { version = "0.8", default-features = false, features = [
"unstable-core-error",
] }
buddy-alloc = { git = "https://github.com/metta-systems/buddy-alloc", version = "0.6.0", branch = "feature/allocator-api" }
once_cell = { version = "1.20", default-features = false, features = [
"unstable",
] }
aarch64-cpu.workspace = true
bit_field.workspace = true
bitflags.workspace = true
buddy-alloc.workspace = true
cfg-if.workspace = true
once_cell.workspace = true
qemu-exit.workspace = true
snafu.workspace = true
tock-registers.workspace = true
usize_conversions.workspace = true
ux.workspace = true

[lib]
name = "machine"
Expand Down
38 changes: 18 additions & 20 deletions nucleus/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "nucleus"
version = "0.0.1"
authors = ["Berkus Decker <[email protected]>"]
description = "Vesper nanokernel binary"
documentation = "https://docs.metta.systems/vesper"
homepage = "https://github.com/metta-systems/vesper"
repository = "https://github.com/metta-systems/vesper"
readme = "README.md"
license = "BlueOak-1.0.0"
categories = ["no-std", "embedded", "os"]
publish = false
edition = "2021"
authors.workspace = true
categories.workspace = true
documentation.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
publish.workspace = true
readme.workspace = true
repository.workspace = true
version.workspace = true

[badges]
maintenance = { status = "experimental" }
Expand All @@ -28,16 +28,14 @@ rpi4 = ["machine/rpi4"]

[dependencies]
machine = { path = "../machine" }
aarch64-cpu = { version = "9.4.0", git = "https://github.com/rust-embedded/aarch64-cpu", branch = "main" }
tock-registers = "0.9"
ux = { version = "0.1", default-features = false }
usize_conversions = "0.2"
bit_field = "0.10"
bitflags = "2.6"
cfg-if = "1.0"
snafu = { version = "0.8", default-features = false, features = [
"unstable-core-error",
] }
aarch64-cpu.workspace = true
bit_field.workspace = true
bitflags.workspace = true
cfg-if.workspace = true
snafu.workspace = true
tock-registers.workspace = true
usize_conversions.workspace = true
ux.workspace = true

[[bin]]
name = "nucleus"
Expand Down

0 comments on commit eeef49a

Please sign in to comment.