You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default std I added for mbedtls in dcap-ql is for avoiding the compiling error when compile the dcap-ql with only verify and with mbedtls specify with default-features = false in a crate e.g.:
[package]
name = "dcap-ql-fail"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
dcap-ql = { version = "0.3.6", default-features = false, features = ["verify"] }
mbedtls = { version = "0.9.0", default-features = false}
Because mbedtls needs at least one of std or no_std_deps features is defined.
Reason
After some research, the problem actually is from cargo. cargo will automatically include dev dependencies when running cargo build. Ref: rust-lang/cargo#4988
So cargo build -p dcap-ql --no-default-features --features verify will succeed since there is a dev dependency of mbedtls with default feature.
And if use cargo build -p dcap-ql --no-default-features --features verify -Z avoid-dev-deps to exclude dev dependencies , then I found some other dependencies also has this problem which cause compilation failed.
And seems current only way is:
For people who are using stable version numbers to cargo check MSRV (so can't use nightly), there is a dirty hacky workaround.
The default
std
I added formbedtls
indcap-ql
is for avoiding the compiling error when compile thedcap-ql
with onlyverify
and withmbedtls
specify withdefault-features = false
in a crate e.g.:Because
mbedtls
needs at least one ofstd
orno_std_deps
features is defined.Reason
After some research, the problem actually is from
cargo
.cargo
will automatically include dev dependencies when runningcargo build
. Ref: rust-lang/cargo#4988So
cargo build -p dcap-ql --no-default-features --features verify
will succeed since there is a dev dependency ofmbedtls
with default feature.And if use
cargo build -p dcap-ql --no-default-features --features verify -Z avoid-dev-deps
to exclude dev dependencies , then I found some other dependencies also has this problem which cause compilation failed.And seems current only way is:
Originally posted by @Taowyoo in #498 (comment)
The text was updated successfully, but these errors were encountered: