Skip to content

Commit 6cac006

Browse files
committed
update readme
1 parent f3996c9 commit 6cac006

File tree

7 files changed

+28
-105
lines changed

7 files changed

+28
-105
lines changed

.codecrafters/compile.sh

-11
This file was deleted.

.codecrafters/run.sh

-11
This file was deleted.

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+8-22
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
1-
# DON'T EDIT THIS!
2-
#
3-
# Codecrafters relies on this file being intact to run tests successfully. Any changes
4-
# here will not reflect when CodeCrafters tests your code, and might even cause build
5-
# failures.
6-
#
7-
# DON'T EDIT THIS!
81
[package]
9-
name = "redis-starter-rust"
10-
version = "0.1.0"
11-
authors = ["Codecrafters <[email protected]>"]
12-
edition = "2021"
2+
name = "redis-rs"
3+
version = "0.0.1"
4+
authors = ["Pin Fang <[email protected]>"]
5+
edition = "2024"
136

14-
# DON'T EDIT THIS!
15-
#
16-
# Codecrafters relies on this file being intact to run tests successfully. Any changes
17-
# here will not reflect when CodeCrafters tests your code, and might even cause build
18-
# failures.
19-
#
20-
# DON'T EDIT THIS!
217
[dependencies]
22-
anyhow = "1.0.59" # error handling
23-
bytes = "1.3.0" # helps manage buffers
24-
thiserror = "1.0.32" # error handling
25-
tokio = { version = "1.23.0", features = ["full"] } # async networking
8+
anyhow = "1.0.59"
9+
bytes = "1.3.0"
10+
thiserror = "1.0.32"
11+
tokio = { version = "1.23.0", features = ["full"] }

README.md

+19-25
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,28 @@
1-
[![progress-banner](https://backend.codecrafters.io/progress/redis/5c791621-ce77-4d40-8c71-21bc5e982ee7)](https://app.codecrafters.io/users/codecrafters-bot?r=2qF)
1+
# Build Your Own Redis
22

3-
This is a starting point for Rust solutions to the
4-
["Build Your Own Redis" Challenge](https://codecrafters.io/challenges/redis).
3+
To build a toy Redis-Server clone that's capable of handling
4+
basic commands like `PING`, `SET` and `GET`. Also implement the event loops, the Redis protocol and more.
55

6-
In this challenge, you'll build a toy Redis clone that's capable of handling
7-
basic commands like `PING`, `SET` and `GET`. Along the way we'll learn about
8-
event loops, the Redis protocol and more.
9-
10-
**Note**: If you're viewing this repo on GitHub, head over to
11-
[codecrafters.io](https://codecrafters.io) to try the challenge.
12-
13-
# Passing the first stage
6+
## Prerequisites
7+
install `redis-cli` first (an implementation of redis client for test purpose)
8+
```sh
9+
cargo install mini-redis
10+
```
1411

15-
The entry point for your Redis implementation is in `src/main.rs`. Study and
16-
uncomment the relevant code, and push your changes to pass the first stage:
1712

13+
## Supported Commands
1814
```sh
19-
git commit -am "pass 1st stage" # any msg
20-
git push origin master
15+
redis-cli PING
2116
```
2217

23-
That's all!
24-
25-
# Stage 2 & beyond
18+
```sh
19+
redis-cli ECHO hey
20+
```
2621

27-
Note: This section is for stages 2 and beyond.
22+
```sh
23+
redis-cli SET foo bar
24+
```
2825

29-
1. Ensure you have `cargo (1.54)` installed locally
30-
1. Run `./your_program.sh` to run your Redis server, which is implemented in
31-
`src/main.rs`. This command compiles your Rust project, so it might be slow
32-
the first time you run it. Subsequent runs will be fast.
33-
1. Commit your changes and run `git push origin master` to submit your solution
34-
to CodeCrafters. Test output will be streamed to your terminal.
26+
```sh
27+
redis-cli GET foo
28+
```

codecrafters.yml

-11
This file was deleted.

your_program.sh

-24
This file was deleted.

0 commit comments

Comments
 (0)