About 8,960,000 results
Open links in new tab
  1. rust - How to print coloured blocks to console? - Stack Overflow

    Aug 25, 2022 · I have come across the following code in Rust and was wondering how to replicate these coloured blocks into my own code. Is there a way to type down these blocks? Here is the code …

  2. How do I print colored text to the terminal in Rust?

    Nov 15, 2021 · How do I output colored text to the terminal using Rust? I've tried using the special escape characters that I found in this python answer, but they just print literally.

  3. How to clear the terminal screen in Rust after a new line is printed ...

    I have printed some text using println! and now I need to clear the terminal and write the new text instead of the old. How can I clear all the current text from terminal? I have tried this code, b...

  4. How to make a program that does not display the console window?

    Apr 21, 2015 · When the Rust binaries are linked with the GCC toolchain, to start a program without spawning a command line window we need to pass the -mwindows option to the linker. Cargo has a …

  5. Connecting to a RustDedicated server via Zerotier network, fails

    Feb 2, 2025 · When I try to connect via the ingame console using the Zerotier IP (that's the IP I get from sudo netstat -tuln | grep 28015. I also configured the Rust Dedicated Server to use this IP that is …

  6. io - How can I read user input in Rust? - Stack Overflow

    Nov 27, 2012 · In Rust 1.0 and later, you can use the lines method on anything that implements the std::io::BufRead trait to obtain an iterator over lines in the input. You could also use read_line , but …

  7. How to read an integer input from the user in Rust 1.0?

    May 20, 2015 · Existing answers I've found are all based on from_str (such as Reading in user input from console once efficiently), but apparently from_str (x) has changed into x.parse () in Rust 1.0.

  8. rust - How to clear console in Windows - Stack Overflow

    May 29, 2020 · I want to clear the console I tried using this, but it doesn't work for Windows print!("\\x1B[2J"); Is there an easy way to clear the console?

  9. rust - How to use the tracing library? - Stack Overflow

    Nov 18, 2021 · The tracing library itself does not display any output or write to any files. It is simply a facade that is designed to allow developers to fire events that are grouped into spans in an agnostic …

  10. Why doesn't println! work in Rust unit tests? - Stack Overflow

    This happens because Rust test programs hide the stdout of successful tests in order for the test output to be tidy. You can disable this behavior by passing the --nocapture option to the test binary or to …