Skip to content

Commit

Permalink
[refactor] #3422: Move the vendored feature from iroha_crypto to …
Browse files Browse the repository at this point in the history
…`iroha_client_cli`

First of all, it is misplaced there, as iroha_crypto does not depend on openssl

Also, it is unnecessary for the build of iroha itself (iroha_cli also does not depend on openssl)

The only thing that is built with musl libc AND depends on openssl is `iroha_client_cli`, so move the feature and the dependency there

Signed-off-by: Nikita Strygin <[email protected]>
  • Loading branch information
DCNick3 committed Nov 14, 2023
1 parent eb230c3 commit e1a8dac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions client_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ is-it-maintained-issue-resolution = { repository = "https://github.com/hyperledg
is-it-maintained-open-issues = { repository = "https://github.com/hyperledger/iroha" }
maintenance = { status = "actively-developed" }

[features]
vendored = [
"dep:openssl-sys"
]

[dependencies]
iroha_client = { workspace = true }
iroha_data_model = { workspace = true }
Expand All @@ -38,6 +43,10 @@ once_cell = { workspace = true }
serde_json = { workspace = true }
erased-serde = "0.3.31"

# this is needed to make it compile with musl
# enable `vendored` feature for this
openssl-sys = { version = "0.9.95", optional = true, features = ["vendored"] }

[build-dependencies]
vergen = { version = "8.2.5", default-features = false }
color-eyre = "0.6.2"
7 changes: 1 addition & 6 deletions crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ std = [
"dep:thiserror",
"displaydoc/std",
]
# Force static linking
vendored = ["dep:openssl-sys"]
# Replace structures and methods with FFI equivalents to facilitate dynamic linkage (mainly used in smartcontracts)
#ffi_import = ["iroha_ffi", "iroha_primitives/ffi_import"]

Expand All @@ -55,9 +53,6 @@ parity-scale-codec = { workspace = true, features = ["derive", "full"] }
serde = { workspace = true, features = ["derive"] }
serde_with = { workspace = true, features = ["macros"] }
hex = { workspace = true, features = ["alloc", "serde"] }
# TODO: iroha_crypto no longer depends on openssl (did it ever?)
# currently it's being used by iroha_client through attohttpc and iroha_cli through warp's tokeio-tunstenite
openssl-sys = { version = "0.9.93", features = ["vendored"], optional = true }
getset = { workspace = true }

thiserror = { version = "1.0.50", optional = true }
Expand Down Expand Up @@ -96,4 +91,4 @@ serde_json = { workspace = true }
# but to test some of the primitives against them
secp256k1 = { version = "0.28.0", features = ["rand", "serde"] }
libsodium-sys-stable = "1.20.3"
openssl = "0.10.59"
openssl = { version = "0.10.59", features = ["vendored"] }

0 comments on commit e1a8dac

Please sign in to comment.