# mini-redis **Repository Path**: asphodelus_dev/mini-redis ## Basic Information - **Project Name**: mini-redis - **Description**: 基于rust的redis服务 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-15 - **Last Updated**: 2024-06-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mini-redis `mini-redis` is an incomplete, idiomatic implementation of a [Redis](https://redis.io) client and server built with [Tokio](https://tokio.rs). The intent of this project is to provide a larger example of writing a Tokio application. **Disclaimer** Please don't use mini-redis in production. This project is intended to be a learning resource, and omits various parts of the Redis protocol because implementing them would not introduce any new concepts. We will not add new features because you need them in your project — use one of the fully featured alternatives instead. ## Running The repository provides a server, client library, and some client executables for interacting with the server. Start the server: ``` RUST_LOG=debug cargo run --bin mini-redis-server ``` The [`tracing`](https://github.com/tokio-rs/tracing) crate is used to provide structured logs. You can substitute `debug` with the desired [log level][level]. [level]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives Then, in a different terminal window, the various client [examples](examples) can be executed. For example: ``` cargo run --example hello_world ``` Additionally, a CLI client is provided to run arbitrary commands from the terminal. With the server running, the following works: ``` cargo run --bin mini-redis-cli set foo bar cargo run --bin mini-redis-cli get foo ``` ## License This project is licensed under the [MIT license](LICENSE). ### Contribution Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in `mini-redis` by you, shall be licensed as MIT, without any additional terms or conditions.