Skip to content

danherrera/guessing-game-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning Rust: Guessing Game

What I Learned

Documentation

Rust's documentation is pretty amazing. Very easy to read. In fact, this tutorial came from the documentation!

Build System

Rust uses Cargo to build and manage dependencies. Rust's dependencies are called "crates" and the preferred open source "repository" (formally known as "registry" in the Rust community) is crates.io.

To start a new project, execute:

cargo new project_name --bin

Within the project_name directory a Cargo.toml file will be generated. As an Android developer, I relate this file as the build.gradle in an Android project, as it is where one defines dependencies.

To build the project, execute:

cargo build

To run the project, execute:

cargo run

I was impressed by the comprehensive warnings the rust compiler demonstrated.

Language Features

Based on this tutorial, I find a lot of similarities with Kotlin (immutability, inferred type, and pattern matching).

Questions

How do unit tests work in Rust?

TODO

About

First exposure to the Rust programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages