Hi, I'm new to Rust and try print variables from library/core/src/slice/sort.rs. I have two questions;
- How to do this? println!/debug!/dbg! don't seem to work.
- How to get a working compiler fast? I tried ./x.py --stage 0 etc. but it is still very slow.
printf works in core and alloc, format! only works in alloc. It seems the best way is to rip the code to be debugged out into a crate and use the usual println! there.
From an answer in Zulip:
x.py setup, then choose library
x.py build -j22 finished in 13 seconds after an edit.
std if you don’t need a freestanding binary. Don’t print variables or use native ways (bios api, for example) if you need a freestanding binary.
Also you’ve picked the wrong forum. You need URLO