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
I hope you're doing well. First, I want to show my appreciation for the incredible work you're doing here. I loved the material so much that I've recommend it as a curriculum to follow for anyone who (1) wants to learn Rust, or (2) learn how the computer works, or (3) familiarize themselves with some of the greatest ideas of computer science. So, thank you very much.
I have recently started mentoring young African developers and no surprise that I've recommended that we work through your curriculum 😄. I noticed though, very early into A Freestanding Rust Binary that truncating some of the errors could cause the student to derive the wrong comprehension. Here's what happened, after reading The no_std Attribute section, they compiled and run their code, and saw the same error as predicted:
error: cannot find macro `println!` in this scope
--> src/main.rs:4:5
|
4 | println!("Hello, world!");
| ^^^^^^^
Unfortunately, given that in the text they had only seen a section of the errors (specifically what's above), they ignored the remaining two. When they removed println!("Hello, world!") and still couldn't compile, they saw the two error related to the panic handler and eh_personality as net new, as in, these errors weren't there when we had println!. They thought that the new errors were caused by removing the println! statement. This isn't true, and it was relatively easy to prove to them: restore println! and review the full compilation error message.
I wanted to check with you if you'd be open to expanding the section a little bit to (1) include all the errors from cargo build since there isn't much anyways, and (2) re-organize the text a little bit so that the errors related to the panic handler and eh_personality language item are tied to no_std? The material remains great without these modifications so don't spend more time than necessary in reviewing this proposal 😄.
Take care!
PS full error message is given below:
error: cannot find macro `println` in this scope
--> src/main.rs:4:5
|
4 | println!("Hello, world!");
| ^^^^^^^
error: `#[panic_handler]` function required, but not found
error: language item required, but not found: `eh_personality`
|
= note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library
= help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config`
error: could not compile `blog_os` due to 3 previous errors
The text was updated successfully, but these errors were encountered:
Hello @phil-opp,
I hope you're doing well. First, I want to show my appreciation for the incredible work you're doing here. I loved the material so much that I've recommend it as a curriculum to follow for anyone who (1) wants to learn Rust, or (2) learn how the computer works, or (3) familiarize themselves with some of the greatest ideas of computer science. So, thank you very much.
I have recently started mentoring young African developers and no surprise that I've recommended that we work through your curriculum 😄. I noticed though, very early into A Freestanding Rust Binary that truncating some of the errors could cause the student to derive the wrong comprehension. Here's what happened, after reading The
no_std
Attribute section, they compiled and run their code, and saw the same error as predicted:Unfortunately, given that in the text they had only seen a section of the errors (specifically what's above), they ignored the remaining two. When they removed
println!("Hello, world!")
and still couldn't compile, they saw the two error related to the panic handler andeh_personality
as net new, as in, these errors weren't there when we hadprintln!
. They thought that the new errors were caused by removing theprintln!
statement. This isn't true, and it was relatively easy to prove to them: restoreprintln!
and review the full compilation error message.I wanted to check with you if you'd be open to expanding the section a little bit to (1) include all the errors from
cargo build
since there isn't much anyways, and (2) re-organize the text a little bit so that the errors related to the panic handler andeh_personality
language item are tied tono_std
? The material remains great without these modifications so don't spend more time than necessary in reviewing this proposal 😄.Take care!
PS full error message is given below:
The text was updated successfully, but these errors were encountered: