mattsse / chromiumoxide

Chrome Devtools Protocol rust API
Apache License 2.0
755 stars 78 forks source link

How to update .pdl files #164

Open AlexStorm1313 opened 1 year ago

AlexStorm1313 commented 1 year ago

I'm wondering how I can elegantly update the .pdl files used for rust code generation. What I have seen looking through the code is that there is a revision variable that can be set, but does this automatically mean the .pdl files for that revision are downloaded from e.x. https://github.com/ChromeDevTools/devtools-protocol or is this variable set manually to match the included .pdl files in the project? My use case in this instance is that I want to use the unstable 1.3 protocol.

I may be getting ahead of myself but, would it be nice to set the protocol version with a feature flag just like the runtime is specified?

Edit: It seems like running the test(generate.rs) with a new revision specified updates the pdl files and subsequently updates the generated rust code. Can someone give some more explanation on this topic. It seems like the docs on this topic are outdated.