Rust: Difference between revisions

From bibbleWiki
Jump to navigation Jump to search
Created page with "= Sample program = <syntaxhighlight lang="rust"> fn main() { println!("Hello, world!"); } </syntaxhighlight> = Cargo = == Sample file == <syntaxhighlight lang="toml">..."
 
Line 19: Line 19:


== Sample commands ==
== Sample commands ==
cargo new hello_world --bin
  cargo build
  cargo build
  cargo run
  cargo run

Revision as of 02:12, 22 June 2020

Sample program

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

Cargo

Sample file

[package]
name = "hello_world"
version = "0.0.1"
authors = [ "Iain Wiseman iwiseman@bibble.co.nz" ]

Sample commands

cargo new hello_world --bin
cargo build
cargo run