Update deps. Fixes to runtime

This commit is contained in:
Luke D. Jones
2022-11-07 09:47:15 +13:00
parent efc752cce6
commit 5f4e950819
8 changed files with 83 additions and 133 deletions

137
Cargo.lock generated
View File

@@ -201,17 +201,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "async-recursion"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "async-recursion"
version = "1.0.0"
@@ -610,7 +599,7 @@ dependencies = [
"sysfs-class",
"tokio",
"toml",
"zbus 3.4.0",
"zbus",
"zvariant",
]
@@ -627,7 +616,7 @@ dependencies = [
"serde_derive",
"serde_json",
"smol",
"zbus 3.4.0",
"zbus",
"zvariant",
"zvariant_derive",
]
@@ -1145,9 +1134,9 @@ dependencies = [
[[package]]
name = "glam"
version = "0.21.3"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815"
checksum = "12f597d56c1bd55a811a1be189459e8fad2bbc272616375602443bdfb37fa774"
dependencies = [
"serde",
]
@@ -1440,7 +1429,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c2bd5667a34b046e66f21ac2c016b1f4b41318423f9282b4e04f755ad947817"
dependencies = [
"serde",
"zbus 3.4.0",
"zbus",
"zvariant",
]
@@ -1613,19 +1602,6 @@ dependencies = [
"memoffset",
]
[[package]]
name = "nix"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6"
dependencies = [
"bitflags",
"cc",
"cfg-if",
"libc",
"memoffset",
]
[[package]]
name = "nix"
version = "0.24.2"
@@ -1680,14 +1656,13 @@ dependencies = [
[[package]]
name = "notify-rust"
version = "4.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "368e89ea58df747ce88be669ae44e79783c1d30bfd540ad0fc520b3f41f0b3b0"
version = "4.5.11"
source = "git+https://github.com/flukejones/notify-rust.git#6033d06377d6d601207ae31861cda560d03a9aa8"
dependencies = [
"mac-notification-sys",
"serde",
"tauri-winrt-notification",
"zbus 2.3.2",
"zbus",
"zvariant",
"zvariant_derive",
]
@@ -1773,16 +1748,6 @@ version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
[[package]]
name = "ordered-stream"
version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44630c059eacfd6e08bdaa51b1db2ce33119caa4ddc1235e923109aa5f25ccb1"
dependencies = [
"futures-core",
"pin-project-lite",
]
[[package]]
name = "ordered-stream"
version = "0.1.1"
@@ -2066,7 +2031,7 @@ dependencies = [
"tempfile",
"tokio",
"toml",
"zbus 3.4.0",
"zbus",
]
[[package]]
@@ -2081,7 +2046,7 @@ dependencies = [
"serde",
"serde_derive",
"sysfs-class",
"zbus 3.4.0",
"zbus",
"zvariant",
]
@@ -2104,8 +2069,8 @@ dependencies = [
"rog_aura",
"rog_platform",
"rog_profiles",
"zbus 3.4.0",
"zbus_macros 3.4.0",
"zbus",
"zbus_macros",
"zvariant",
]
@@ -2258,15 +2223,6 @@ dependencies = [
"pkg-config",
]
[[package]]
name = "sha1"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770"
dependencies = [
"sha1_smol",
]
[[package]]
name = "sha1"
version = "0.10.5"
@@ -2278,12 +2234,6 @@ dependencies = [
"digest",
]
[[package]]
name = "sha1_smol"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"
[[package]]
name = "shared_library"
version = "0.1.9"
@@ -2447,7 +2397,7 @@ dependencies = [
"serde_json",
"tokio",
"udev",
"zbus 3.4.0",
"zbus",
"zvariant",
"zvariant_derive",
]
@@ -3243,46 +3193,6 @@ version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3"
[[package]]
name = "zbus"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d8f1a037b2c4a67d9654dc7bdfa8ff2e80555bbefdd3c1833c1d1b27c963a6b"
dependencies = [
"async-broadcast",
"async-channel",
"async-executor",
"async-io",
"async-lock",
"async-recursion 0.3.2",
"async-task",
"async-trait",
"byteorder",
"derivative",
"dirs",
"enumflags2",
"event-listener",
"futures-core",
"futures-sink",
"futures-util",
"hex",
"lazy_static",
"nix 0.23.1",
"once_cell",
"ordered-stream 0.0.1",
"rand",
"serde",
"serde_repr",
"sha1 0.6.1",
"static_assertions",
"tracing",
"uds_windows",
"winapi",
"zbus_macros 2.3.2",
"zbus_names",
"zvariant",
]
[[package]]
name = "zbus"
version = "3.4.0"
@@ -3294,7 +3204,7 @@ dependencies = [
"async-executor",
"async-io",
"async-lock",
"async-recursion 1.0.0",
"async-recursion",
"async-task",
"async-trait",
"byteorder",
@@ -3309,34 +3219,21 @@ dependencies = [
"lazy_static",
"nix 0.25.0",
"once_cell",
"ordered-stream 0.1.1",
"ordered-stream",
"rand",
"serde",
"serde_repr",
"sha1 0.10.5",
"sha1",
"static_assertions",
"tokio",
"tracing",
"uds_windows",
"winapi",
"zbus_macros 3.4.0",
"zbus_macros",
"zbus_names",
"zvariant",
]
[[package]]
name = "zbus_macros"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f8fb5186d1c87ae88cf234974c240671238b4a679158ad3b94ec465237349a6"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"regex",
"syn",
]
[[package]]
name = "zbus_macros"
version = "3.4.0"

View File

@@ -6,38 +6,38 @@ version = "4.5.0-rc5"
[workspace.dependencies]
async-trait = "^0.1"
tokio = { version = "^1.21.1", features = ["macros", "rt-multi-thread", "time"]}
concat-idents = "1.1.3"
tokio = { version = "^1.21.2", features = ["macros", "rt-multi-thread", "time"]}
concat-idents = "^1.1"
dirs = "^4.0"
smol = "^1.2"
zbus = "3.4.0"
zbus_macros = "3.4.0"
zvariant = "^3.2"
zvariant_derive = "^3.2"
zbus = "^3.4"
zbus_macros = "^3.4"
zvariant = "^3.7"
zvariant_derive = "^3.7"
logind-zbus = { version = "^3.0" } #, default-features = false, features = ["non_blocking"] }
serde = "^1.0"
serde_derive = "^1.0"
serde_json = "^1.0"
toml = "^0.5.8"
toml = "^0.5.9"
log = "^0.4"
env_logger = "^0.9"
glam = { version = "^0.21.2", features = ["serde"] }
glam = { version = "^0.22", features = ["serde"] }
gumdrop = "^0.8"
udev = "^0.6"
rusb = "^0.9"
sysfs-class = "^0.1.2"
inotify = "^0.10.0"
png_pong = "^0.8.0"
pix = "0.13"
tinybmp = "^0.3.3"
gif = "^0.11.2"
png_pong = "^0.8"
pix = "^0.13"
tinybmp = "^0.3"
gif = "^0.11"
notify-rust = { version = "^4.3", default-features = false, features = ["z"] }
notify-rust = { git = "https://github.com/flukejones/notify-rust.git", default-features = false, features = ["z"] }
[profile.release]
# thin = 57s, asusd = 9.0M

View File

@@ -7,26 +7,33 @@ use zbus_macros::dbus_proxy;
)]
trait Anime {
/// Set whether the AniMe will show boot, suspend, or off animations
#[inline]
fn set_boot_on_off(&self, status: bool) -> zbus::Result<()>;
/// Set the global AniMe brightness
#[inline]
fn set_brightness(&self, bright: f32) -> zbus::Result<()>;
/// Set whether the AniMe is displaying images/data
#[inline]
fn set_on_off(&self, status: bool) -> zbus::Result<()>;
/// Writes a data stream of length. Will force system thread to exit until it is restarted
#[inline]
fn write(&self, input: AnimeDataBuffer) -> zbus::Result<()>;
/// Get status of if the AniMe LEDs are on
#[inline]
#[dbus_proxy(property)]
fn awake_enabled(&self) -> zbus::Result<bool>;
/// Get the status of if factory system-status animations are enabled
#[inline]
#[dbus_proxy(property)]
fn boot_enabled(&self) -> zbus::Result<bool>;
/// Notify listeners of the status of AniMe LED power and factory system-status animations
#[inline]
#[dbus_proxy(signal)]
fn power_states(&self, data: AnimePowerStates) -> zbus::Result<()>;
}

View File

@@ -34,46 +34,60 @@ const BLOCKING_TIME: u64 = 40; // 100ms = 10 FPS, max 50ms = 20 FPS, 40ms = 25 F
)]
trait Led {
/// NextLedMode method
#[inline]
fn next_led_mode(&self) -> zbus::Result<()>;
/// PrevLedMode method
#[inline]
fn prev_led_mode(&self) -> zbus::Result<()>;
/// Toggle to next led brightness
#[inline]
fn next_led_brightness(&self) -> zbus::Result<()>;
/// Toggle to previous led brightness
#[inline]
fn prev_led_brightness(&self) -> zbus::Result<()>;
/// SetBrightness method
#[inline]
fn set_brightness(&self, brightness: LedBrightness) -> zbus::Result<()>;
/// SetLedMode method
#[inline]
fn set_led_mode(&self, effect: &AuraEffect) -> zbus::Result<()>;
#[inline]
fn set_leds_power(&self, options: AuraPowerDev, enabled: bool) -> zbus::Result<()>;
#[inline]
fn per_key_raw(&self, data: PerKeyRaw) -> zbus::fdo::Result<()>;
/// NotifyLed signal
#[inline]
#[dbus_proxy(signal)]
fn notify_led(&self, data: AuraEffect) -> zbus::Result<()>;
#[dbus_proxy(signal)]
#[inline]
fn notify_power_states(&self, data: AuraPowerDev) -> zbus::Result<()>;
/// LedBrightness property
#[inline]
#[dbus_proxy(property)]
fn led_brightness(&self) -> zbus::Result<i16>;
/// LedMode property
#[inline]
fn led_mode(&self) -> zbus::Result<AuraModeNum>;
/// LedModes property
#[inline]
fn led_modes(&self) -> zbus::Result<BTreeMap<AuraModeNum, AuraEffect>>;
// As property doesn't work for AuraPowerDev (complexity of serialization?)
// #[dbus_proxy(property)]
#[inline]
fn leds_enabled(&self) -> zbus::Result<AuraPowerDev>;
}

View File

@@ -28,52 +28,67 @@ use zbus_macros::dbus_proxy;
)]
trait RogBios {
/// DgpuDisable method
#[inline]
fn dgpu_disable(&self) -> zbus::Result<bool>;
/// EgpuEnable method
#[inline]
fn egpu_enable(&self) -> zbus::Result<bool>;
/// GpuMuxMode method
#[inline]
fn gpu_mux_mode(&self) -> zbus::Result<GpuMode>;
/// PanelOd method
#[inline]
fn panel_od(&self) -> zbus::Result<bool>;
/// PostBootSound method
#[inline]
fn post_boot_sound(&self) -> zbus::Result<i16>;
/// SetDgpuDisable method
#[inline]
fn set_dgpu_disable(&self, disable: bool) -> zbus::Result<()>;
/// SetEgpuEnable method
#[inline]
fn set_egpu_enable(&self, enable: bool) -> zbus::Result<()>;
/// SetGpuMuxMode method
#[inline]
fn set_gpu_mux_mode(&self, mode: GpuMode) -> zbus::Result<()>;
/// SetPanelOd method
#[inline]
fn set_panel_od(&self, overdrive: bool) -> zbus::Result<()>;
/// SetPostBootSound method
#[inline]
fn set_post_boot_sound(&self, on: bool) -> zbus::Result<()>;
/// NotifyDgpuDisable signal
#[inline]
#[dbus_proxy(signal)]
fn notify_dgpu_disable(&self, disable: bool) -> zbus::Result<()>;
/// NotifyEgpuEnable signal
#[inline]
#[dbus_proxy(signal)]
fn notify_egpu_enable(&self, enable: bool) -> zbus::Result<()>;
/// NotifyGpuMuxMode signal
#[inline]
#[dbus_proxy(signal)]
fn notify_gpu_mux_mode(&self, mode: GpuMode) -> zbus::Result<()>;
/// NotifyPanelOd signal
#[inline]
#[dbus_proxy(signal)]
fn notify_panel_od(&self, overdrive: bool) -> zbus::Result<()>;
/// NotifyPostBootSound signal
#[inline]
#[dbus_proxy(signal)]
fn notify_post_boot_sound(&self, on: bool) -> zbus::Result<()>;
}

View File

@@ -27,19 +27,24 @@ use zbus_macros::dbus_proxy;
)]
trait Power {
/// charge_control_end_threshold method
#[inline]
fn charge_control_end_threshold(&self) -> zbus::Result<u8>;
/// MainsOnline method
#[inline]
fn mains_online(&self) -> zbus::Result<bool>;
/// set_charge_control_end_threshold method
#[inline]
fn set_charge_control_end_threshold(&self, limit: u8) -> zbus::Result<()>;
/// NotifyCharge signal
#[inline]
#[dbus_proxy(signal)]
fn notify_charge_control_end_threshold(&self, limit: u8) -> zbus::Result<u8>;
/// NotifyMainsOnline signal
#[inline]
#[dbus_proxy(signal)]
fn notify_mains_online(&self, on: bool) -> zbus::Result<()>;
}

View File

@@ -31,44 +31,55 @@ use zbus_macros::dbus_proxy;
)]
trait Profile {
/// Get the fan-curve data for the currently active Profile
#[inline]
fn fan_curve_data(&self, profile: Profile) -> zbus::Result<FanCurveSet>;
/// Fetch the active profile name
#[inline]
fn active_profile(&self) -> zbus::Result<Profile>;
/// Get a list of profiles that have fan-curves enabled.
#[inline]
fn enabled_fan_profiles(&self) -> zbus::Result<Vec<Profile>>;
/// Toggle to next platform_profile. Names provided by `Profiles`.
/// If fan-curves are supported will also activate a fan curve for profile.
#[inline]
fn next_profile(&self) -> zbus::Result<()>;
/// Fetch profile names
#[inline]
fn profiles(&self) -> zbus::Result<Vec<Profile>>;
/// Set this platform_profile name as active
#[inline]
fn set_active_profile(&self, profile: Profile) -> zbus::Result<()>;
/// Set a profile fan curve enabled status. Will also activate a fan curve.
#[inline]
fn set_fan_curve_enabled(&self, profile: Profile, enabled: bool) -> zbus::Result<()>;
/// Set the fan curve for the specified profile, or the profile the user is
/// currently in if profile == None. Will also activate the fan curve.
#[inline]
fn set_fan_curve(&self, profile: Profile, curve: CurveData) -> zbus::Result<()>;
/// Reset the stored (self) and device curve to the defaults of the platform.
///
/// Each platform_profile has a different default and the defualt can be read
/// only for the currently active profile.
#[inline]
fn set_active_curve_to_defaults(&self) -> zbus::Result<()>;
/// Reset the stored (self) and device curve to the defaults of the platform.
///
/// Each platform_profile has a different default and the defualt can be read
/// only for the currently active profile.
#[inline]
fn reset_profile_curves(&self, profile: Profile) -> zbus::fdo::Result<()>;
/// NotifyProfile signal
#[inline]
#[dbus_proxy(signal)]
async fn notify_profile(&self, profile: Profile) -> zbus::Result<Profile>;
}

View File

@@ -28,5 +28,6 @@ use zbus_macros::dbus_proxy;
)]
trait Supported {
/// SupportedFunctions method
#[inline]
fn supported_functions(&self) -> zbus::Result<SupportedFunctions>;
}