Println in core library and fast compile

Hi, I'm new to Rust and try print variables from library/core/src/slice/ I have two questions;

  1. How to do this? println!/debug!/dbg! don't seem to work.
  2. How to get a working compiler fast? I tried ./ --stage 0 etc. but it is still very slow.
1 Like

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:

  1. setup, then choose library
  2. build -j22 finished in 13 seconds after an edit.

Use 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