mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2026-08-17 16:34:54 -05:00
chore: update rust deps (#1110)
* chore: update rust deps * fix * chore: add fix for proc-macro-error-2 warning * fix: re-update bitflags --------- Co-authored-by: Ilya Zlobintsev <ilya.zl@protonmail.com>
This commit is contained in:
co-authored by
Ilya Zlobintsev
parent
41c4f3a999
commit
852b3e5db6
Generated
+495
-533
File diff suppressed because it is too large
Load Diff
+11
-6
@@ -16,19 +16,19 @@ edition = "2024"
|
||||
amdgpu-sysfs = { version = "0.21.0", features = ["serde"] }
|
||||
nvml-wrapper = { git = "https://github.com/rust-nvml/nvml-wrapper.git", rev = "eb47417eede43443f139053479618e96ad32893d" }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_with = { version = "3.18.0", default-features = false, features = [
|
||||
serde_with = { version = "3.21.0", default-features = false, features = [
|
||||
"macros",
|
||||
] }
|
||||
serde_json = "1.0.149"
|
||||
anyhow = "1.0.102"
|
||||
serde_json = "1.0.150"
|
||||
anyhow = "1.0.103"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
futures = { version = "0.3.32", features = [
|
||||
"std",
|
||||
"async-await",
|
||||
], default-features = false }
|
||||
tokio = { version = "1.52.1", default-features = false }
|
||||
nix = { version = "0.31.2", default-features = false }
|
||||
tokio = { version = "1.52.3", default-features = false }
|
||||
nix = { version = "0.31.3", default-features = false }
|
||||
jiff = "0.2"
|
||||
indexmap = { version = "2.14.0", features = ["serde"] }
|
||||
pretty_assertions = "1.4.1"
|
||||
@@ -39,7 +39,7 @@ i18n-embed = { version = "0.16.0", features = [
|
||||
"desktop-requester",
|
||||
] }
|
||||
i18n-embed-fl = "0.10.0"
|
||||
rust-embed = { version = "8.11.0", features = ["debug-embed"] }
|
||||
rust-embed = { version = "8.12.0", features = ["debug-embed"] }
|
||||
|
||||
[profile.release]
|
||||
strip = "symbols"
|
||||
@@ -61,3 +61,8 @@ strip = false
|
||||
debug = 1
|
||||
lto = "thin"
|
||||
codegen-units = 256
|
||||
|
||||
[patch.crates-io]
|
||||
# Compilation warning fix from https://github.com/GnomedDev/proc-macro-error-2/pull/14
|
||||
# Can be removed when https://github.com/kellpossible/cargo-i18n/issues/172 is fixed
|
||||
proc-macro-error2 = { git = "https://github.com/fgardt/proc-macro-error-2", rev = "53ff94b61c678593158db1a3d50269c6f0de0db7" }
|
||||
|
||||
+887
-910
File diff suppressed because it is too large
Load Diff
@@ -35,9 +35,9 @@ divan = { workspace = true, optional = true }
|
||||
serde_norway = { workspace = true }
|
||||
|
||||
nvml-wrapper = { workspace = true }
|
||||
bitflags = "2.11.1"
|
||||
bitflags = "2.13.0"
|
||||
pciid-parser = { version = "0.8", features = ["serde"] }
|
||||
zbus = { version = "5.14.0", default-features = false, features = ["tokio"] }
|
||||
zbus = { version = "5.17.0", default-features = false, features = ["tokio"] }
|
||||
zbus_polkit = { version = "5.0.0", default-features = false, features = ["tokio"] }
|
||||
libdrm_amdgpu_sys = { version = "0.8.16", default-features = false, features = [
|
||||
"dynamic_loading",
|
||||
@@ -54,8 +54,8 @@ libdisplay-info = { version= "0.3.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = { workspace = true }
|
||||
insta = { version = "1.47.2", features = ["json", "yaml"] }
|
||||
easy_fuser = { version = "0.4.5", features = ["parallel"] }
|
||||
insta = { version = "1.48.0", features = ["json", "yaml"] }
|
||||
easy_fuser = { version = "0.5.0", default-features = false, features = ["parallel"] }
|
||||
tempfile = "3.27.0"
|
||||
|
||||
[build-dependencies]
|
||||
|
||||
@@ -21,7 +21,7 @@ impl FanCurveExt for FanCurve {
|
||||
let current = temp.current.expect("No current temp");
|
||||
|
||||
// This scenario is most likely unreachable as the kernel shuts down the GPU when it reaches critical temperature
|
||||
if temp.crit.filter(|crit| current > *crit).is_some() {
|
||||
if temp.crit.as_ref().is_some_and(|crit| current > *crit) {
|
||||
warn!("GPU temperature is beyond critical values! {current}°C");
|
||||
return u8::MAX;
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@ impl NvidiaGpuController {
|
||||
let min_offset = cmp::min(offset_info.min_clock_offset_mhz, -(base_freq / 1000));
|
||||
|
||||
if !(min_offset..=offset_info.max_clock_offset_mhz).contains(&offset_mhz) {
|
||||
bail!("Configured offset {offset_mhz}MHz is outside of the allowed range",);
|
||||
bail!("Configured offset {offset_mhz}MHz is outside of the allowed range");
|
||||
}
|
||||
|
||||
debug!("writing offset {offset_khz}KHz to point {i}");
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
use easy_fuser::{
|
||||
FuseHandler,
|
||||
templates::{
|
||||
delegate_fs,
|
||||
fuse_parallel::prelude::*,
|
||||
fuse_presets::{
|
||||
DefaultFuseHandler,
|
||||
mirror_fs::{MirrorFsReadOnly, MirrorFsTrait},
|
||||
},
|
||||
types::{
|
||||
BorrowedFileHandle, FUSESetXAttrFlags, FUSEWriteFlags, FileAttribute, FuseResult,
|
||||
OpenFlags, SetAttrRequest,
|
||||
},
|
||||
};
|
||||
use std::{
|
||||
ffi::OsStr,
|
||||
@@ -16,27 +13,37 @@ use std::{
|
||||
};
|
||||
|
||||
pub struct MockSysfs {
|
||||
inner: MirrorFsReadOnly,
|
||||
mirror_fs: MirrorFsReadOnly,
|
||||
default_fs: DefaultFuseHandler<PathBuf>,
|
||||
pub writes: Arc<Mutex<Vec<(PathBuf, String)>>>,
|
||||
}
|
||||
|
||||
impl MockSysfs {
|
||||
pub fn new(source_path: PathBuf) -> Self {
|
||||
MockSysfs {
|
||||
inner: MirrorFsReadOnly::new(source_path, DefaultFuseHandler::new()),
|
||||
mirror_fs: MirrorFsReadOnly::new(source_path),
|
||||
default_fs: DefaultFuseHandler::new(),
|
||||
writes: Arc::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FuseHandler<PathBuf> for MockSysfs {
|
||||
fn get_inner(&self) -> &dyn FuseHandler<PathBuf> {
|
||||
&self.inner
|
||||
}
|
||||
impl FuseHandler for MockSysfs {
|
||||
type TId = PathBuf;
|
||||
|
||||
delegate_fs! { mirror_fs, [
|
||||
flush, fsync, lseek, read, release, access, getattr, listxattr, lookup, open, readdir,
|
||||
readlink
|
||||
] }
|
||||
|
||||
delegate_fs! { default_fs, [
|
||||
copy_file_range, fallocate, create, mkdir, mknod, removexattr, rename, rmdir, symlink,
|
||||
unlink, bmap, forget, fsyncdir, getlk, ioctl, link, opendir, releasedir, setlk, statfs
|
||||
] }
|
||||
|
||||
fn write(
|
||||
&self,
|
||||
_req: &easy_fuser::prelude::RequestInfo,
|
||||
_req: &RequestInfo,
|
||||
file_id: PathBuf,
|
||||
_file_handle: BorrowedFileHandle,
|
||||
_seek: std::io::SeekFrom,
|
||||
@@ -55,7 +62,7 @@ impl FuseHandler<PathBuf> for MockSysfs {
|
||||
|
||||
fn setattr(
|
||||
&self,
|
||||
req: &easy_fuser::prelude::RequestInfo,
|
||||
req: &RequestInfo,
|
||||
file_id: PathBuf,
|
||||
_attrs: SetAttrRequest,
|
||||
) -> FuseResult<FileAttribute> {
|
||||
@@ -64,7 +71,7 @@ impl FuseHandler<PathBuf> for MockSysfs {
|
||||
|
||||
fn getxattr(
|
||||
&self,
|
||||
_req: &easy_fuser::prelude::RequestInfo,
|
||||
_req: &RequestInfo,
|
||||
_file_id: PathBuf,
|
||||
_name: &OsStr,
|
||||
_size: u32,
|
||||
@@ -74,7 +81,7 @@ impl FuseHandler<PathBuf> for MockSysfs {
|
||||
|
||||
fn setxattr(
|
||||
&self,
|
||||
_req: &easy_fuser::prelude::RequestInfo,
|
||||
_req: &RequestInfo,
|
||||
_file_id: PathBuf,
|
||||
_name: &OsStr,
|
||||
_value: Vec<u8>,
|
||||
|
||||
@@ -87,8 +87,13 @@ async fn apply_settings() {
|
||||
let mock_fs = MockSysfs::new(device_dir.path());
|
||||
let writes = mock_fs.writes.clone();
|
||||
|
||||
let mount = easy_fuser::spawn_mount(mock_fs, mock_fs_dir.path(), &[], 1)
|
||||
.expect("Could not mount mock fs");
|
||||
let mount = easy_fuser::fuse_parallel::spawn_mount(
|
||||
mock_fs,
|
||||
mock_fs_dir.path(),
|
||||
&[],
|
||||
Some(1),
|
||||
)
|
||||
.expect("Could not mount mock fs");
|
||||
|
||||
let handler =
|
||||
Handler::with_base_path(mock_fs_dir.path(), Config::default(), &pci_db)
|
||||
|
||||
+7
-7
@@ -25,13 +25,13 @@ serde_with = { workspace = true }
|
||||
serde_norway = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
indexmap = { workspace = true }
|
||||
gtk = { version = "0.10.3", package = "gtk4", features = [
|
||||
gtk = { version = "0.11.4", package = "gtk4", features = [
|
||||
"v4_6",
|
||||
] } # TODO: bump the feature to 4_14 and figure out all the deprecations
|
||||
|
||||
adw = { package = "libadwaita", version = "0.8.1", features = ["v1_5"] }
|
||||
relm4 = { version = "0.10.1", features = ["libadwaita"] }
|
||||
relm4-components = "0.10.1"
|
||||
adw = { package = "libadwaita", version = "0.9.2", features = ["v1_5"] }
|
||||
relm4 = { version = "0.11.0", features = ["libadwaita"] }
|
||||
relm4-components = "0.11.0"
|
||||
|
||||
i18n-embed = { workspace = true }
|
||||
i18n-embed-fl = { workspace = true }
|
||||
@@ -43,10 +43,10 @@ plotters = { version = "0.3.7", default-features = false, features = [
|
||||
"full_palette",
|
||||
"point_series",
|
||||
] }
|
||||
plotters-cairo = "0.8.0"
|
||||
cairo-rs = { version = "0.21", default-features = false }
|
||||
plotters-cairo = "0.9.0"
|
||||
cairo-rs = { version = "0.22", default-features = false }
|
||||
|
||||
thread-priority = "3.0.0"
|
||||
thread-priority = "3.1.1"
|
||||
|
||||
divan = { workspace = true, optional = true }
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ use gtk::subclass::prelude::*;
|
||||
glib::wrapper! {
|
||||
pub struct InfoRow(ObjectSubclass<imp::InfoRow>)
|
||||
@extends gtk::Box, gtk::Widget,
|
||||
@implements gtk::Orientable, gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
|
||||
@implements gtk::Orientable, gtk::Buildable, gtk::ConstraintTarget;
|
||||
}
|
||||
|
||||
impl InfoRow {
|
||||
|
||||
@@ -4,7 +4,7 @@ use gtk::glib::{self, Object};
|
||||
glib::wrapper! {
|
||||
pub struct InfoRowLevel(ObjectSubclass<imp::InfoRowLevel>)
|
||||
@extends InfoRow, gtk::Box, gtk::Widget,
|
||||
@implements gtk::Orientable, gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
|
||||
@implements gtk::Orientable, gtk::Buildable, gtk::ConstraintTarget;
|
||||
}
|
||||
|
||||
impl InfoRowLevel {
|
||||
|
||||
@@ -12,7 +12,7 @@ use tracing::debug;
|
||||
glib::wrapper! {
|
||||
pub struct OcAdjustment(ObjectSubclass<imp::OcAdjustment>)
|
||||
@extends gtk::Adjustment,
|
||||
@implements gtk::Accessible, gtk::Actionable, gtk::Buildable, gtk::ConstraintTarget;
|
||||
@implements gtk::Actionable, gtk::Buildable, gtk::ConstraintTarget;
|
||||
}
|
||||
|
||||
impl Default for OcAdjustment {
|
||||
|
||||
@@ -10,7 +10,7 @@ use gtk::{
|
||||
glib::wrapper! {
|
||||
pub struct PageSection(ObjectSubclass<imp::PageSection>)
|
||||
@extends gtk::Box, gtk::Widget,
|
||||
@implements gtk::Orientable, gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
|
||||
@implements gtk::Orientable, gtk::Buildable, gtk::ConstraintTarget;
|
||||
}
|
||||
|
||||
impl PageSection {
|
||||
|
||||
@@ -11,7 +11,7 @@ use gtk::{
|
||||
glib::wrapper! {
|
||||
pub struct PageSectionExpander(ObjectSubclass<imp::PageSectionExpander>)
|
||||
@extends gtk::Box, gtk::Widget,
|
||||
@implements gtk::Orientable, gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
|
||||
@implements gtk::Orientable, gtk::Buildable, gtk::ConstraintTarget;
|
||||
}
|
||||
|
||||
impl PageSectionExpander {
|
||||
|
||||
@@ -17,7 +17,7 @@ use std::sync::{Arc, RwLock};
|
||||
glib::wrapper! {
|
||||
pub struct Plot(ObjectSubclass<imp::Plot>)
|
||||
@extends gtk::Widget,
|
||||
@implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
|
||||
@implements gtk::Buildable, gtk::ConstraintTarget;
|
||||
}
|
||||
|
||||
impl Default for Plot {
|
||||
|
||||
@@ -206,8 +206,8 @@ impl StatsData {
|
||||
// Limit data to N seconds
|
||||
let last_timestamp = self
|
||||
.stats
|
||||
.iter()
|
||||
.flat_map(|(_, stats)| stats)
|
||||
.values()
|
||||
.flatten()
|
||||
.map(|(date_time, _)| *date_time)
|
||||
.next_back()
|
||||
.unwrap_or_default();
|
||||
|
||||
@@ -23,4 +23,4 @@ clap = { version = "4.6.1", features = ["derive"], optional = true }
|
||||
|
||||
|
||||
[build-dependencies]
|
||||
vergen = { version = "8.3.2", features = ["git", "gitcl"] }
|
||||
vergen-gitcl = "10.0.1"
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
use vergen::EmitBuilder;
|
||||
use vergen_gitcl::{Emitter, Gitcl};
|
||||
|
||||
fn main() {
|
||||
EmitBuilder::builder().git_sha(true).emit().unwrap()
|
||||
Emitter::default()
|
||||
.default_on_error()
|
||||
.add_instructions(&Gitcl::builder().sha(true).build())
|
||||
.unwrap()
|
||||
.emit()
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ configure:
|
||||
steps:
|
||||
- cmd: curl -o /tmp/install_rust.sh $RUSTUP_URL
|
||||
- cmd: sh /tmp/install_rust.sh -y
|
||||
- cmd: bash -c "source $HOME/.cargo/env && rustup toolchain install 1.93.0"
|
||||
- cmd: bash -c "source $HOME/.cargo/env && rustup toolchain install 1.97.0"
|
||||
- cmd: pacman -Syu --noconfirm
|
||||
pkg: true
|
||||
build:
|
||||
@@ -39,4 +39,3 @@ build:
|
||||
install:
|
||||
steps:
|
||||
- cmd: bash -c "cd $PKGER_BLD_DIR/LACT && DESTDIR=$PKGER_OUT_DIR PREFIX=/usr make install"
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ configure:
|
||||
steps:
|
||||
- cmd: curl -o /tmp/install_rust.sh $RUSTUP_URL
|
||||
- cmd: sh /tmp/install_rust.sh -y
|
||||
- cmd: bash -c "source $HOME/.cargo/env && rustup toolchain install 1.93.0"
|
||||
- cmd: bash -c "source $HOME/.cargo/env && rustup toolchain install 1.97.0"
|
||||
- cmd: pacman -Syu --noconfirm
|
||||
pkg: true
|
||||
build:
|
||||
@@ -41,4 +41,3 @@ build:
|
||||
install:
|
||||
steps:
|
||||
- cmd: bash -c "cd $PKGER_BLD_DIR/LACT && DESTDIR=$PKGER_OUT_DIR PREFIX=/usr make install"
|
||||
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
[toolchain]
|
||||
channel = "1.93.0"
|
||||
channel = "1.97.0"
|
||||
|
||||
Reference in New Issue
Block a user