ITADN

branches dependency is dependent on std

#10Closedghost 创建于 2025-03-26
G
ghostcommented
Can't compile in a no_std environment with the newest version of rclite because the branches dependency appears to not be configured to be no_std. Output of cargo tree -e features: ``` ├── rclite feature "default" │ ├── rclite v0.2.6 │ │ └── branches feature "default" │ │ ├── branches v0.2.1 │ │ │ [build-dependencies] │ │ │ └── rustc_version feature "default" │ │ │ └── rustc_version v0.2.3 │ │ │ └── semver feature "default" │ │ │ └── semver v0.9.0 │ │ │ └── semver-parser feature "default" │ │ │ └── semver-parser v0.7.0 │ │ └── branches feature "std" │ │ └── branches v0.2.1 (*) │ └── rclite feature "usize-for-small-platforms" │ └── rclite v0.2.6 (*) ``` Seeing the following errors ``` error[E0463]: can't find crate for `std` | = note: the `thumbv7em-none-eabihf` target may not support the standard library = note: `std` is required by `branches` because it does not declare `#![no_std]` = help: consider building the standard library from source with `cargo build -Zbuild-std` error: cannot find macro `include_str` in this scope -->.../branches-0.2.1/src/lib.rs:2:10 | 2 | #![doc = include_str!("../README.md")] | ^^^^^^^^^^^ | help: consider importing this macro | 6 + use core::include_str; | error[E0463]: can't find crate for `std` --> .../branches-0.2.1/src/lib.rs:35:9 | 35 | std::process::abort(); | ^^^ can't find crate | = note: the `thumbv7em-none-eabihf` target may not support the standard library = help: consider building the standard library from source with `cargo build -Zbuild-std` error[E0308]: mismatched types --> ...branches-0.2.1/src/lib.rs:31:5 | 31 | / { 32 | | #[cfg(not(feature = "std"))] 33 | | unreachable!(); 34 | | #[cfg(feature = "std")] 35 | | std::process::abort(); 36 | | } | |_____^ expected `!`, found `()` | = note: expected type `!` found unit type `()` ```
关闭于 2025-03-27 2 条评论