mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-27 01:13:09 +00:00
feat(servo-shell): add weft-shell-protocol client-side binding
Generate client-side protocol types from weft-shell-unstable-v1.xml using wayland-scanner, following the same module structure as the compositor server side. - crates/weft-servo-shell/src/protocols/mod.rs: generate_interfaces! inside __interfaces submodule, generate_client_code! at client module level, with use wayland_client in scope. Re-exports ZweftShellManagerV1 and ZweftShellWindowV1 for use by embed_servo once the Wayland connection is established. - New deps: wayland-client, wayland-backend, wayland-scanner, bitflags (version-matched to existing workspace resolution). The binding compiles but is not yet wired into embed_servo(); that connection is deferred until the Servo embedder contract is ready.
This commit is contained in:
parent
18f92cc341
commit
2bb657e8fc
4 changed files with 30 additions and 0 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -2274,8 +2274,12 @@ name = "weft-servo-shell"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
"bitflags 2.11.0",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
|
"wayland-backend",
|
||||||
|
"wayland-client",
|
||||||
|
"wayland-scanner",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,7 @@ path = "src/main.rs"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
|
wayland-client = "0.31"
|
||||||
|
wayland-backend = "0.3"
|
||||||
|
wayland-scanner = "0.31"
|
||||||
|
bitflags = "2"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ use std::path::PathBuf;
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
|
|
||||||
|
mod protocols;
|
||||||
|
|
||||||
fn main() -> anyhow::Result<()> {
|
fn main() -> anyhow::Result<()> {
|
||||||
tracing_subscriber::fmt()
|
tracing_subscriber::fmt()
|
||||||
.with_env_filter(
|
.with_env_filter(
|
||||||
|
|
|
||||||
20
crates/weft-servo-shell/src/protocols/mod.rs
Normal file
20
crates/weft-servo-shell/src/protocols/mod.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#[allow(dead_code, non_camel_case_types, unused_unsafe, unused_variables)]
|
||||||
|
#[allow(non_upper_case_globals, non_snake_case, unused_imports)]
|
||||||
|
#[allow(missing_docs, clippy::all)]
|
||||||
|
pub mod client {
|
||||||
|
use wayland_client;
|
||||||
|
use wayland_client::protocol::*;
|
||||||
|
|
||||||
|
pub mod __interfaces {
|
||||||
|
use wayland_client::protocol::__interfaces::*;
|
||||||
|
wayland_scanner::generate_interfaces!("../../protocol/weft-shell-unstable-v1.xml");
|
||||||
|
}
|
||||||
|
use self::__interfaces::*;
|
||||||
|
|
||||||
|
wayland_scanner::generate_client_code!("../../protocol/weft-shell-unstable-v1.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
pub use client::zweft_shell_manager_v1::ZweftShellManagerV1;
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
pub use client::zweft_shell_window_v1::ZweftShellWindowV1;
|
||||||
Loading…
Reference in a new issue