AltF02 / AltF02/x11-rs

Consolidate types and constants

Aperta
#84 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
205
Fork
69
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I have a few issues with the way these crates are structured.

(1) `x11` and `x11-dl` both expose their own copies of all native types and constants. This is currently done using symlinks to the source files, but it would be much nicer to just include the types in one crate (`x11`) and have others (`x11-dl`) depend on this crate for its types and constants (but of course without the need to statically link any C libraries to use these types). If backwards compatibility is desired, these types and constants can be `pub use`d into `x11-dl`, but I don't think this is the best thing to do. This and the next problem would likely entail a version bump to 3.0.0...

(2) Everything currently lies within public submodules within the main crate(s). For example, one of the most commonly used types is `x11::xlib::Display`/`x11_dl::xlib::Display`. In addition to moving types into one crate, I believe these should be exposed to the root of the crate (i.e. `x11::Display`). They're currently lumped into modules somewhat arbitrarily, based only on what X library they *seem* to be most relevant to. If we move everything into the crate root, it will (a) be easier to find and reference these types and (b) be easier to transition to bindings generated from the C headers if desired.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.