-
Notifications
You must be signed in to change notification settings - Fork 58
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
Make use of workspace dependencies #692
Merged
ansasaki
merged 1 commit into
keylime:master
from
ueno:wip/dueno/workspace-dependencies
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,46 @@ | ||
[workspace] | ||
members = [ | ||
"keylime", | ||
"keylime-agent", | ||
"keylime-ima-emulator", | ||
] | ||
resolver = "2" | ||
|
||
members = ["keylime", "keylime-agent", "keylime-ima-emulator"] | ||
[workspace.package] | ||
authors = ["Keylime Authors"] | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
repository = "https://github.com/keylime/rust-keylime" | ||
version = "0.2.3" | ||
|
||
[workspace.dependencies] | ||
actix-rt = "2" | ||
actix-web = { version = "4", default-features = false, features = ["macros", "openssl"] } | ||
base64 = "0.21" | ||
cfg-if = "1" | ||
clap = { version = "4.3", features = ["derive"] } | ||
compress-tools = "0.12" | ||
config = { version = "0.13", default-features = false, features = ["toml"] } | ||
futures = "0.3.6" | ||
glob = "0.3" | ||
hex = "0.4" | ||
keylime = { version = "=0.2.3", path = "keylime" } | ||
libc = "0.2.43" | ||
log = "0.4" | ||
openssl = "0.10.15" | ||
pest = "2.6" | ||
pest_derive = "2.6" | ||
picky-asn1-der = "0.3.1" | ||
picky-asn1-x509 = "0.6.1" | ||
pretty_env_logger = "0.4" | ||
reqwest = {version = "0.11", default-features = false, features = ["json"]} | ||
serde = "1.0.80" | ||
serde_derive = "1.0.80" | ||
serde_json = { version = "1.0", features = ["raw_value"] } | ||
signal-hook = "0.3" | ||
static_assertions = "1" | ||
tempfile = "3.4.0" | ||
thiserror = "1.0" | ||
tokio = {version = "1.24", features = ["rt", "sync", "macros"]} | ||
tss-esapi = {version = "7.2.0", features = ["generate-bindings"]} | ||
uuid = {version = "1.3", features = ["v4"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
[package] | ||
name = "keylime_ima_emulator" | ||
version = "0.2.3" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
description = "IMA emulator for Keylime" | ||
authors.workspace = true | ||
edition.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
version.workspace = true | ||
|
||
[dependencies] | ||
clap = { version = "4.3", features = ["derive"] } | ||
hex = "0.4" | ||
keylime = { path = "../keylime" } | ||
log = "0.4" | ||
openssl = "0.10.15" | ||
signal-hook = "0.3" | ||
thiserror = "1.0" | ||
tss-esapi = {version = "7.2.0", features = ["generate-bindings"]} | ||
clap.workspace = true | ||
hex.workspace = true | ||
keylime.workspace = true | ||
log.workspace = true | ||
openssl.workspace = true | ||
signal-hook.workspace = true | ||
thiserror.workspace = true | ||
tss-esapi.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
[package] | ||
name = "keylime" | ||
version = "0.2.3" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
description = "Shared utilities for Keylime crates" | ||
authors.workspace = true | ||
edition.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
version.workspace = true | ||
|
||
[dependencies] | ||
base64 = "0.21" | ||
hex = "0.4" | ||
log = "0.4" | ||
openssl = "0.10.15" | ||
pest = "2.6" | ||
pest_derive = "2.6" | ||
serde = "1.0.80" | ||
serde_derive = "1.0.80" | ||
static_assertions = "1" | ||
thiserror = "1.0" | ||
tss-esapi = {version = "7.2.0", features = ["generate-bindings"]} | ||
base64.workspace = true | ||
hex.workspace = true | ||
log.workspace = true | ||
openssl.workspace = true | ||
pest.workspace = true | ||
pest_derive.workspace = true | ||
serde.workspace = true | ||
serde_derive.workspace = true | ||
static_assertions.workspace = true | ||
thiserror.workspace = true | ||
tss-esapi.workspace = true | ||
|
||
[dev-dependencies] | ||
tempfile = "3.0.4" | ||
tempfile.workspace = true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why zmq and wiremock are out of the inheritance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because they are used only in
keylime-agent
, not shared with the other parts (keylime
andkeylime-ima-emulator
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason behind this is that the top-level workspace.dependencies can't include optional dependencies, as described at https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ueno I can be confused here, so bare with me. But IIUC this is valid:
zmq = {workspace = ture, optional = true}
See for example https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace
You are right that we cannot do this in the top level, in
[workspace.dependencies]
, where all the dependencies are listed, but I am not sure how relevant is that. For example, if a consequence of doing this is that during vendoring the optional crates will always be included.