From df61f74583ae9a509cb2efb9f9e528a0fdb6473b Mon Sep 17 00:00:00 2001 From: Nova Date: Sat, 17 Sep 2022 18:43:04 -0400 Subject: [PATCH] refactor: make ready for cargo publishing --- Cargo.toml | 25 ++++++++++++------------- src/core/client.rs | 2 +- src/core/eventloop.rs | 2 +- src/core/scenegraph.rs | 4 ++-- src/nodes/data.rs | 4 ++-- src/nodes/fields/box.rs | 2 +- src/nodes/fields/cylinder.rs | 2 +- src/nodes/fields/mod.rs | 4 ++-- src/nodes/fields/sphere.rs | 2 +- src/nodes/input/hand.rs | 4 ++-- src/nodes/input/mod.rs | 4 ++-- src/nodes/input/pointer.rs | 4 ++-- src/nodes/items/mod.rs | 2 +- src/nodes/mod.rs | 2 +- src/nodes/model.rs | 2 +- src/nodes/root.rs | 2 +- src/nodes/spatial.rs | 6 +++--- src/objects/input/sk_hand.rs | 2 +- src/wayland/panel_item.rs | 8 ++++---- 19 files changed, 41 insertions(+), 42 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7d73bed..bba5182 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,12 @@ [package] edition = "2018" -name = "stardust-xr" -version = "0.9.0" +name = "stardust-xr-server" +version = "0.9.1" +authors = ["Nova King "] +description = "Stardust XR reference display server" +license = "GPLv2" +repository = "https://github.com/StardustXR/stardust-xr-server/" +homepage = "https://stardustxr.org" [dependencies] anyhow = "1.0.57" @@ -27,16 +32,10 @@ prisma = "0.1.1" slog = "2.7.0" slog-stdlog = "4.1.1" xkbcommon = { version = "0.5.0", default-features = false } - -[dependencies.libstardustxr] -path = "../libstardustxr-rs" -default-features = false - -[dependencies.stereokit] -path = "../stereokit-rs" -default-features = false -features = ["linux-egl"] +stardust-xr = "0.1.0" +stardust-xr-schemas = "0.1.0" +stereokit = {default_features = false, features = ["linux-egl"], version = "0.2.0"} [dependencies.smithay] -# git = "https://github.com/Smithay/smithay.git" -path = "../smithay" +git = "https://github.com/technobaboo/smithay.git" +branch = "feature/public_input" diff --git a/src/core/client.rs b/src/core/client.rs index e9cb2b0..b39b0f1 100644 --- a/src/core/client.rs +++ b/src/core/client.rs @@ -10,9 +10,9 @@ use crate::nodes::root::Root; use crate::nodes::spatial; use anyhow::Result; use lazy_static::lazy_static; -use libstardustxr::messenger::Messenger; use once_cell::sync::OnceCell; use parking_lot::Mutex; +use stardust_xr::messenger::Messenger; use std::path::PathBuf; use std::sync::{Arc, Weak}; use tokio::net::UnixStream; diff --git a/src/core/eventloop.rs b/src/core/eventloop.rs index 6349db9..d7caeba 100644 --- a/src/core/eventloop.rs +++ b/src/core/eventloop.rs @@ -1,7 +1,7 @@ use super::client::Client; use anyhow::Result; -use libstardustxr::server; use slab::Slab; +use stardust_xr::server; use std::sync::atomic::AtomicU64; use std::sync::Arc; use tokio::net::UnixListener; diff --git a/src/core/scenegraph.rs b/src/core/scenegraph.rs index a0d74d2..32c2a36 100644 --- a/src/core/scenegraph.rs +++ b/src/core/scenegraph.rs @@ -1,9 +1,9 @@ use crate::core::client::Client; use crate::nodes::Node; use anyhow::Result; -use libstardustxr::scenegraph; -use libstardustxr::scenegraph::ScenegraphError; use once_cell::sync::OnceCell; +use stardust_xr::scenegraph; +use stardust_xr::scenegraph::ScenegraphError; use std::sync::{Arc, Weak}; use core::hash::BuildHasherDefault; diff --git a/src/nodes/data.rs b/src/nodes/data.rs index 8cdb7f7..f2020e0 100644 --- a/src/nodes/data.rs +++ b/src/nodes/data.rs @@ -6,9 +6,9 @@ use crate::core::nodelist::LifeLinkedNodeList; use crate::core::registry::Registry; use anyhow::{anyhow, ensure, Result}; use glam::{vec3a, Mat4}; -use libstardustxr::flex::flexbuffer_from_vector_arguments; -use libstardustxr::{flex_to_quat, flex_to_vec3}; use parking_lot::Mutex; +use stardust_xr::flex::flexbuffer_from_vector_arguments; +use stardust_xr::{flex_to_quat, flex_to_vec3}; use std::sync::{Arc, Weak}; static PULSE_SENDER_REGISTRY: Registry = Registry::new(); diff --git a/src/nodes/fields/box.rs b/src/nodes/fields/box.rs index 7210b58..6bc9b4c 100644 --- a/src/nodes/fields/box.rs +++ b/src/nodes/fields/box.rs @@ -3,8 +3,8 @@ use crate::core::client::Client; use crate::nodes::spatial::{get_spatial_parent_flex, Spatial}; use anyhow::{anyhow, ensure, Result}; use glam::{vec3, vec3a, Mat4, Vec3, Vec3A}; -use libstardustxr::{flex_to_quat, flex_to_vec3}; use parking_lot::Mutex; +use stardust_xr::{flex_to_quat, flex_to_vec3}; use std::sync::Arc; pub struct BoxField { diff --git a/src/nodes/fields/cylinder.rs b/src/nodes/fields/cylinder.rs index eedfe08..a6a21af 100644 --- a/src/nodes/fields/cylinder.rs +++ b/src/nodes/fields/cylinder.rs @@ -3,8 +3,8 @@ use crate::core::client::Client; use crate::nodes::spatial::{get_spatial_parent_flex, Spatial}; use anyhow::{anyhow, ensure, Result}; use glam::{swizzles::*, vec2, Mat4, Vec3A}; -use libstardustxr::{flex_to_quat, flex_to_vec3}; use portable_atomic::AtomicF32; +use stardust_xr::{flex_to_quat, flex_to_vec3}; use std::sync::atomic::Ordering; use std::sync::Arc; diff --git a/src/nodes/fields/mod.rs b/src/nodes/fields/mod.rs index 40cff70..c4e0e89 100644 --- a/src/nodes/fields/mod.rs +++ b/src/nodes/fields/mod.rs @@ -11,8 +11,8 @@ use super::Node; use crate::core::client::Client; use anyhow::{anyhow, Result}; use glam::{vec2, vec3a, Vec3, Vec3A}; -use libstardustxr::flex::FlexBuffable; -use libstardustxr::flex_to_vec3; +use stardust_xr::flex::FlexBuffable; +use stardust_xr::flex_to_vec3; use std::ops::Deref; use std::sync::Arc; diff --git a/src/nodes/fields/sphere.rs b/src/nodes/fields/sphere.rs index 55f0277..15791e2 100644 --- a/src/nodes/fields/sphere.rs +++ b/src/nodes/fields/sphere.rs @@ -3,8 +3,8 @@ use crate::core::client::Client; use crate::nodes::spatial::{get_spatial_parent_flex, Spatial}; use anyhow::{anyhow, ensure, Result}; use glam::{Mat4, Vec3A}; -use libstardustxr::flex_to_vec3; use portable_atomic::AtomicF32; +use stardust_xr::flex_to_vec3; use std::sync::atomic::Ordering; use std::sync::Arc; diff --git a/src/nodes/input/hand.rs b/src/nodes/input/hand.rs index b60988f..2184290 100644 --- a/src/nodes/input/hand.rs +++ b/src/nodes/input/hand.rs @@ -1,8 +1,8 @@ use crate::nodes::fields::Field; use crate::nodes::spatial::Spatial; use glam::{vec3a, Mat4}; -use libstardustxr::schemas::input_hand::HandT; -use libstardustxr::schemas::{common::JointT, input::InputDataRaw}; +use stardust_xr_schemas::input_hand::HandT; +use stardust_xr_schemas::{common::JointT, input::InputDataRaw}; use std::sync::Arc; use super::{DistanceLink, InputSpecialization}; diff --git a/src/nodes/input/mod.rs b/src/nodes/input/mod.rs index 337c706..b802c28 100644 --- a/src/nodes/input/mod.rs +++ b/src/nodes/input/mod.rs @@ -11,10 +11,10 @@ use crate::core::eventloop::FRAME; use crate::core::registry::Registry; use anyhow::{anyhow, ensure, Result}; use glam::Mat4; -use libstardustxr::schemas::input::{InputData, InputDataArgs, InputDataRaw}; -use libstardustxr::schemas::input_hand::HandT; use nanoid::nanoid; use parking_lot::Mutex; +use stardust_xr_schemas::input::{InputData, InputDataArgs, InputDataRaw}; +use stardust_xr_schemas::input_hand::HandT; use std::ops::Deref; use std::sync::atomic::Ordering; use std::sync::{Arc, Weak}; diff --git a/src/nodes/input/pointer.rs b/src/nodes/input/pointer.rs index 6513439..f9ad9a8 100644 --- a/src/nodes/input/pointer.rs +++ b/src/nodes/input/pointer.rs @@ -2,8 +2,8 @@ use super::{DistanceLink, InputSpecialization}; use crate::nodes::fields::{ray_march, Field, Ray, RayMarchResult}; use crate::nodes::spatial::Spatial; use glam::{vec3, Mat4}; -use libstardustxr::schemas::input::InputDataRaw; -use libstardustxr::schemas::input_pointer; +use stardust_xr_schemas::input::InputDataRaw; +use stardust_xr_schemas::input_pointer; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; diff --git a/src/nodes/items/mod.rs b/src/nodes/items/mod.rs index f1eb4a8..1e6f155 100644 --- a/src/nodes/items/mod.rs +++ b/src/nodes/items/mod.rs @@ -11,9 +11,9 @@ use crate::core::registry::Registry; use crate::wayland::panel_item::{register_panel_item_ui_flex, PanelItem}; use anyhow::{anyhow, ensure, Result}; use lazy_static::lazy_static; -use libstardustxr::flex::flexbuffer_from_vector_arguments; use nanoid::nanoid; use parking_lot::Mutex; +use stardust_xr::flex::flexbuffer_from_vector_arguments; use std::ops::Deref; use std::sync::{Arc, Weak}; diff --git a/src/nodes/mod.rs b/src/nodes/mod.rs index 5890dcc..588d3c0 100644 --- a/src/nodes/mod.rs +++ b/src/nodes/mod.rs @@ -9,9 +9,9 @@ pub mod root; pub mod spatial; use anyhow::{anyhow, Result}; -use libstardustxr::scenegraph::ScenegraphError; use nanoid::nanoid; use once_cell::sync::OnceCell; +use stardust_xr::scenegraph::ScenegraphError; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Weak}; use std::vec::Vec; diff --git a/src/nodes/model.rs b/src/nodes/model.rs index 86cd64a..0eb1394 100644 --- a/src/nodes/model.rs +++ b/src/nodes/model.rs @@ -7,12 +7,12 @@ use anyhow::{anyhow, bail, ensure, Result}; use flexbuffers::FlexBufferType; use glam::Mat4; use lazy_static::lazy_static; -use libstardustxr::{flex_to_quat, flex_to_vec3}; use once_cell::sync::OnceCell; use parking_lot::Mutex; use prisma::{Rgb, Rgba}; use rustc_hash::FxHashMap; use send_wrapper::SendWrapper; +use stardust_xr::{flex_to_quat, flex_to_vec3}; use std::fmt::Error; use std::path::PathBuf; use std::sync::Arc; diff --git a/src/nodes/root.rs b/src/nodes/root.rs index d1fdb3b..1e09100 100644 --- a/src/nodes/root.rs +++ b/src/nodes/root.rs @@ -4,7 +4,7 @@ use crate::core::client::Client; use crate::core::registry::Registry; use anyhow::Result; use glam::Mat4; -use libstardustxr::flex::flexbuffer_from_vector_arguments; +use stardust_xr::flex::flexbuffer_from_vector_arguments; use std::path::PathBuf; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; diff --git a/src/nodes/spatial.rs b/src/nodes/spatial.rs index 51a982e..f7cda39 100644 --- a/src/nodes/spatial.rs +++ b/src/nodes/spatial.rs @@ -2,10 +2,10 @@ use super::Node; use crate::core::client::Client; use anyhow::{anyhow, ensure, Result}; use glam::{Mat4, Quat, Vec3}; -use libstardustxr::flex::flexbuffer_from_vector_arguments; -use libstardustxr::push_to_vec; -use libstardustxr::{flex_to_quat, flex_to_vec3}; use parking_lot::Mutex; +use stardust_xr::flex::flexbuffer_from_vector_arguments; +use stardust_xr::push_to_vec; +use stardust_xr::{flex_to_quat, flex_to_vec3}; use std::ptr; use std::sync::{Arc, Weak}; diff --git a/src/objects/input/sk_hand.rs b/src/objects/input/sk_hand.rs index 1b5a553..4d4ca14 100644 --- a/src/objects/input/sk_hand.rs +++ b/src/objects/input/sk_hand.rs @@ -3,7 +3,7 @@ use crate::nodes::{ spatial::Spatial, }; use glam::Mat4; -use libstardustxr::schemas::{common::JointT, input_hand::HandT}; +use stardust_xr_schemas::{common::JointT, input_hand::HandT}; use std::sync::{Arc, Weak}; use stereokit::{ input::{Handed, Joint as SkJoint}, diff --git a/src/wayland/panel_item.rs b/src/wayland/panel_item.rs index 0b4f349..67e2622 100644 --- a/src/wayland/panel_item.rs +++ b/src/wayland/panel_item.rs @@ -16,10 +16,6 @@ use crate::{ use anyhow::{anyhow, bail, Result}; use glam::Mat4; use lazy_static::lazy_static; -use libstardustxr::{ - flex::{flexbuffer_from_arguments, flexbuffer_from_vector_arguments}, - flex_to_vec2, -}; use nanoid::nanoid; use smithay::{ reexports::wayland_server::{ @@ -28,6 +24,10 @@ use smithay::{ }, wayland::{compositor::SurfaceData, shell::xdg::XdgToplevelSurfaceData}, }; +use stardust_xr::{ + flex::{flexbuffer_from_arguments, flexbuffer_from_vector_arguments}, + flex_to_vec2, +}; use std::sync::{Arc, Weak}; use xkbcommon::xkb::{self, ffi::XKB_KEYMAP_FORMAT_TEXT_V1, Keymap};