Redis Protocol Parser

Crates.io Docs Run Tests

This library provides a high-performance, zero-copy parser for the RESP2 and RESP3 protocols.

Usage

There are two simple parse functions depending on the protocol you want. This library uses the nom parsing library and is built around streaming data into the parser.

```rust use redisparser::resp2::{parse as parse2, Resp2Type}; use redisparser::resp3::{parse as parse3, Resp3Type};

asserteq!(parse2("+test\r\n".asbytes()), Ok((&b""[..], Resp2Type::String("test")))); asserteq!(parse3("#f\r\n".asbytes()), Ok((&b""[..], Resp3Type::Boolean(false)))); ```