commit | 324eb7dd9644b00a13bc52dda89ed7f7c3b978b8 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Wed Aug 28 16:52:47 2024 +0000 |
committer | James Farrell <[email protected]> | Wed Aug 28 16:52:47 2024 +0000 |
tree | 298ce4189e419baffd78abb4be1d766eb16394c8 | |
parent | 4b6ed01c67d29936013e4aae857012e0ab0fca1f [diff] |
Migrate 25 crates to monorepo. miette mime mio mls-rs-codec mls-rs-codec-derive mls-rs-core mockall named-lock nom no-panic num_cpus num-integer num-traits oorandom os_str_bytes p9 p9_wire_format_derive parking_lot parking_lot_core pathdiff pdl-runtime pest pest_derive pest_generator pest_meta Bug: 339424309 Test: treehugger Change-Id: I760a8dc06ac55badd6569806a905f21d2c5eaec8
PDL is a domain specific language for writing the definition of binary protocol packets. Parsing and validating packets from raw bytes is tedious and error prone in any language. PDL generates memory safe and tailored backends for multiple target languages:
- Rust - C++ - Python
Historically PDL was developed as part of the Android Bluetooth stack (bluetooth_packetgen) as a way to generate the parser and serializer for Bluetooth packets, and reduce the number of memory safety issues that come with manipulating and validating raw data.
cargo run my-protocol.pdl --output-format rust > my-protocol.rs
Language specific instructions are provided for all supported backends: