Hello world program compilation exits with stream did not contain valid UTF-8

Viewed 413

error: couldn't read main.rs: stream did not contain valid UTF-8

fn main(){
    println!("Hello,World!");
}

copy paste from the docs, for some reason doesn't run. tried an empty main function as below but that didn't work either

fn main(){
}

what does the error mean when there's no string involved?

1 Answers

Try these steps,

$ cargo new hello
$ cd hello
$ cargo check
$ cargo run

and must install visual studio build tools.

Related