Skip to content

Commit

Permalink
Merge pull request #192 from alan-turing-institute/174-update-deps-re…
Browse files Browse the repository at this point in the history
…structure

Remove unused deps, autoinherit and restructure (#174)
  • Loading branch information
sgreenbury authored Jan 20, 2025
2 parents 4c25cf1 + 74d6d15 commit 32b9716
Show file tree
Hide file tree
Showing 91 changed files with 246 additions and 251 deletions.
73 changes: 59 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,67 @@ description = "Trustchain decentralised PKI reference implementation."
homepage = "https://alan-turing-institute.github.io/trustchain/"
repository = "https://github.com/alan-turing-institute/trustchain/"
keywords = ["pki", "did", "vc", "vp"]
edition = "2021"
edition = "2021"

[workspace]
members = [
"trustchain-core",
"trustchain-ion",
"trustchain-http",
"trustchain-api",
"trustchain-cli",
"trustchain-ffi"
]
members = ["crates/*"]
resolver = "2"

[workspace.dependencies]
anyhow = "1.0"
async-trait = "0.1"
axum = "0.6"
axum-server = "0.5.1"
axum-test-helper = "0.2.0"
bip39 = "2.0.0"
bitcoin = "0.29.2"
bitcoincore-rpc = "0.16.0"
chrono = "0.4.26"
clap = "4.0.32"
did-ion = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" }
did-method-key = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" }
ed25519-dalek-bip32 = "0.3.0"
flate2 = "1.0.24"
flutter_rust_bridge = "=1.64.0"
futures = "0.3.28"
glob = "0.3"
hex = "0.4.3"
hyper = "0.14.26"
image = "0.23.14"
ipfs-api-backend-hyper = "0.6"
ipfs-hasher = "0.13.0"
is_empty = "0.2.0"
itertools = "0.13.0"
josekit = "0.8"
k256 = "0.13.1"
lazy_static = "1.4.0"
log = "0.4"
mockall = "0.11.4"
mongodb = "2.3.1"
petgraph = "0.6"
ps_sig = { git = "https://github.com/alan-turing-institute/RSS.git", rev = "ec9386e125d87c5f54898b34fbe0883b3b36ffd4" }
qrcode = "0.12.0"
rand = "0.8"
reqwest = "0.11.16"
secp256k1 = "0.27.0"
serde = "1.0"
serde_jcs = "0.1.0"
serde_json = "1.0"
serde_with = "3.4.0"
sha2 = "0.10.7"
shellexpand = "3.1.0"
ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" }
tempfile = "3.9.0"
thiserror = "1.0"
tokio = "1.20.1"
toml = "0.7.2"
tower = "0.4"
tracing = "0.1"
tracing-subscriber = "0.3"

[dependencies]
trustchain-api = { path = "./trustchain-api", version = "0.1.0"}
trustchain-core = { path = "./trustchain-core", version = "0.2.0"}
trustchain-ffi = { path = "./trustchain-ffi", version = "0.1.0"}
trustchain-http = { path = "./trustchain-http", version = "0.1.0"}
trustchain-ion = { path = "./trustchain-ion", version = "0.2.0"}
trustchain-api = { path = "crates/trustchain-api", version = "0.1.0" }
trustchain-core = { path = "crates/trustchain-core", version = "0.2.0" }
trustchain-ffi = { path = "crates/trustchain-ffi", version = "0.1.0" }
trustchain-http = { path = "crates/trustchain-http", version = "0.1.0" }
trustchain-ion = { path = "crates/trustchain-ion", version = "0.2.0" }
22 changes: 22 additions & 0 deletions crates/trustchain-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "trustchain-api"
version = "0.1.0"
authors = ["Trustchain Devs"]
edition = "2021"

[dependencies]

async-trait = { workspace = true }
chrono = { workspace = true }
did-ion = { workspace = true }
futures = { workspace = true }
hex = { workspace = true }
ps_sig = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true }
ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] }
trustchain-core = { path = "../trustchain-core" }
trustchain-ion = { path = "../trustchain-ion" }

[dev-dependencies]
tokio = { workspace = true, features = ["full"] }
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions crates/trustchain-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "trustchain-cli"
version = "0.1.0"
authors = ["Trustchain Devs"]
edition = "2021"

[[bin]]
name = "trustchain-cli"
path = "src/bin/main.rs"

[dependencies]

clap = { workspace = true, features = ["derive", "cargo"] }
lazy_static = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] }
tokio = { workspace = true, features = ["full"] }
toml = { workspace = true }
trustchain-api = { path = "../trustchain-api" }
trustchain-core = { path = "../trustchain-core" }
trustchain-http = { path = "../trustchain-http" }
trustchain-ion = { path = "../trustchain-ion" }
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions crates/trustchain-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "trustchain-core"
version = "0.2.0"
authors = ["Trustchain Devs"]
edition = "2021"

[dependencies]
async-trait = { workspace = true }
base64 = "0.13"
did-method-key = { workspace = true }
petgraph = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_jcs = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true }
ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] }
tempfile = { workspace = true }
thiserror = { workspace = true }

[dev-dependencies]
mockall = { workspace = true }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ mod tests {
fn test_display() -> Result<(), GraphError> {
let chains = vec![test_chain(), test_chain()];
let graph = TrustchainGraph::new(&chains, DEFAULT_LABEL_WIDTH)?;
format!("{}", graph);
let _ = format!("{}", graph);
Ok(())
}
}
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.
28 changes: 28 additions & 0 deletions crates/trustchain-ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "trustchain-ffi"
version = "0.1.0"
authors = ["Trustchain Devs"]
edition = "2021"

[lib]
crate-type = ["cdylib", "staticlib", "lib"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

anyhow = { workspace = true }
chrono = { workspace = true }
did-ion = { workspace = true }
# Fixed to same version used to generate bridge: `[email protected]`
flutter_rust_bridge = { workspace = true }
lazy_static = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread"] }
toml = { workspace = true }
trustchain-api = { path = "../trustchain-api" }
trustchain-core = { path = "../trustchain-core" }
trustchain-http = { path = "../trustchain-http" }
trustchain-ion = { path = "../trustchain-ion" }
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.
47 changes: 47 additions & 0 deletions crates/trustchain-http/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[package]
name = "trustchain-http"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "trustchain-http"
path = "src/bin/main.rs"

[dependencies]

async-trait = { workspace = true }
axum = { workspace = true }
axum-server = { workspace = true, features = ["tls-rustls"] }
base64 = "0.21.0"
chrono = { workspace = true }
did-ion = { workspace = true }
hyper = { workspace = true }
image = { workspace = true }
is_empty = { workspace = true }
josekit = { workspace = true }
lazy_static = { workspace = true }
log = { workspace = true }
qrcode = { workspace = true }
rand = { workspace = true }
reqwest = { workspace = true, features = ["stream"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde_with = { workspace = true }
shellexpand = { workspace = true }
ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }
toml = { workspace = true }
tower = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
trustchain-api = { path = "../trustchain-api" }
trustchain-core = { path = "../trustchain-core" }
trustchain-ion = { path = "../trustchain-ion" }

[dev-dependencies]
axum-test-helper = { workspace = true }
itertools = { workspace = true }
mockall = { workspace = true }
tempfile = { workspace = true }
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.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"y": "z737jJY7kxW_lpE1eZur-9n9_HUEGFyBGsTdChzI4Kg",
"d": "CfdUwQ-CcBQkWpIDPjhSJAq2SCg6hAGdcvLmCj0aA-c"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"requester_org": "myTrustworthyEntity",
"operator_name": "trustworthyOperator"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"requester_org": "myTrustworthyEntity",
"operator_name": "trustworthyOperator"
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 38 additions & 0 deletions crates/trustchain-ion/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[package]
name = "trustchain-ion"
version = "0.2.0"
authors = ["Trustchain Devs"]
edition = "2021"

[dependencies]
anyhow = { workspace = true }
async-trait = { workspace = true }
bip39 = { workspace = true }
bitcoin = { workspace = true }
bitcoincore-rpc = { workspace = true }
chrono = { workspace = true }
did-ion = { workspace = true }
ed25519-dalek-bip32 = { workspace = true }
flate2 = { workspace = true }
futures = { workspace = true }
hex = { workspace = true }
ipfs-api-backend-hyper = { workspace = true, features = ["with-send-sync"] }
ipfs-hasher = { workspace = true }
k256 = { workspace = true }
lazy_static = { workspace = true }
mongodb = { workspace = true }
reqwest = { workspace = true }
secp256k1 = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sha2 = { workspace = true }
ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }
toml = { workspace = true }
trustchain-core = { path = "../trustchain-core" }

[dev-dependencies]
glob = { workspace = true }
itertools = { workspace = true }
mockall = { workspace = true }
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.
4 changes: 2 additions & 2 deletions docs/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Where required, configurable variables within crates are managed according to th
### trustchain-cli
Install with:
```bash
cargo install --path trustchain-cli
cargo install --path crates/trustchain-cli
```


Expand Down Expand Up @@ -308,7 +308,7 @@ rsync -azvuv --prune-empty-dirs \
##### Running the HTTP server on the VM over https
- Go trustchain repo, install from branch you would like to serve:
```
cargo install --path trustchain-http
cargo install --path crates/trustchain-http
```
- Allow the binary to access 443 without sudo:
```
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ $ cargo build

Finally, we install the Trustchain command line interface (CLI):
```console
$ cargo install --path trustchain-cli
$ cargo install --path crates/trustchain-cli
```

!!! info "Trustchain HTTP server (this step is optional)"
Expand All @@ -100,7 +100,7 @@ $ cargo install --path trustchain-cli

To install the Trustchain HTTP server, run:
```console
$ cargo install --path trustchain-http
$ cargo install --path crates/trustchain-http
```

## Configuration
Expand Down
27 changes: 0 additions & 27 deletions trustchain-api/Cargo.toml

This file was deleted.

30 changes: 0 additions & 30 deletions trustchain-cli/Cargo.toml

This file was deleted.

Loading

0 comments on commit 32b9716

Please sign in to comment.