Hi Friends.
I'm learning Rust from the online Rust book to write a compiler. Anyways I can't seem to get CTRL-C to work correctly to end the program and close the loop, as per the instructions in the book.
The relevant chapter: Control Flow - The Rust Programming Language
The Relevant code:
fn main() {
loop {
println!("again!");
}
}
I'm running cargo run
it compiles, and runs, and just loops.
I'm running on an M2 MAX Macintosh.
Anyways I'd love to know what I can do to make this work properly. I'll even submit a PR to the book to change the chapter to reflect how to use CTRL-C.
Thanks new friends!
-kow
3 posts - 3 participants