2 releases

0.1.1 Aug 12, 2019
0.1.0 Aug 2, 2019

#1539 in Development tools

Download history 54/week @ 2023-12-30 94/week @ 2024-01-06 59/week @ 2024-01-13 24/week @ 2024-01-20 82/week @ 2024-01-27 60/week @ 2024-02-03 63/week @ 2024-02-10 51/week @ 2024-02-17 53/week @ 2024-02-24 58/week @ 2024-03-02 46/week @ 2024-03-09 63/week @ 2024-03-16 41/week @ 2024-03-23 53/week @ 2024-03-30 29/week @ 2024-04-06 48/week @ 2024-04-13

181 downloads per month

MIT license

52KB
1.5K SLoC

pdl Travis Build Status Appveyor Build status crate docs dependency status

Parse PDL file for the Chrome DevTools Protocol.

NOTE: PDL (pronounced as ˈpo͞odl) is a home-grown format to describe the DevTools protocol. PDL support, such as Sublime syntax highlighting and the json converter, is available at https://github.com/pavelfeldman/pdl.

Usage

To use pdl in your project, add the following to your Cargo.toml:

[dependencies]
pdl = "0.1"

Example

Use pdl::parse to parse a PDL file as strongly typed data structures.

let mut f = File::open("browser_protoco.pdl")?;
let mut s = String::new();
f.read_to_string(&mut s)?;

let (rest, proto) = pdl::parse(&s)?;

println!("PDL: {}", proto);
println!("JSON: {}", proto.to_json_pretty());

For more detail, please check the parser example.

$ cargo run --example parser -- browser_protocol.pdl --json --output browser_protocol.json

Resources

Dependencies

~7–485KB
~10K SLoC