Giter Site home page Giter Site logo

rust-primer's Introduction

marp
true

rust-primer

A taste of Rust

2021

$\approx$ 3โ€“4 hours


git clone https://github.com/gyng/rust-primer.git

or

https://github.com/gyng/rust-primer/archive/refs/heads/main.zip

or

https://gitpod.io#https://github.com/gyng/rust-primer

Rust

Rust has been voted the "most loved programming language" in the Stack Overflow Developer Survey every year since 2016.


Me

  • First line of Rust code in 2014
  • Intermediate (!) Rust programmer

Rust experience

A few small and medium-sized ($\lt$ 5K LoC) Rust programs in production


Bulk CSV data sanitizer

Count, parse, clean terrabytes of CSV

  • small 32-core server in an on-premise server
  • 50$\times$ speed up over (somewhat optimised) Python
  • 30$\times$ over PyPy

Kubernetes job monitor

Export logs, metrics, and artifacts

  • 14MB peak memory usage while streaming and uploading GB-sized ZIP files

Prerequisites

  • Internet access
  • Know how to program in some programming language
  • Able to git clone
  • A machine where you can install rust
  • Visual Studio Code preferred but not required

Objectives

Answer the question: Why should I try Rust?

  • Rust setup
  • A taste of Rust programming
  • Write a simple, semi-realistic program at the end

Non-objectives

  • Anything beyond the basics
  • A good understanding of using the basics of Rust

It's okay to not come out of this with a complete understanding of what happened!

It's about getting a first impression


Format

  • Topics in each subdirectory
  • Intro demo for each topic
  • Exercise for each topic
  • Solution for each topic provided

Topics

  • Setup
  • Basic syntax
  • Structs and exposure to lifetimes
  • Generics and traits
  • Option, Result, enums, and pattern matching
  • Strings
  • External libraries
  • A taste of async
  • Towards production

References and links

rust-primer's People

Contributors

gyng avatar jeraldgan avatar

Watchers

 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.