Giter VIP home page Giter VIP logo

rust-book-notes's Introduction

Rust Book Notes and sample code

What is this?

These are my notes from reading the Rust Book (2nd edition), including some sample code, as well as all exercise code.

Anything of interest?

So far, these are the areas of note:

Runnable exercises

  1. Temperature converter mini program written in rust view the code
    • This was the first recommended exercise in chapter 3
  2. Fibonacci program that returns nth fib number written in rust view the code
    • This was the second recommended exercise in chapter 3
  3. Twelve days of Christmas lyrics written in rust view the code
    • This was the third recommended exercise in chapter 3

Notes

  1. Notes on Ownership, borrowing, and references
    • Some personal notes to help retain material I'm reading. Not proofread or organized for that matter. May contain errors, but reflects my understanding of the material at the moment of writing

Appendices

How to run the exercises

  1. Install rust
  2. Run cargo new some_name --bin. This will create a folder named some_name which has the proper directory structure to hold the script that we will be downloading next.
    $ cargo new some_name --bin
    
  3. Either download one of the sample codes above and overwrite the main.rs file found in the previously created directory located at:
    some_name/src/main.rs
    or copy paste the file contents into the aforementioned main.rs file.
  4. Change into the directory of the some_name folder created earlier
    $ cd ./some_name
  5. Run cargo run. This should compile the downloaded code and download dependencies, as well as run the program after compilation
    $ cargo run
    

rust-book-notes's People

Contributors

flores-jacob avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.