Git Product home page Git Product logo

Comments (10)

 avatar commented on August 29, 2024

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.

jdm avatar jdm commented on August 29, 2024

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.

 avatar commented on August 29, 2024

That all sounds good to me! How would we go about making this happen?

from x11-rs.

jdm avatar jdm commented on August 29, 2024

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.

 avatar commented on August 29, 2024

I've suggested the idea to @tomaka, and I'm currently adding everything glutin needs to x11-rs.

from x11-rs.

 avatar commented on August 29, 2024

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.

acmiyaguchi avatar acmiyaguchi commented on August 29, 2024

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.

 avatar commented on August 29, 2024

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.

jdm avatar jdm commented on August 29, 2024

@bjz ^

from x11-rs.

 avatar commented on August 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.