Skip to content

Rust practice problems

Rust
Difficulty:
Category:
Tag:

Showing 50 of 342

Status Title Difficulty
Adding context without anyhow Hard
A generic Stack, and conditional impl blocks Medium
A logical-time reactor: timers without a clock Hard
A macro-generated FFI binding layer Hard
A mini DSL: compile-time expression evaluation Hard
any, all, find, position: audit a list of records Easy
Arc gives you sharing, not mutability Easy
Arc: shared ownership across threads Easy
Arrays: the length is part of the type Easy
A single-producer single-consumer ring buffer Hard
AsRef, Borrow, and signatures your callers can actually use Medium
Associated type or generic parameter? Hard
A store-buffer memory-model interpreter Hard
Async recursion, async closures, and streams Hard
Atomics: counters, flags and fetch_* Medium
Auto-vectorisation and why floating-point addition blocks it Hard
Bake-off: the same tree, an arena and an `Rc` graph Hard
Balanced ranges: the arithmetic before the threads Easy
Barrier: keeping workers in lock step Medium
BinaryHeap is a max-heap, and Reverse is the fix Medium
Binding with @, and what or-patterns demand of bindings Medium
Blanket impls, and why you can never carve out an exception Hard
`block_on`: the smallest thing that can run a future Easy
bool and char Easy
Borrowing through Option Medium
Borrow it or own it: your first lifetime decision Easy
Bounds checks: when they cost, and five safe ways to remove them Hard
Box<dyn Trait>: trait objects, DSTs and dynamic dispatch Medium
Boxed errors and downcasting Medium
BTreeMap range queries Medium
Build a spinlock from AtomicBool and UnsafeCell Hard
Build `Cell<T>` and `RefCell<T>` from scratch Hard
Building std's macros: vec!, matches!, a HashMap literal Medium
Build Rc<T> and RefCell<T> from scratch Hard
Build your own #[test]: catching panics deterministically Hard
Callbacks and TT bundling Hard
Calling C from Rust: libc is already linked Medium
Cancellation is just: stop polling and drop Medium
Cancel safety, blocking, and locks across `.await` Hard
Capacity and pre-sizing, graded Easy
Capstone: a fully-typed fallible parser Hard
Capstone: an async executor with a logical-time reactor Hard
Capstone: an ownership-only job scheduler Hard
Capstone: audit and repair an unsound abstraction Hard
Capstone: build a thread pool Hard
Cargo features and the additivity rule Hard
Case-insensitive search without allocating Easy
CAS loops: compare_exchange and fetch_update Hard
Casting with as: truncation, sign reinterpretation, saturation Medium
`Cell<T>`: mutation by moving values in and out Medium