Skip to content

Commit

Permalink
Merge #12
Browse files Browse the repository at this point in the history
12: Use workspace inheritance instead of a template r=jonas-schievink a=jonas-schievink

This reduces the number of things `xtask` has to do. The feature was stabilized in last week's Rust release (1.64.0).

Co-authored-by: Jonas Schievink <[email protected]>
  • Loading branch information
bors[bot] and Jonas Schievink authored Sep 26, 2022
2 parents 8f9da05 + e995d86 commit 204dfb8
Show file tree
Hide file tree
Showing 15 changed files with 113 additions and 174 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
run: cargo test
env:
RUSTFLAGS: --deny warnings
- name: Dry Run Publish
run: cargo xtask publish --dry-run

ci:
if: ${{ success() }}
Expand Down
24 changes: 0 additions & 24 deletions Cargo.template.toml

This file was deleted.

17 changes: 13 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
[workspace]
members = [
"xtask",
"pacs/*",
]
members = ["xtask", "pacs/*"]
default-members = ["xtask"]

[workspace.package]
version = "0.11.0"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
edition = "2018"

[workspace.dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m-rt = ">=0.6.15,<0.8"

# meta-dependencies (upgrade as needed, they apply to all PACs):
# @svd2rust = 0.21.0
# @form = 0.8.0
20 changes: 8 additions & 12 deletions pacs/nrf51-pac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Generated by `cargo xtask`. Do not edit.# Crate-level Cargo.toml template.
# This is copied into each generated PAC by `cargo xtask generate`.
# Only the top-level `Cargo.template.toml` should be modified.

[package]
name = "nrf51-pac"
version = "0.11.0"
edition = "2018"
description = "Peripheral Access Crate for Nordic's nrf51 microcontroller"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
documentation = "https://docs.rs/nrf51-pac"
version.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m.workspace = true
vcell.workspace = true

[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
workspace = true

[features]
rt = ["cortex-m-rt/device"]
20 changes: 8 additions & 12 deletions pacs/nrf52805-pac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Generated by `cargo xtask`. Do not edit.# Crate-level Cargo.toml template.
# This is copied into each generated PAC by `cargo xtask generate`.
# Only the top-level `Cargo.template.toml` should be modified.

[package]
name = "nrf52805-pac"
version = "0.11.0"
edition = "2018"
description = "Peripheral Access Crate for Nordic's nrf52805 microcontroller"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
documentation = "https://docs.rs/nrf52805-pac"
version.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m.workspace = true
vcell.workspace = true

[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
workspace = true

[features]
rt = ["cortex-m-rt/device"]
20 changes: 8 additions & 12 deletions pacs/nrf52810-pac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Generated by `cargo xtask`. Do not edit.# Crate-level Cargo.toml template.
# This is copied into each generated PAC by `cargo xtask generate`.
# Only the top-level `Cargo.template.toml` should be modified.

[package]
name = "nrf52810-pac"
version = "0.11.0"
edition = "2018"
description = "Peripheral Access Crate for Nordic's nrf52810 microcontroller"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
documentation = "https://docs.rs/nrf52810-pac"
version.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m.workspace = true
vcell.workspace = true

[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
workspace = true

[features]
rt = ["cortex-m-rt/device"]
20 changes: 8 additions & 12 deletions pacs/nrf52811-pac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Generated by `cargo xtask`. Do not edit.# Crate-level Cargo.toml template.
# This is copied into each generated PAC by `cargo xtask generate`.
# Only the top-level `Cargo.template.toml` should be modified.

[package]
name = "nrf52811-pac"
version = "0.11.0"
edition = "2018"
description = "Peripheral Access Crate for Nordic's nrf52811 microcontroller"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
documentation = "https://docs.rs/nrf52811-pac"
version.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m.workspace = true
vcell.workspace = true

[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
workspace = true

[features]
rt = ["cortex-m-rt/device"]
20 changes: 8 additions & 12 deletions pacs/nrf52820-pac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Generated by `cargo xtask`. Do not edit.# Crate-level Cargo.toml template.
# This is copied into each generated PAC by `cargo xtask generate`.
# Only the top-level `Cargo.template.toml` should be modified.

[package]
name = "nrf52820-pac"
version = "0.11.0"
edition = "2018"
description = "Peripheral Access Crate for Nordic's nrf52820 microcontroller"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
documentation = "https://docs.rs/nrf52820-pac"
version.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m.workspace = true
vcell.workspace = true

[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
workspace = true

[features]
rt = ["cortex-m-rt/device"]
20 changes: 8 additions & 12 deletions pacs/nrf52832-pac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Generated by `cargo xtask`. Do not edit.# Crate-level Cargo.toml template.
# This is copied into each generated PAC by `cargo xtask generate`.
# Only the top-level `Cargo.template.toml` should be modified.

[package]
name = "nrf52832-pac"
version = "0.11.0"
edition = "2018"
description = "Peripheral Access Crate for Nordic's nrf52832 microcontroller"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
documentation = "https://docs.rs/nrf52832-pac"
version.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m.workspace = true
vcell.workspace = true

[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
workspace = true

[features]
rt = ["cortex-m-rt/device"]
20 changes: 8 additions & 12 deletions pacs/nrf52833-pac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Generated by `cargo xtask`. Do not edit.# Crate-level Cargo.toml template.
# This is copied into each generated PAC by `cargo xtask generate`.
# Only the top-level `Cargo.template.toml` should be modified.

[package]
name = "nrf52833-pac"
version = "0.11.0"
edition = "2018"
description = "Peripheral Access Crate for Nordic's nrf52833 microcontroller"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
documentation = "https://docs.rs/nrf52833-pac"
version.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m.workspace = true
vcell.workspace = true

[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
workspace = true

[features]
rt = ["cortex-m-rt/device"]
20 changes: 8 additions & 12 deletions pacs/nrf52840-pac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Generated by `cargo xtask`. Do not edit.# Crate-level Cargo.toml template.
# This is copied into each generated PAC by `cargo xtask generate`.
# Only the top-level `Cargo.template.toml` should be modified.

[package]
name = "nrf52840-pac"
version = "0.11.0"
edition = "2018"
description = "Peripheral Access Crate for Nordic's nrf52840 microcontroller"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
documentation = "https://docs.rs/nrf52840-pac"
version.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m.workspace = true
vcell.workspace = true

[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
workspace = true

[features]
rt = ["cortex-m-rt/device"]
20 changes: 8 additions & 12 deletions pacs/nrf5340-app-pac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Generated by `cargo xtask`. Do not edit.# Crate-level Cargo.toml template.
# This is copied into each generated PAC by `cargo xtask generate`.
# Only the top-level `Cargo.template.toml` should be modified.

[package]
name = "nrf5340-app-pac"
version = "0.11.0"
edition = "2018"
description = "Peripheral Access Crate for Nordic's nrf5340-app microcontroller"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
documentation = "https://docs.rs/nrf5340-app-pac"
version.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m.workspace = true
vcell.workspace = true

[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
workspace = true

[features]
rt = ["cortex-m-rt/device"]
20 changes: 8 additions & 12 deletions pacs/nrf5340-net-pac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Generated by `cargo xtask`. Do not edit.# Crate-level Cargo.toml template.
# This is copied into each generated PAC by `cargo xtask generate`.
# Only the top-level `Cargo.template.toml` should be modified.

[package]
name = "nrf5340-net-pac"
version = "0.11.0"
edition = "2018"
description = "Peripheral Access Crate for Nordic's nrf5340-net microcontroller"
keywords = ["no-std", "arm", "cortex-m", "nrf", "peripherals"]
license = "0BSD"
repository = "https://github.com/nrf-rs/nrf-pacs"
documentation = "https://docs.rs/nrf5340-net-pac"
version.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
cortex-m = "0.7.3"
vcell = "0.1.3"
cortex-m.workspace = true
vcell.workspace = true

[dependencies.cortex-m-rt]
optional = true
version = ">=0.6.15,<0.8"
workspace = true

[features]
rt = ["cortex-m-rt/device"]
Loading

0 comments on commit 204dfb8

Please sign in to comment.