Comments (7)
from x11-rs.
For plan A you should keep in mind that some systems don't have X11, so that should be detectable.
from x11-rs.
There would be functions to check the availability of libraries and functions, so you can avoid calling missing functions and causing a panic. Probably something like:
pub enum Lib {
Xlib,
Glx,
...
}
pub fn check_lib (lib: Lib) -> bool { ... }
pub fn check_fn (lib: Lib, fname: &str) -> bool { ... }
pub fn check_fns (lib: Lib, fnames: &[&str]) -> bool { ... }
One of the current problems is that Ubuntu LTS 14.04 has an older version of Xrandr which is missing 5 of the functions defined in x11::xrandr::Xrandr
, so we added a separate struct (x11::xrandr::Xrandr_2_2_0
) which omits these functions. Both plans described above will have better ways to avoid this problem.
from x11-rs.
I'm wondering if perhaps x11-dl could also be made just a feature of the main x11
crate? It mostly uses the same code anyway, and this way the code sharing could be better IMO. Of course this would be a breaking change, that's why I'm adding this comment to the version 3 thread.
from x11-rs.
My current plan is to define all types in x11
and pub use
them into x11-dl
when version 3.0 comes around. I think this may even be possible before 3.0 without breaking anything.
from x11-rs.
A suggestion for version 3:
Include some more bindings for xfixes
extension if possible.
from x11-rs.
Like winapi-rs
bindings are currently being added by hand, which is why things are missing. If xfixes
bindings are needed, I'll see if I have some time to add them. Unfortunately, version 3 may have to wait for untagged unions, or else a version 4 would follow shortly after.
from x11-rs.
Related Issues (20)
- SHM-MIT extension
- x11 vs x11-dl? HOT 3
- undefined reference to `XOpenDisplay' HOT 1
- Debug implementation for XEvent is unsound
- XCreateIC returns null incorrectly but only if another crate (tempfile) is present HOT 1
- XshmSegmentInfo can't be created and its fields should be public
- unify x11/x11-dl crates with dlib HOT 2
- Can't run test_x11 test of my lib-crate even with xlib feature enabled HOT 6
- X11 build dependency failed. HOT 3
- Xcomposite extension HOT 1
- Xdamage extension HOT 1
- How to use the Xfixes extension? HOT 7
- MacOS Support HOT 3
- I don't know how to use this struct HOT 3
- Can't load shared library on NetBSD
- Missing constant `None`? HOT 3
- Xlib::open takes up a significant amount of the binary HOT 5
- What is the difference between x11 and x11-dl? HOT 2
- Add documentation for the differences between x11 and x11-dl HOT 1
- x11-dl linker error when building musl target on Ubuntu 20.04 with rust 1.72+
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from x11-rs.