Skip to content

Commit

Permalink
Move the main crate to the top level of the repo (#498)
Browse files Browse the repository at this point in the history
Once upon a time, there were several crates in a workspace here. Now all
that's left is `xtask`, which is just a command-line utility for
development. So, let's move the main code to the top level of the repo.

This has no behavioral change - it is just moving things about.
  • Loading branch information
djmitche authored Dec 9, 2024
1 parent ca77420 commit b16a558
Show file tree
Hide file tree
Showing 55 changed files with 53 additions and 96 deletions.
73 changes: 51 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,67 @@
[package]
name = "taskchampion"
version = "1.0.0-pre"
authors = ["Dustin J. Mitchell <[email protected]>"]
description = "Personal task-tracking"
homepage = "https://gothenburgbitfactory.github.io/taskchampion/"
documentation = "https://docs.rs/crate/taskchampion"
repository = "https://github.com/GothenburgBitFactory/taskchampion"
readme = "src/crate-doc.md"
license = "MIT"
edition = "2021"
rust-version = "1.78.0"

[workspace]
members = [ "xtask" ]
resolver = "2"

members = [
"taskchampion",
"xtask",
]
[features]
default = ["sync", "bundled"]

resolver = "2"
# Support for all sync solutions
sync = ["server-sync", "server-gcp", "server-aws"]
# Support for sync to a server
server-sync = ["encryption", "dep:ureq", "dep:url"]
# Support for sync to GCP
server-gcp = ["cloud", "encryption", "dep:google-cloud-storage", "dep:tokio"]
# Support for sync to AWS
server-aws = ["cloud", "encryption", "dep:aws-sdk-s3", "dep:aws-config", "dep:aws-credential-types", "dep:tokio"]
# (private) Support for sync protocol encryption
encryption = ["dep:ring"]
# (private) Generic support for cloud sync
cloud = []
# static bundling of dependencies
bundled = ["rusqlite/bundled"]
# use native CA roots, instead of bundled
tls-native-roots = ["ureq/native-certs"]

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

# All Rust dependencies are defined here, and then referenced by the
# Cargo.toml's in the members with `foo.workspace = true`.
[workspace.dependencies]
[dependencies]
anyhow = "1.0"
aws-sdk-s3 = "1"
aws-config = { version = "1", features = ["behavior-version-latest"] }
aws-credential-types = { version = "1", features = ["hardcoded-credentials"] }
aws-sdk-s3 = { version = "1", optional = true }
aws-config = { version = "1", features = ["behavior-version-latest"], optional = true }
aws-credential-types = { version = "1", features = ["hardcoded-credentials"], optional = true }
byteorder = "1.5"
chrono = { version = "^0.4.38", features = ["serde"] }
ffizz-header = "0.5"
flate2 = "1"
google-cloud-storage = { version = "0.15.0", default-features = false, features = ["rustls-tls", "auth"] }
google-cloud-storage = { version = "0.15.0", default-features = false, features = ["rustls-tls", "auth"], optional = true }
log = "^0.4.17"
pretty_assertions = "1"
proptest = "^1.5.0"
regex = "^1.11.0"
ring = "0.17"
rstest = "0.17"
ring = { version = "0.17", optional = true }
rusqlite = { version = "0.29"}
serde_json = "^1.0"
serde = { version = "^1.0.147", features = ["derive"] }
strum = "0.25"
strum_macros = "0.25"
tempfile = "3"
tokio = { version = "1", features = ["rt-multi-thread"] }
tokio = { version = "1", features = ["rt-multi-thread"], optional = true }
thiserror = "1.0"
ureq = { version = "^2.12.0", features = ["tls"] }
ureq = { version = "^2.12.0", features = ["tls"], optional = true }
uuid = { version = "^1.11.0", features = ["serde", "v4"] }
url = { version = "2" }
url = { version = "2", optional = true }

[dev-dependencies]
proptest = "^1.5.0"
tempfile = "3"
rstest = "0.17"
pretty_assertions = "1"
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
72 changes: 0 additions & 72 deletions taskchampion/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,72 +0,0 @@
[package]
name = "taskchampion"
version = "1.0.0-pre"
authors = ["Dustin J. Mitchell <[email protected]>"]
description = "Personal task-tracking"
homepage = "https://gothenburgbitfactory.github.io/taskchampion/"
documentation = "https://docs.rs/crate/taskchampion"
repository = "https://github.com/GothenburgBitFactory/taskchampion"
readme = "src/crate-doc.md"
license = "MIT"
edition = "2021"
rust-version = "1.78.0"

[features]
default = ["sync", "bundled"]

# Support for all sync solutions
sync = ["server-sync", "server-gcp", "server-aws"]
# Support for sync to a server
server-sync = ["encryption", "dep:ureq", "dep:url"]
# Support for sync to GCP
server-gcp = ["cloud", "encryption", "dep:google-cloud-storage", "dep:tokio"]
# Support for sync to AWS
server-aws = ["cloud", "encryption", "dep:aws-sdk-s3", "dep:aws-config", "dep:aws-credential-types", "dep:tokio"]
# (private) Support for sync protocol encryption
encryption = ["dep:ring"]
# (private) Generic support for cloud sync
cloud = []
# static bundling of dependencies
bundled = ["rusqlite/bundled"]
# use native CA roots, instead of bundled
tls-native-roots = ["ureq/native-certs"]

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

[dependencies]
anyhow.workspace = true
aws-config.workspace = true
aws-credential-types.workspace = true
aws-sdk-s3.workspace = true
byteorder.workspace = true
chrono.workspace = true
flate2.workspace = true
google-cloud-storage.workspace = true
log.workspace = true
ring.workspace = true
rusqlite.workspace = true
serde_json.workspace = true
serde.workspace = true
strum_macros.workspace = true
strum.workspace = true
thiserror.workspace = true
tokio.workspace = true
ureq.workspace = true
url.workspace = true
uuid.workspace = true

aws-config.optional = true
aws-credential-types.optional = true
aws-sdk-s3.optional = true
google-cloud-storage.optional = true
ring.optional = true
tokio.optional = true
ureq.optional = true
url.optional = true

[dev-dependencies]
proptest.workspace = true
tempfile.workspace = true
rstest.workspace = true
pretty_assertions.workspace = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ edition = "2021"
publish = false

[dependencies]
anyhow.workspace = true
regex.workspace = true
anyhow = "1.0"
regex = "^1.11.0"

0 comments on commit b16a558

Please sign in to comment.