Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 229 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 229 Bytes

Adv functions

  • calling function from other files

  • hello.rs:

pub fn helloworld() {
    println!("Hello, World!");
}
  • main.rs:
mod hello;

fn main() {
    hello::helloworld();
}
$ cargo run