Comments (10)
When I started this project, there didn't seem to be any xlib or glx bindings on crates.io, but I needed them for one of my other projects. I planned on putting other X11 related libraries (xcb, xft, xrandr, etc) in here as well when I get the time. It would be nice to merge them somehow with servo's X11 bindings to prevent duplication of efforts.
from x11-rs.
There's also been talk of merging glutin's X11 bindings (which are also extensive) with rust-xlib, but we would need to put rust-xlib on crates.io first. If we can just shift over to using x11-rs instead, that's even less work :)
from x11-rs.
That all sounds good to me! How would we go about making this happen?
from x11-rs.
Presumably a PR to glutin that removes ffi.rs and uses a released version of x11-rs. It would be worth ensuring that @tomaka is open to this idea, too :)
from x11-rs.
I've suggested the idea to @tomaka, and I'm currently adding everything glutin
needs to x11-rs
.
from x11-rs.
To answer your original question, generating the bindings from XML as in rust-glx
is probably better than hand writing them like I've done here. I'll see if I can switch to that method for my GLX bindings as well as adding generated XCB bindings.
from x11-rs.
There are actually some generated XCB bindings over at https://github.com/Aatch/rust-xcb, they just haven't been updated for a while. I've been working on trying to make things compile now that rust seems to be in a more stable place.
from x11-rs.
I haven't worked with gl_generator before. When used by glutin, it appears to remove prefixes (glX
for functions and GLX_
for constants) from symbols. Can it generate bindings without doing this? It would be inconsistent with the current style of x11-rs.
from x11-rs.
@bjz ^
from x11-rs.
By generating function bindings from the C headers, the Xlib and GLX bindings are much more complete now. Everything exported by libX11.so that starts with a capital X is covered. Any structs needed by those functions were added as well (except many used by Xkb and Xcms which were big enough to get their own sub-modules). Other than that, all that's really missing are many of the constants in the C headers.
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
- 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+
- Does x11 support cross-compiling?
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.