Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert the repo structure to a virtual workspace #164

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
sudo apt install libudev-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --all-features
- run: cargo check --all-features --workspace

test:
name: Test Suite
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt
- run: cargo fmt --check --all

clippy:
name: Clippy
Expand All @@ -64,7 +64,7 @@ jobs:
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-features
- run: cargo clippy --all-features --workspace

spelling:
name: Spell Check
Expand All @@ -89,4 +89,4 @@ jobs:
with:
components: rust-docs
- uses: Swatinem/rust-cache@v2
- run: cargo doc --no-deps --all-features
- run: cargo doc --no-deps --all-features --workspace
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
sudo apt update
sudo apt install libudev-dev
- uses: dtolnay/rust-toolchain@stable
- run: cargo publish --all-features --locked --verbose
- run: cargo publish --all-features --locked --verbose -p zproto
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to think about how other sub-crates will be released and properly tagged.

env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
110 changes: 2 additions & 108 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,109 +1,3 @@
[package]
name = "zproto"
version = "0.4.0-pre"
authors = ["Stephen Hunt <[email protected]>"]
edition = "2021"
description = "A library from communicating with Zaber products in Rust."
license = "MIT"
readme = "README.md"
repository = "https://github.com/stphnt/zproto"
documentation = "https://docs.rs/zproto"
homepage = "https://github.com/stphnt/zproto"
keywords = ["Zaber", "ASCII", "Binary", "serial", "RS232"]
categories = ["hardware-support"]
include = [
"examples/",
"src/",
"test/",
"LICENSE",
"README.md",
]

[package.metadata.docs.rs]
all-features = true

[workspace]
members = ["scripts/generate-apis"]

[features]
default = ["ascii", "binary", "v_latest"]
ascii = [] # Include the ASCII protocol
binary = [] # Include the Binary protocol
v6_14 = [] # Enable APIs related to firmware version 6.14
v6_15 = [] # Enable APIs related to firmware version 6.15
v6_16 = [] # Enable APIs related to firmware version 6.16
v6_17 = [] # Enable APIs related to firmware version 6.17
v6_18 = [] # Enable APIs related to firmware version 6.18
v6_19 = [] # Enable APIs related to firmware version 6.19
v6_20 = [] # Enable APIs related to firmware version 6.20
v6_21 = [] # Enable APIs related to firmware version 6.21
v6_22 = [] # Enable APIs related to firmware version 6.22
v6_23 = [] # Enable APIs related to firmware version 6.23
v6_24 = [] # Enable APIs related to firmware version 6.24
v6_25 = [] # Enable APIs related to firmware version 6.25
v6_26 = [] # Enable APIs related to firmware version 6.26
v6_27 = [] # Enable APIs related to firmware version 6.27
v6_28 = [] # Enable APIs related to firmware version 6.28
v6_29 = [] # Enable APIs related to firmware version 6.29
v6_30 = [] # Enable APIs related to firmware version 6.30
v6_31 = [] # Enable APIs related to firmware version 6.31
v6_32 = [] # Enable APIs related to firmware version 6.32
v7_01 = [] # Enable APIs related to firmware version 7.01
v7_03 = [] # Enable APIs related to firmware version 7.03
v7_05 = [] # Enable APIs related to firmware version 7.05
v7_06 = [] # Enable APIs related to firmware version 7.06
v7_07 = [] # Enable APIs related to firmware version 7.07
v7_08 = [] # Enable APIs related to firmware version 7.08
v7_09 = [] # Enable APIs related to firmware version 7.09
v7_10 = [] # Enable APIs related to firmware version 7.10
v7_11 = [] # Enable APIs related to firmware version 7.11
v7_12 = [] # Enable APIs related to firmware version 7.12
v7_13 = [] # Enable APIs related to firmware version 7.13
v7_14 = [] # Enable APIs related to firmware version 7.14
v7_15 = [] # Enable APIs related to firmware version 7.15
v7_16 = [] # Enable APIs related to firmware version 7.16
v7_17 = [] # Enable APIs related to firmware version 7.17
v7_18 = [] # Enable APIs related to firmware version 7.18
v7_19 = [] # Enable APIs related to firmware version 7.19
v7_20 = [] # Enable APIs related to firmware version 7.20
v7_21 = [] # Enable APIs related to firmware version 7.21
v7_22 = [] # Enable APIs related to firmware version 7.22
v7_23 = [] # Enable APIs related to firmware version 7.23
v7_24 = [] # Enable APIs related to firmware version 7.24
v7_25 = [] # Enable APIs related to firmware version 7.25
v7_26 = [] # Enable APIs related to firmware version 7.26
v7_27 = [] # Enable APIs related to firmware version 7.27
v7_28 = [] # Enable APIs related to firmware version 7.28
v7_29 = [] # Enable APIs related to firmware version 7.29
v7_30 = [] # Enable APIs related to firmware version 7.30
v7_31 = [] # Enable APIs related to firmware version 7.31
v7_32 = [] # Enable APIs related to firmware version 7.32
v7_33 = [] # Enable APIs related to firmware version 7.33
v7_34 = [] # Enable APIs related to firmware version 7.34
v7_35 = [] # Enable APIs related to firmware version 7.35
v7_36 = [] # Enable APIs related to firmware version 7.36
v7_37 = [] # Enable APIs related to firmware version 7.37
v7_38 = [] # Enable APIs related to firmware version 7.38
v7_39 = [] # Enable APIs related to firmware version 7.39
v_latest = [] # Enable APIs related to the latest firmware version

# Use the nightly-only `doc_cfg` feature when generating the documentation.
doc_cfg = []

[dependencies]
log = "0.4.19"
paste = "1.0.12"
serialport = "4.2.1"

[dev-dependencies]
simple_logger = "4.2.0"
static_assertions = "1.1.0"
trybuild = "1.0.80"

[[example]]
name = "ascii"
required-features = ["ascii"]

[[example]]
name = "binary"
required-features = ["binary"]
resolver = "2"
members = ["crates/*"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
106 changes: 106 additions & 0 deletions crates/zproto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
[package]
name = "zproto"
version = "0.4.0-pre"
authors = ["Stephen Hunt <[email protected]>"]
edition = "2021"
description = "A library from communicating with Zaber products in Rust."
license = "MIT"
readme = "README.md"
repository = "https://github.com/stphnt/zproto"
documentation = "https://docs.rs/zproto"
homepage = "https://github.com/stphnt/zproto"
keywords = ["Zaber", "ASCII", "Binary", "serial", "RS232"]
categories = ["hardware-support"]
include = [
"examples/",
"src/",
"test/",
"LICENSE",
"README.md",
]

[package.metadata.docs.rs]
all-features = true

[features]
default = ["ascii", "binary", "v_latest"]
ascii = [] # Include the ASCII protocol
binary = [] # Include the Binary protocol
v6_14 = [] # Enable APIs related to firmware version 6.14
v6_15 = [] # Enable APIs related to firmware version 6.15
v6_16 = [] # Enable APIs related to firmware version 6.16
v6_17 = [] # Enable APIs related to firmware version 6.17
v6_18 = [] # Enable APIs related to firmware version 6.18
v6_19 = [] # Enable APIs related to firmware version 6.19
v6_20 = [] # Enable APIs related to firmware version 6.20
v6_21 = [] # Enable APIs related to firmware version 6.21
v6_22 = [] # Enable APIs related to firmware version 6.22
v6_23 = [] # Enable APIs related to firmware version 6.23
v6_24 = [] # Enable APIs related to firmware version 6.24
v6_25 = [] # Enable APIs related to firmware version 6.25
v6_26 = [] # Enable APIs related to firmware version 6.26
v6_27 = [] # Enable APIs related to firmware version 6.27
v6_28 = [] # Enable APIs related to firmware version 6.28
v6_29 = [] # Enable APIs related to firmware version 6.29
v6_30 = [] # Enable APIs related to firmware version 6.30
v6_31 = [] # Enable APIs related to firmware version 6.31
v6_32 = [] # Enable APIs related to firmware version 6.32
v7_01 = [] # Enable APIs related to firmware version 7.01
v7_03 = [] # Enable APIs related to firmware version 7.03
v7_05 = [] # Enable APIs related to firmware version 7.05
v7_06 = [] # Enable APIs related to firmware version 7.06
v7_07 = [] # Enable APIs related to firmware version 7.07
v7_08 = [] # Enable APIs related to firmware version 7.08
v7_09 = [] # Enable APIs related to firmware version 7.09
v7_10 = [] # Enable APIs related to firmware version 7.10
v7_11 = [] # Enable APIs related to firmware version 7.11
v7_12 = [] # Enable APIs related to firmware version 7.12
v7_13 = [] # Enable APIs related to firmware version 7.13
v7_14 = [] # Enable APIs related to firmware version 7.14
v7_15 = [] # Enable APIs related to firmware version 7.15
v7_16 = [] # Enable APIs related to firmware version 7.16
v7_17 = [] # Enable APIs related to firmware version 7.17
v7_18 = [] # Enable APIs related to firmware version 7.18
v7_19 = [] # Enable APIs related to firmware version 7.19
v7_20 = [] # Enable APIs related to firmware version 7.20
v7_21 = [] # Enable APIs related to firmware version 7.21
v7_22 = [] # Enable APIs related to firmware version 7.22
v7_23 = [] # Enable APIs related to firmware version 7.23
v7_24 = [] # Enable APIs related to firmware version 7.24
v7_25 = [] # Enable APIs related to firmware version 7.25
v7_26 = [] # Enable APIs related to firmware version 7.26
v7_27 = [] # Enable APIs related to firmware version 7.27
v7_28 = [] # Enable APIs related to firmware version 7.28
v7_29 = [] # Enable APIs related to firmware version 7.29
v7_30 = [] # Enable APIs related to firmware version 7.30
v7_31 = [] # Enable APIs related to firmware version 7.31
v7_32 = [] # Enable APIs related to firmware version 7.32
v7_33 = [] # Enable APIs related to firmware version 7.33
v7_34 = [] # Enable APIs related to firmware version 7.34
v7_35 = [] # Enable APIs related to firmware version 7.35
v7_36 = [] # Enable APIs related to firmware version 7.36
v7_37 = [] # Enable APIs related to firmware version 7.37
v7_38 = [] # Enable APIs related to firmware version 7.38
v7_39 = [] # Enable APIs related to firmware version 7.39
v_latest = [] # Enable APIs related to the latest firmware version

# Use the nightly-only `doc_cfg` feature when generating the documentation.
doc_cfg = []

[dependencies]
log = "0.4.19"
paste = "1.0.12"
serialport = "4.2.1"

[dev-dependencies]
simple_logger = "4.2.0"
static_assertions = "1.1.0"
trybuild = "1.0.80"

[[example]]
name = "ascii"
required-features = ["ascii"]

[[example]]
name = "binary"
required-features = ["binary"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading