8000 GitHub - gyng/rust-primer: Rust one-day crash workshop: a taste of Rust
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gyng/rust-primer

Repository files navigation

marp
true

rust-primer

A taste of Rust

2021—2023

Nothing to something in $\approx$ 1 or 2 days


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-
8000
primer

or

GitHub Codespace: Click the green Code button at the top right > Codespace > Create


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 sidecar

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
  • An environment 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
  • Use the tools you would use for real (= no web toy examples!)

Non-objectives

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

It's okay to come out of this without 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

About

Rust one-day crash workshop: a taste of Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0