commit | db9fffe8304d4c6c59b5695c1394495d8c3290e5 | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Tue May 30 13:52:32 2023 -0700 |
committer | Henri Chataing <[email protected]> | Tue May 30 13:54:21 2023 -0700 |
tree | de918cbafbfa71e45fdf16b1d0f349dbb1868a83 | |
parent | 6962663d43643d0336b1b2e0ef75be115e12d373 [diff] |
Add system/nfc/src to the default visibility Test: NA Bug: 284980692 Change-Id: I0ce8120877463e33027bfc65bef518fe0fcd37f5
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: