Skip to content

laurelkeys/rust-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

111 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

rust-playground

Trying out this Rust thing... let's see how it goes ๐Ÿฆ€

book/

Notes on the book "The Rust Programming Language", together with code examples.

.
โ”‚
โ”œโ”€โ”€ ch02-guessing-game/...
โ”œโ”€โ”€ ch03-fibonacci/...
โ”œโ”€โ”€ ch08-mean-median-mode/...
โ”œโ”€โ”€ ch08-pig-latin/...
โ”œโ”€โ”€ ch12-grep/...
โ”œโ”€โ”€ ch14-add/...
โ”œโ”€โ”€ ch14-art/...
โ”œโ”€โ”€ ch15-cons-list/...
โ”œโ”€โ”€ ch15-mock-object/...
โ”œโ”€โ”€ ch15-weak-ref-tree/...
โ”œโ”€โ”€ ch16-concurrency/...
โ”œโ”€โ”€ ch17-blog/...
โ”œโ”€โ”€ ch17-gui/...
โ”œโ”€โ”€ ch19-hello-macro/...
โ”œโ”€โ”€ ch19-pancakes/...
โ”œโ”€โ”€ ch20-hello/...
โ”‚
โ””โ”€โ”€ notes.md            # complete book notes

clair/

Really simple command line app example, from the Rust CLI working group's book "Command Line Applications in Rust" (CLAiR).

.
โ””โ”€โ”€ grrs/               # super small grep clone ("grass")
    โ”œโ”€โ”€ src/
    โ”‚ย ย  โ”œโ”€โ”€ lib.rs      # find patterns in string content
    โ”‚ย ย  โ””โ”€โ”€ main.rs     # command line interface
    โ”œโ”€โ”€ tests/
    โ”‚ย ย  โ””โ”€โ”€ cli.rs      # integration tests
    โ””โ”€โ”€ Cargo.toml

crust/

Coding along Jon Gjengset's "Crust of Rust" video series.

.
โ”œโ”€โ”€ strsplit/
โ”‚   โ””โ”€โ”€ src/lib.rs      # "Crust of Rust: Lifetime Annotations"
โ”‚
โ”œโ”€โ”€ vecmac/
โ”‚   โ””โ”€โ”€ src/lib.rs      # "Crust of Rust: Declarative Macros"
โ”‚
โ”œโ”€โ”€ iterators/
โ”‚   โ””โ”€โ”€ src/lib.rs      # "Crust of Rust: Iterators"
โ”‚
โ”œโ”€โ”€ pointers/
โ”‚   โ””โ”€โ”€ src/            # "Crust of Rust: Smart Pointers and Interior Mutability"
โ”‚       โ”œโ”€โ”€ lib.rs
โ”‚       โ”œโ”€โ”€ cell.rs     # a mutable memory location
โ”‚       โ”œโ”€โ”€ refcell.rs  # a mutable memory location with dynamically checked borrow rules
โ”‚       โ””โ”€โ”€ rc.rs       # a single-threaded reference-counting pointer
โ”‚
โ”œโ”€โ”€ panama/
โ”‚   โ””โ”€โ”€ src/lib.rs      # "Crust of Rust: Channels"
โ”‚
โ”œโ”€โ”€ orst/
โ”‚   โ””โ”€โ”€ src/            # "Crust of Rust: Sorting Algorithms"
โ”‚       โ”œโ”€โ”€ lib.rs
โ”‚       โ”œโ”€โ”€ bubblesort.rs
โ”‚       โ”œโ”€โ”€ insertionsort.rs
โ”‚       โ”œโ”€โ”€ selectionsort.rs
โ”‚       โ”œโ”€โ”€ quicksort.rs
โ”‚       โ””โ”€โ”€ bin/
โ”‚           โ””โ”€โ”€ bench.rs
โ”‚
โ”œโ”€โ”€ strtok/
|   โ””โ”€โ”€ src/lib.rs      # "Crust of Rust: Subtyping and Variance"
โ”‚
โ”œโ”€โ”€ boks/
โ”‚   โ””โ”€โ”€ src/main.rs     # "Crust of Rust: The Drop Check"
โ”‚
โ””โ”€โ”€ atomics/
    โ””โ”€โ”€ src/main.rs     # "Crust of Rust: Atomics and Memory Ordering"

learn-wgpu/

Following the "Learn Wgpu" guide on using gfx-rs's wgpu library.

.
โ”œโ”€โ”€ src/
โ”‚ย ย  โ”œโ”€โ”€ main.rs         # main code, interacts with the core objects of WebGPU
โ”‚ย ย  โ”œโ”€โ”€ texture.rs      # creation of textures from images and of depth textures
โ”‚ย ย  โ””โ”€โ”€ shader.wgsl     # shader code, written in WGSL (WebGPU Shading Language)
โ””โ”€โ”€ Cargo.toml

lrtdw/

Following Cliff L. Biffle's unsafe-first approach to "Learn Rust the Dangerous Way" (LRtDW) series of articles.

.
โ”œโ”€โ”€ nbody-c/
โ”‚   โ””โ”€โ”€ main.c          # reference C code, unchanged
โ”‚
โ”œโ”€โ”€ nbody-rs/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚ย ย  โ””โ”€โ”€ main.rs     # Rust code, following LRtDW
โ”‚   โ””โ”€โ”€ Cargo.toml
โ”‚
โ”” make.py               # build script

lrwetmll/

Following "Learn Rust With Entirely Too Many Linked Lists" chapters.

.
โ””โ”€โ”€ lists/
    โ”œโ”€โ”€ src/
    โ”‚ย ย  โ”œโ”€โ”€ first.rs    # ch. 2, a bad singly-linked stack
    โ”‚ย ย  โ”œโ”€โ”€ second.rs   # ch. 3, an ok singly-linked stack
    โ”‚ย ย  โ”œโ”€โ”€ third.rs    # ch. 4, a persistent singly-linked stack
    โ”‚ย ย  โ”œโ”€โ”€ fourth.rs   # ch. 5, a bad but safe doubly-linked deque
    โ”‚ย ย  โ”œโ”€โ”€ fifth.rs    # ch. 6, an unsafe singly-linked queue
    โ”‚ย ย  โ””โ”€โ”€ lib.rs
    โ””โ”€โ”€ Cargo.toml

rusty-journal/

Implementation of Microsoft Learn's "Build a command-line to-do list program" module.

.
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ cli.rs          # command-line interface using structopt
โ”‚   โ””โ”€โ”€ main.rs
โ”‚   โ””โ”€โ”€ tasks.rs        # add, complete and list tasks using serde
โ””โ”€โ”€ Cargo.toml

wasm/

Implementation of Conway's Game of Life, following the Rust and WebAssembly working group's "Rust Wasm Book".

.
โ””โ”€โ”€ game-of-life/
    โ”œโ”€โ”€ src/            # Rust code with Wasm bindings
    โ”‚ย ย  โ”œโ”€โ”€ lib.rs
    โ”‚ย ย  โ””โ”€โ”€ utils.rs
    โ”œโ”€โ”€ www/            # JavaScript code using the generated WebAssembly
    โ”‚ย ย  โ”œโ”€โ”€ index.js
    โ”‚ย ย  โ”œโ”€โ”€ index.html
    โ”‚ย ย  โ”œโ”€โ”€ bootstrap.js
    โ”‚ย ย  โ”œโ”€โ”€ package.json
    โ”‚ย ย  โ””โ”€โ”€ webpack.config.js
    โ””โ”€โ”€ Cargo.toml

About

Learning experiments with Rust ๐Ÿฆ€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

โšก