commit | e4f612e97642a9b53ea99f4fd124fad6d93b5bbf | [log] [tgz] |
---|---|---|
author | Henri Chataing <henrichataing@google.com> | Fri Dec 15 18:48:42 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Dec 15 18:48:42 2023 +0000 |
tree | 7f329964d84aec6acacc4881c092e424d49a49a2 | |
parent | 9f5e15c2ac3ccd1c2aab6969ab61fde57be3ef97 [diff] | |
parent | 2ce036f7b43c90877bdf4865120eb5da049c4871 [diff] |
Add external/rust/pica to the default visibility list am: 2ce036f7b4 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/2877434 Change-Id: Ic0310daa8f45e0ae2e47faa534a092761e55cc63 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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: