Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! root as a binary(or executable) crate named learn_rust.
//! also, this binary can import learn_rust as library crate.
//! a binary crate itself cannot be imported from other crates
pub use lrk;
mod add; // can directly import not through lib.rs.
mod use_in_only_main; // define a module as binary crate root.

fn main() {
    println!("aa");
    println!("{}", lrk::add::add(1, 2));
    println!("{}", add::add(1, 2));
}