Loading...

Master Rust.

Rust mastery exercises. Become your team's resident Rust expert.

Build your own Redis
FREE THIS MONTH
This challenge is free until 1 May 2024!
Build your own Redis

Discover concurrent programming in Rust while also learning about TCP servers, network programming, and the Redis Protocol.

Bind to a port
Login via GitHub to view this stage
Respond to PING
Login via GitHub to view this stage
Respond to multiple PINGs
Login via GitHub to view this stage
Handle concurrent clients
Login via GitHub to view this stage
Implement the ECHO command
Login via GitHub to view this stage
Implement the SET & GET commands
Login via GitHub to view this stage
Expiry
Login via GitHub to view this stage

Replication

Configure listening port
Login via GitHub to view this stage
The INFO command
Login via GitHub to view this stage
The INFO command on a replica
Login via GitHub to view this stage
Initial Replication ID and Offset
Login via GitHub to view this stage
Send handshake (1/3)
Login via GitHub to view this stage
Send handshake (2/3)
Login via GitHub to view this stage
Send handshake (3/3)
Login via GitHub to view this stage
Receive handshake (1/2)
Login via GitHub to view this stage
Receive handshake (2/2)
Login via GitHub to view this stage
Empty RDB Transfer
Login via GitHub to view this stage
Single-replica propagation
Login via GitHub to view this stage
Multi Replica Command Propagation
Login via GitHub to view this stage
Command Processing
Login via GitHub to view this stage
ACKs with no commands
Login via GitHub to view this stage
ACKs with commands
Login via GitHub to view this stage
WAIT with no replicas
Login via GitHub to view this stage
WAIT with no commands
Login via GitHub to view this stage
WAIT with multiple commands
Login via GitHub to view this stage

RDB Persistence

RDB file config
Login via GitHub to view this stage
Read a key
Login via GitHub to view this stage
Read a string value
Login via GitHub to view this stage
Read multiple keys
Login via GitHub to view this stage
Read multiple string values
Login via GitHub to view this stage
Read value with expiry
Login via GitHub to view this stage

Streams

The TYPE command
Login via GitHub to view this stage
Create a stream
Login via GitHub to view this stage
Validating entry IDs
Login via GitHub to view this stage
Partially auto-generated IDs
Login via GitHub to view this stage
Fully auto-generated IDs
Login via GitHub to view this stage
Query entries from stream
Login via GitHub to view this stage
Query with -
Login via GitHub to view this stage
Query with +
Login via GitHub to view this stage
Query single stream using XREAD
Login via GitHub to view this stage
Query multiple streams using XREAD
Login via GitHub to view this stage
Blocking reads
Login via GitHub to view this stage
Blocking reads without timeout
Login via GitHub to view this stage
Blocking reads using $
Login via GitHub to view this stage
Build your own HTTP server
FREE THIS MONTH
This challenge is free until 1 May 2024!
Build your own HTTP server

HTTP is the protocol that powers the web. In this challenge, you'll build a HTTP server that's capable of handling simple GET/POST requests, serving files and handling multiple concurrent connections.

Along the way, we'll learn about TCP connections, HTTP headers, HTTP verbs, handling multiple connections and more.

Build your own DNS server
Build your own DNS server

DNS is a protocol used to resolve domain names to IP addresses. In this challenge, you'll build a DNS server that's capable of responding to basic DNS queries.

Along the way you'll learn about the DNS protocol, DNS packet format, DNS record types, UDP servers and more.

Build your own BitTorrent
Build your own BitTorrent

Learn about .torrent files and the famous BitTorrent protocol. Implement your own BitTorrent client in Rust.

Decode bencoded strings
Login via GitHub to view this stage
Decode bencoded integers
Login via GitHub to view this stage
Decode bencoded lists
Login via GitHub to view this stage
Decode bencoded dictionaries
Login via GitHub to view this stage
Parse torrent file
Login via GitHub to view this stage
Calculate info hash
Login via GitHub to view this stage
Piece hashes
Login via GitHub to view this stage
Discover peers
Login via GitHub to view this stage
Peer handshake
Login via GitHub to view this stage
Download a piece
Login via GitHub to view this stage
Download the whole file
Login via GitHub to view this stage
Build your own grep
Build your own grep

Learn about regular expressions and how they're evaluated. Implement your own version of grep in Rust.

Match a literal character
Login via GitHub to view this stage
Match digits
Login via GitHub to view this stage
Match alphanumeric characters
Login via GitHub to view this stage
Positive Character Groups
Login via GitHub to view this stage
Negative Character Groups
Login via GitHub to view this stage
Combining Character Classes
Login via GitHub to view this stage
Start of string anchor
Login via GitHub to view this stage
End of string anchor
Login via GitHub to view this stage
Match one or more times
Login via GitHub to view this stage
Match zero or one times
Login via GitHub to view this stage
Wildcard
Login via GitHub to view this stage
Alternation
Login via GitHub to view this stage

Backreferences

Single Backreference
Login via GitHub to view this stage
Multiple Backreferences
Login via GitHub to view this stage
Nested Backreferences
Login via GitHub to view this stage
Build your own SQLite
Build your own SQLite

Learn about B-Trees, the foundation of every relational database. Explore Rust's API for reading/writing files, and handling custom file formats.

Many more to come...
coming soon
We release new challenges based on user votes. Let us know what you'd like to see next!
challenge voting
Vote on upcoming challenges