1
0
Fork 0
baseview/Cargo.toml
Micah Johnston fdc5d282fc
Switch from xcb crate to x11rb (#173)
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.
2024-03-25 11:20:28 -05:00

43 lines
1.3 KiB
TOML

[package]
name = "baseview"
version = "0.1.0"
authors = [
"William Light <git@wrl.lhiaudio.com>",
"Charles Saracco <crsaracco@gmail.com>",
"Mirko Covizzi <mrkcvzz@gmail.com>",
"Micah Johnston <micah@glowcoil.com>",
"Billy Messenger <billydm@protonmail.com>",
"Anton Lazarev <https://antonok.com>",
"Joakim Frostegård <joakim.frostegard@gmail.com>",
"Robbert van der Helm <mail@robbertvanderhelm.nl>",
]
edition = "2018"
license = "MIT OR Apache-2.0"
[features]
default = []
opengl = ["uuid", "x11/glx"]
[dependencies]
keyboard-types = { version = "0.6.1", default-features = false }
raw-window-handle = "0.5"
[target.'cfg(target_os="linux")'.dependencies]
x11rb = { version = "0.13.0", features = ["cursor", "resource_manager", "allow-unsafe-code"] }
x11 = { version = "2.21", features = ["xlib", "xcursor", "xlib_xcb"] }
nix = "0.22.0"
[target.'cfg(target_os="windows")'.dependencies]
winapi = { version = "0.3.8", features = ["libloaderapi", "winuser", "windef", "minwindef", "guiddef", "combaseapi", "wingdi", "errhandlingapi", "ole2", "oleidl", "shellapi", "winerror"] }
uuid = { version = "0.8", features = ["v4"], optional = true }
[target.'cfg(target_os="macos")'.dependencies]
cocoa = "0.24.0"
core-foundation = "0.9.1"
objc = "0.2.7"
uuid = { version = "0.8", features = ["v4"] }
[dev-dependencies]
rtrb = "0.2"
softbuffer = "0.3.4"