Skip to content

Commit

Permalink
feat: stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
technobaboo committed Jan 27, 2025
1 parent 4e99fcf commit 6ff7001
Show file tree
Hide file tree
Showing 35 changed files with 1,028 additions and 2,873 deletions.
534 changes: 119 additions & 415 deletions Cargo.lock

Large diffs are not rendered by default.

35 changes: 15 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ path = "src/main.rs"

[features]
default = ["wayland"]
wayland = ["dep:smithay", "dep:wayland-scanner", "dep:wayland-backend"]
wayland = ["dep:cluFlock", "dep:waynest", "dep:tokio-stream", "dep:memmap2"]
profile_tokio = ["dep:console-subscriber", "tokio/tracing"]
profile_app = ["dep:tracing-tracy"]
local_deps = ["stereokit-rust/force-local-deps"]

[package.metadata.appimage]
auto_link = true
auto_link_exclude_list = [
"libc*",
"libdl*",
"libpthread*",
"ld-linux*",
"libGL*",
"libEGL*",
"libc*",
"libdl*",
"libpthread*",
"ld-linux*",
"libGL*",
"libEGL*",
]

[profile.dev.package."*"]
Expand Down Expand Up @@ -68,6 +68,7 @@ parking_lot = "0.12.3"

# rust errors/logging
color-eyre = { version = "0.6.3", default-features = false }
thiserror = "2.0.11"
clap = { version = "4.5.13", features = ["derive"] }
console-subscriber = { version = "0.4.0", optional = true }
tracing = "0.1.40"
Expand All @@ -94,19 +95,13 @@ directories = "5.0.1"
xkbcommon-rs = "0.1.0"

# wayland
wayland-backend = { version = "0.3.7", optional = true, default-features = false }
wayland-scanner = { version = "0.31.4", optional = true }
thiserror = "2.0.9"

[dependencies.smithay]
# git = "https://github.com/technobaboo/smithay.git"
# git = "https://github.com/colinmarc/smithay.git"
git = "https://github.com/smithay/smithay.git"
# path = "../smithay"
default-features = false
features = ["desktop", "backend_drm", "renderer_gl", "wayland_frontend"]
optional = true

cluFlock = { version = "1.2.7", optional = true } # for the lockfile checking
waynest = { git = "https://github.com/technobaboo/waynest.git", features = [
"server",
"stable",
], optional = true }
tokio-stream = { version = "0.1.17", optional = true }
memmap2 = { version = "0.9.5", optional = true }

[dependencies.stereokit-rust]
# path = "../StereoKit-rust"
Expand Down
3 changes: 3 additions & 0 deletions src/core/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ pub enum ServerError {
ReaderError(#[from] ReaderError),
#[error("StereoKit error: {0}")]
StereoKitError(#[from] StereoKitError),
#[cfg(feature = "wayland")]
#[error("Wayland error: {0}")]
WaylandError(waynest::server::Error),
#[error("Aspect {} does not exist for node", 0.to_string())]
NoAspect(TypeId),
#[error("{0}")]
Expand Down
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,7 @@ fn stereokit_loop(
}

#[cfg(feature = "wayland")]
let mut wayland = wayland::Wayland::new().expect("Could not initialize wayland");
#[cfg(feature = "wayland")]
wayland.make_context_current();
let mut wayland = wayland::Wayland::new(None).expect("Could not initialize wayland");
sk_ready_notifier.notify_waiters();
info!("Stardust ready!");

Expand Down
2 changes: 0 additions & 2 deletions src/nodes/drawable/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
pub mod lines;
pub mod model;
#[cfg(feature = "wayland")]
pub mod shader_manipulation;
pub mod shaders;
pub mod text;

Expand Down
137 changes: 0 additions & 137 deletions src/nodes/drawable/shader_manipulation.rs

This file was deleted.

9 changes: 8 additions & 1 deletion src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,14 @@ pub fn connection_env() -> FxHashMap<String, String> {
}
#[cfg(feature = "wayland")]
{
var_env_insert!(env, WAYLAND_DISPLAY);
env.insert(
"WAYLAND_DISPLAY".to_string(),
WAYLAND_DISPLAY
.get()
.unwrap()
.to_string_lossy()
.into_owned(),
);
env.insert("GDK_BACKEND".to_string(), "wayland".to_string());
env.insert("QT_QPA_PLATFORM".to_string(), "wayland".to_string());
env.insert("MOZ_ENABLE_WAYLAND".to_string(), "1".to_string());
Expand Down
152 changes: 0 additions & 152 deletions src/wayland/compositor.rs

This file was deleted.

Loading

0 comments on commit 6ff7001

Please sign in to comment.