A blazing fast and lightweight implementation of the Recursive Length Prefix (RLP) encoding scheme in Rust. inspired by Ethereum's RLP specification used in the execution layer. This project provides essential RLP functionalities with a clean and modular design, and aims to be a go-to RLP utility for low-level data serialization and deserialization.
Currently implemented:
-
✅ Encode:
- Empty string (
"") - Boolean false (
false) - Empty list (
[]) - Short strings (
<= 55 bytes) - Long strings (
>= 55 bytes) - Single byte data (
0x00to0x7f)
- Empty string (
-
✅ Decode:
- Single byte data
- Short strings
- Long strings
In progress and planned for the next update:
- 🔜 Encode short and long lists (e.g. nested RLP structures)
- 🔜 Decode short and long lists
- 🔜 Fuzz testing and error handling improvements
- 🔜 Add high level abstraction for better development experience
Make sure you have Rust installed:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shgit clone https://github.com/shaaibu7/RLP.git
cd RLP