Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from xcb crate to x11rb #173

Merged
merged 1 commit into from
Mar 25, 2024
Merged

Switch from xcb crate to x11rb #173

merged 1 commit into from
Mar 25, 2024

Conversation

micahrj
Copy link
Member

@micahrj micahrj commented Mar 23, 2024

Replace the xcb and xcb-util crates with x11rb. We were using an old version of the xcb crate which had some soundness issue. x11rb doesn't have these issues and generally provides a safer and nicer to use API.

It's possible to use x11rb without linking to xcb at all, using the RustConnection API, but unfortunately we have to use the XCBConnection API (which uses xcb under the hood) due to our use of the xlib GLX API for creating OpenGL contexts. In the future, it might be possible to avoid linking to xlib and xcb by replacing GLX with EGL.

Getting the xlib-xcb integration to work also necessitated upgrading the version of the x11 crate, since the version we were using was missing some necessary functionality that was previously being provided by the xcb crate.

Copy link
Member

@prokopyl prokopyl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked through it again and tested it on my system, it looks and works great. 🙂

@micahrj micahrj merged commit fdc5d28 into RustAudio:master Mar 25, 2024
3 checks passed
@micahrj micahrj deleted the x11rb branch March 25, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants