Giter Site home page Giter Site logo

no_std compilation about rust-mbedtls HOT 5 CLOSED

fortanix avatar fortanix commented on August 10, 2024
no_std compilation

from rust-mbedtls.

Comments (5)

jethrogb avatar jethrogb commented on August 10, 2024

Hmm this is probably a failure of our CI to catch this. I see yasna went from an optional dependency to a required dependency a few weeks ago in 186268c. @jack-fortanix any comment?

Dev dependencies should be compiled for your host, so I'm not sure what's going on there.

from rust-mbedtls.

MabezDev avatar MabezDev commented on August 10, 2024
$ cargo tree --no-default-features --features core_io --target=thumbv7m-none-eabi

mbedtls v0.4.0 (/home/mabez/development/rust/embedded/util/rust-mbedtls/mbedtls)
├── bitflags v1.1.0
├── byteorder v1.3.2
├── chrono v0.4.7
│   ├── libc v0.2.60
│   ├── num-integer v0.1.41
│   │   └── num-traits v0.2.8
│   │       [build-dependencies]
│   │       └── autocfg v0.1.6
│   │   [build-dependencies]
│   │   └── autocfg v0.1.6 (*)
│   ├── num-traits v0.2.8 (*)
│   └── time v0.1.42
│       └── libc v0.2.60 (*)
│       [dev-dependencies]
│       └── winapi v0.3.7
├── core_io v0.1.20190701
│   [build-dependencies]
│   └── rustc_version v0.1.7
│       └── semver v0.1.20
├── mbedtls-sys-auto v2.18.0 (/home/mabez/development/rust/embedded/util/rust-mbedtls/mbedtls-sys)
│   [build-dependencies]
│   ├── bindgen v0.19.1
│   │   ├── cexpr v0.2.3
│   │   │   └── nom v3.2.1
│   │   │       └── memchr v1.0.2
│   │   │           └── libc v0.2.60 (*)
│   │   ├── clang-sys v0.11.1
│   │   │   ├── bitflags v0.7.0
│   │   │   ├── glob v0.2.11
│   │   │   └── libc v0.2.60 (*)
│   │   │   [build-dependencies]
│   │   │   └── glob v0.2.11 (*)
│   │   ├── docopt v0.6.86
│   │   │   ├── lazy_static v0.2.11
│   │   │   ├── regex v0.1.80
│   │   │   │   ├── aho-corasick v0.5.3
│   │   │   │   │   └── memchr v0.1.11
│   │   │   │   │       └── libc v0.2.60 (*)
│   │   │   │   ├── memchr v0.1.11 (*)
│   │   │   │   ├── regex-syntax v0.3.9
│   │   │   │   ├── thread_local v0.2.7
│   │   │   │   │   └── thread-id v2.0.0
│   │   │   │   │       ├── kernel32-sys v0.2.2
│   │   │   │   │       │   └── winapi v0.2.8
│   │   │   │   │       │   [build-dependencies]
│   │   │   │   │       │   └── winapi-build v0.1.1
│   │   │   │   │       └── libc v0.2.60 (*)
│   │   │   │   └── utf8-ranges v0.1.3
│   │   │   ├── rustc-serialize v0.3.24
│   │   │   └── strsim v0.5.2
│   │   ├── env_logger v0.3.5
│   │   │   ├── log v0.3.9
│   │   │   │   └── log v0.4.7
│   │   │   │       └── cfg-if v0.1.9
│   │   │   └── regex v0.1.80 (*)
│   │   ├── libc v0.2.60 (*)
│   │   ├── log v0.3.9 (*)
│   │   ├── rustc-serialize v0.3.24 (*)
│   │   └── syntex_syntax v0.38.0
│   │       ├── bitflags v0.5.0
│   │       ├── libc v0.2.60 (*)
│   │       ├── log v0.3.9 (*)
│   │       ├── rustc-serialize v0.3.24 (*)
│   │       ├── syntex_errors v0.38.0
│   │       │   ├── libc v0.2.60 (*)
│   │       │   ├── log v0.3.9 (*)
│   │       │   ├── rustc-serialize v0.3.24 (*)
│   │       │   ├── syntex_pos v0.38.0
│   │       │   │   └── rustc-serialize v0.3.24 (*)
│   │       │   ├── term v0.4.6
│   │       │   └── unicode-xid v0.0.3
│   │       ├── syntex_pos v0.38.0 (*)
│   │       ├── term v0.4.6 (*)
│   │       └── unicode-xid v0.0.3 (*)
│   └── cmake v0.1.40
│       └── cc v1.0.37
└── serde v1.0.97
    └── serde_derive v1.0.97
        ├── proc-macro2 v0.4.30
        │   └── unicode-xid v0.1.0
        ├── quote v0.6.13
        │   └── proc-macro2 v0.4.30 (*)
        └── syn v0.15.39
            ├── proc-macro2 v0.4.30 (*)
            ├── quote v0.6.13 (*)
            └── unicode-xid v0.1.0 (*)
    [dev-dependencies]
    └── serde_derive v1.0.97 (*)
[build-dependencies]
└── cc v1.0.37 (*)
[dev-dependencies]
├── hex v0.3.2
├── libc v0.2.60 (*)
├── rand v0.4.6
└── serde_cbor v0.6.1
    ├── byteorder v1.3.2 (*)
    ├── serde v1.0.97 (*)
    └── serde_bytes v0.10.5
        └── serde v1.0.97 (*)

Firstly, I'm not sure how chrono is getting pulled in, as the only feature enabled is core_io. Secondly I think I am running into the cargo issue I linked in my first post, byte-order is pulled in by mbedtls, with default-features = false but in the dev-deps serde_cbor is also using byteorder but with std features. Cargo seems to assume they are the same crate and use the std enabled one in mbedtls

from rust-mbedtls.

jack-fortanix avatar jack-fortanix commented on August 10, 2024

Re yasna, we need the extensions parsing internally, but could gate use of yasna behind std. I'll open a PR

from rust-mbedtls.

jack-fortanix avatar jack-fortanix commented on August 10, 2024

Re chrono it is a hard dep since 9d82ad1 but shouldn't be - I think we only use it with custom_gmtime_r feature so it should only be pulled in then. @Goirad

from rust-mbedtls.

MabezDev avatar MabezDev commented on August 10, 2024

With resolver = "2" these issues should be fixed. Closing.

from rust-mbedtls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.