commit | fe8259d830ff106945047415548a712325e836ce | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Fri Dec 15 19:55:10 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Fri Dec 15 19:55:10 2023 +0000 |
tree | 7f329964d84aec6acacc4881c092e424d49a49a2 | |
parent | e5f3986d1e740294e1dcc174b54d50e2a1fe841f [diff] | |
parent | 6dc80e3f4f764f4e91c729b09e14310b4ec3d29d [diff] |
Add external/rust/pica to the default visibility list am: 2ce036f7b4 am: e4f612e976 am: 6dc80e3f4f Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/2877434 Change-Id: Ibdf01388f79f7f753cb7596626989a543a22e321 Signed-off-by: Automerger Merge Worker <[email protected]>
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: