/rust-examples

Basic examples from Tutorials and Blog posts

Primary LanguageRust

Rust Examples : Examples from different tutorials and blogs

This repository contains some of the Rust-lang examples for understanding some of the language provided concepts and to get familiar with syntax.

Setup

  • Install rust on osx using homebrew:
brew install rust

or Install using rustup:

curl https://sh.rustup.rs -sSf | sh

Execution

  • Run below command from console to compile
rustc hello.rs
./hello
  • Run below for test cases
rustc --test testing/simple_test.rs
./simple_test