Smithay / wayland-rs

Rust implementation of the wayland protocol (client and server).
MIT License
1.05k stars 122 forks source link

wayland-scanner as a library #601

Open i509VCB opened 1 year ago

i509VCB commented 1 year ago

It may be useful to allow using wayland-scanner as a library for codegen (essentially describing a protocol in data). This may help with api design experiments with wayland-backend.

elinorbgr commented 1 year ago

What kind of api design experiments do you have in mind?

Because afaik rust does not allow to make a crate that is both a library and a proc-macro, so that would mean splitting wayland-scanner into two crates.

i509VCB commented 1 year ago

I had realized I would need to make a sort of wayland-scanner-core crate to make it work.

Otherwise my current work on it is related to just adjusting the public API of the new crate to be more usable as a library and then putting wayland-scanner ontop of it