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
From lib.rs, I understand that a cfg no_std is required in order to enable no_std.
In order to enable this, I am trying to build using the command:
cargo +stable rustc -- --cfg no_std
But then the build fails.
❯ cargo +stable rustc -- --cfg no_std
Compiling proc-macro2 v1.0.79
Compiling autocfg v1.2.0
Compiling unicode-ident v1.0.12
Compiling syn v1.0.109
Compiling cfg-if v1.0.0
Compiling cargo-emit v0.2.1
Compiling indoc v1.0.9
Compiling convert_case v0.4.0
Compiling log v0.4.21
Compiling float-cmp v0.9.0
Compiling num-traits v0.2.18
Compiling integer_or_float v0.3.2 (/home/common/rustforembedded-ws/crates_nostd_stable/integer_or_float-0.3.2)
Compiling quote v1.0.35
Compiling derive_more v0.99.17
error[E0433]: failed to resolve: use of undeclared crate or module `std`
--> src/error/str_conv.rs:5:5
|
5 | use std::error::Error;
| ^^^ use of undeclared crate or module `std`
error[E0412]: cannot find type `String` in this scope
--> src/str_conv/ryu.rs:19:39
|
19 | pub(crate) fn _maybe_ryu(f: f_iof) -> String {
| ^^^^^^ not found in this scope
error[E0412]: cannot find type `String` in this scope
--> src/str_conv/mod.rs:16:31
|
16 | impl From<IntegerOrFloat> for String {
| ^^^^^^ not found in this scope
Some errors have detailed explanations: E0412, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `integer_or_float` (lib) due to 3 previous errors
The text was updated successfully, but these errors were encountered:
the-shank
changed the title
How to compile for no_std
compiling for no_stdApr 11, 2024
Hi, I cant seem to build the crate for
no_std
.From lib.rs, I understand that a cfg
no_std
is required in order to enableno_std
.In order to enable this, I am trying to build using the command:
But then the build fails.
The text was updated successfully, but these errors were encountered: