Rust errors / Names, paths and imports
Rust compiler error · checked with rustc 1.99.0
Rust error E0601: no `main` function was found in a binary crate
What it meansNo main function was found in a binary crate.
The compiler team's explanation
No main function was found in a binary crate.
To fix this error, add a main function:
fn main() {
// Your program will start here.
println!("Hello world!");
}
If you don't know the basics of Rust, you can look at the Rust Book to get started.
From rustc --explain E0601 (1.99.0), part of the Rust project, MIT or Apache-2.0. Official page.
Related errors
Up next
Often hit nextE0425: cannot find value in this scopeA related error from the same family.Read it next →Did this answer your question?