Skip to content

stojanov-igor/rust-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

370 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust-examples

Basic examples in Rust Programming language

For learning purposes only

Commands

  • Create new project
cargo new <project name>
  • Build project:
cargo build <project name>

Cargo has two main profiles: the dev profile Cargo uses when you run cargo build and the release profile Cargo uses when you run cargo build --release.

  • Run project:
cargo run <project name>
  • Test project:
cargo test
  • Format project:
cargo fmt
  • See dependancy tree:
cargo tree
  • Fix warnings:
cargo fix
  • Create documentation:
cargo doc

To open documentation use cargo doc --open

  • Install Cargo.io packages:
cargo install <name of package>

All binaries installed with cargo install are stored in the installation root’s bin folder at $HOME/.cargo/bin. If the project has no binaries, it has to be added as dependany at Cargo.toml

About

Rust examples based on the Rust Book

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors