Skip to content

laurelkeys/rust-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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

No packages published