From 370d64db6becc60beb69c61703657153ab211979 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Tue, 2 Jul 2024 13:53:33 -0400 Subject: [PATCH 01/17] Got serde working on values --- Cargo.lock | 72 ++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 14 ++++++-- examples/serde.rs | 22 ++++++++++++ src/containers/symbol.rs | 1 + src/containers/values.rs | 1 + src/optimizers/mod.rs | 4 +-- src/residuals/between.rs | 6 ++-- src/residuals/prior.rs | 10 +++--- src/residuals/traits.rs | 5 ++- src/variables/macros.rs | 24 +++++++++++++- src/variables/se2.rs | 4 +++ src/variables/se3.rs | 4 +++ src/variables/so2.rs | 4 +++ src/variables/so3.rs | 4 +++ src/variables/traits.rs | 15 +-------- src/variables/vector.rs | 4 +++ 16 files changed, 164 insertions(+), 30 deletions(-) create mode 100644 examples/serde.rs diff --git a/Cargo.lock b/Cargo.lock index dc1ba0e..3b1ed21 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -390,6 +390,16 @@ dependencies = [ "syn", ] +[[package]] +name = "erased-serde" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" +dependencies = [ + "serde", + "typeid", +] + [[package]] name = "faer" version = "0.19.1" @@ -742,6 +752,18 @@ dependencies = [ "png", ] +[[package]] +name = "inventory" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + [[package]] name = "jpeg-decoder" version = "0.3.1" @@ -950,6 +972,7 @@ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "bytemuck", "num-traits", + "serde", ] [[package]] @@ -1225,6 +1248,12 @@ dependencies = [ "semver", ] +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + [[package]] name = "safe_arch" version = "0.7.2" @@ -1261,6 +1290,8 @@ dependencies = [ "plotters", "pretty_env_logger", "serde", + "serde_json", + "typetag", ] [[package]] @@ -1295,6 +1326,17 @@ dependencies = [ "syn", ] +[[package]] +name = "serde_json" +version = "1.0.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +dependencies = [ + "itoa", + "ryu", + "serde", +] + [[package]] name = "simba" version = "0.8.1" @@ -1374,12 +1416,42 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" +[[package]] +name = "typeid" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "059d83cc991e7a42fc37bd50941885db0888e34209f8cfd9aab07ddec03bc9cf" + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "typetag" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "661d18414ec032a49ece2d56eee03636e43c4e8d577047ab334c0ba892e29aaf" +dependencies = [ + "erased-serde", + "inventory", + "once_cell", + "serde", + "typetag-impl", +] + +[[package]] +name = "typetag-impl" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "unicode-ident" version = "1.0.12" diff --git a/Cargo.toml b/Cargo.toml index ea461c5..ef7a072 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,18 +4,24 @@ version = "0.1.0" edition = "2021" [dependencies] +# base ahash = "0.8.11" derive_more = "0.99.17" paste = "1.0.15" downcast-rs = "1.2.1" +log = "0.4.21" +# numerical faer = { version = "0.19.0", default-features = false, features = ["perf-warn", "std"] } faer-ext = { version = "0.2.0", features = ["nalgebra"] } nalgebra = { version = "0.32.5", features = ["compare"] } num-dual = "0.9.1" matrixcompare-core = { version = "0.1", optional = true } + +# serialization serde = {version = "1.0.203", optional = true } -log = "0.4.21" +typetag = {version = "0.2.16", optional = true } +serde_json = { version = "1.0.120", optional = true, features=["float_roundtrip"]} [features] @@ -23,10 +29,14 @@ f32 = [] left = [] fake_exp = [] compare = ["dep:matrixcompare-core", "nalgebra/compare", "faer/matrixcompare"] -serde = ["dep:serde", "nalgebra/serde", "faer/serde", "ahash/serde"] +serde = ["dep:serde", "dep:typetag", "dep:serde_json", "nalgebra/serde-serialize", "faer/serde", "ahash/serde"] multithread = ["faer/rayon"] [dev-dependencies] matrixcompare = "0.3.0" plotters = "0.3.6" pretty_env_logger = "0.4" + +[[example]] +name = "serde" +required-features=["serde"] \ No newline at end of file diff --git a/examples/serde.rs b/examples/serde.rs new file mode 100644 index 0000000..9763fcb --- /dev/null +++ b/examples/serde.rs @@ -0,0 +1,22 @@ +use samrs::{ + containers::{Values, X}, + variables::{SE2, SO2}, +}; +use serde_json; + +fn main() { + let x = SO2::from_theta(0.6); + let y = SE2::new(1.0, 2.0, 0.3); + let mut values = Values::new(); + values.insert(X(0), x); + values.insert(X(1), y); + + let serialized = serde_json::to_string(&values).unwrap(); + println!("serialized = {}", serialized); + + // Convert the JSON string back to a Point. + let deserialized: Values = serde_json::from_str(&serialized).unwrap(); + + // Prints deserialized = Point { x: 1, y: 2 } + println!("deserialized = {:?}", deserialized); +} diff --git a/src/containers/symbol.rs b/src/containers/symbol.rs index 60ec1e2..59ac071 100644 --- a/src/containers/symbol.rs +++ b/src/containers/symbol.rs @@ -10,6 +10,7 @@ const CHR_MASK: u64 = (char::MAX as u64) << IDX_BITS; const IDX_MASK: u64 = !CHR_MASK; #[derive(Clone, Eq, Hash, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Symbol(u64); impl Symbol { diff --git a/src/containers/values.rs b/src/containers/values.rs index ae4d12c..af2e28d 100644 --- a/src/containers/values.rs +++ b/src/containers/values.rs @@ -9,6 +9,7 @@ use crate::{linear::LinearValues, variables::VariableSafe}; // we can just use dtype rather than using generics with Numeric #[derive(Clone)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Values { values: AHashMap>, } diff --git a/src/optimizers/mod.rs b/src/optimizers/mod.rs index 4a70307..1deac3d 100644 --- a/src/optimizers/mod.rs +++ b/src/optimizers/mod.rs @@ -22,12 +22,12 @@ pub mod test { factors::Factor, linalg::{AllocatorBuffer, Const, DualAllocator, DualVector, VectorX}, residuals::{BetweenResidual, PriorResidual}, - variables::Variable, + variables::{Variable, VariableSafe}, }; pub fn optimize_prior() where - T: 'static + Variable, Alias = T>, + T: 'static + Variable, Alias = T> + VariableSafe, O: Optimizer, { let t = VectorX::from_fn(T::DIM, |_, i| ((i + 1) as dtype) / 10.0); diff --git a/src/residuals/between.rs b/src/residuals/between.rs index 47020f9..20235b6 100644 --- a/src/residuals/between.rs +++ b/src/residuals/between.rs @@ -16,7 +16,7 @@ use crate::{ Numeric, VectorX, }, - variables::Variable, + variables::{Variable, VariableSafe}, }; // Between Variable @@ -31,7 +31,7 @@ impl BetweenResidual

{ } } -impl = P> + 'static> Residual2 for BetweenResidual

+impl = P> + VariableSafe + 'static> Residual2 for BetweenResidual

where AllocatorBuffer>: Sync + Send, DefaultAllocator: DualAllocator>, @@ -55,7 +55,7 @@ where AllocatorBuffer>: Sync + Send, DefaultAllocator: DualAllocator>, DualVector>: Copy, - P: Variable = P> + 'static, + P: Variable = P> + VariableSafe + 'static, P::Dim: DimNameAdd, { type DimOut = ::DimOut; diff --git a/src/residuals/prior.rs b/src/residuals/prior.rs index ec7969b..fb6d718 100644 --- a/src/residuals/prior.rs +++ b/src/residuals/prior.rs @@ -14,7 +14,7 @@ use crate::{ Numeric, VectorX, }, - variables::Variable, + variables::{Variable, VariableSafe}, }; #[derive(Clone, Debug, derive_more::Display)] @@ -28,7 +28,7 @@ impl = P>> PriorResidual

{ } } -impl = P> + 'static> Residual1 for PriorResidual

+impl = P> + VariableSafe + 'static> Residual1 for PriorResidual

where AllocatorBuffer: Sync + Send, DefaultAllocator: DualAllocator, @@ -44,7 +44,7 @@ where } } -impl = P> + 'static> Residual for PriorResidual

+impl = P> + VariableSafe + 'static> Residual for PriorResidual

where AllocatorBuffer: Sync + Send, DefaultAllocator: DualAllocator, @@ -70,7 +70,7 @@ mod test { use crate::{ containers::X, linalg::{dvector, DefaultAllocator, Diff, DualAllocator, NumericalDiff}, - variables::{Vector3, SE3, SO3}, + variables::{VariableSafe, Vector3, SE3, SO3}, }; #[cfg(not(feature = "f32"))] @@ -85,7 +85,7 @@ mod test { fn test_prior_jacobian

(prior: P) where - P: Variable = P> + 'static, + P: Variable = P> + VariableSafe + 'static, AllocatorBuffer: Sync + Send, DefaultAllocator: DualAllocator, DualVector: Copy, diff --git a/src/residuals/traits.rs b/src/residuals/traits.rs index 03eeded..81bea37 100644 --- a/src/residuals/traits.rs +++ b/src/residuals/traits.rs @@ -4,7 +4,7 @@ use crate::{ containers::{Symbol, Values}, dtype, linalg::{Diff, DiffResult, DimName, MatrixX, Numeric, VectorX}, - variables::Variable, + variables::{Variable, VariableSafe}, }; type Alias = ::Alias; @@ -57,7 +57,6 @@ impl ResidualSafe for T { } // ------------------------- Use Macro to create residuals with set sizes ------------------------- -// // use paste::paste; macro_rules! residual_maker { @@ -66,7 +65,7 @@ macro_rules! residual_maker { pub trait []: Residual { $( - type $var: Variable = Self::$var>; + type $var: Variable = Self::$var> + VariableSafe; )* type DimIn: DimName; type DimOut: DimName; diff --git a/src/variables/macros.rs b/src/variables/macros.rs index 230dd80..306b21b 100644 --- a/src/variables/macros.rs +++ b/src/variables/macros.rs @@ -9,7 +9,7 @@ macro_rules! assert_variable_eq { ($x:expr, $y:expr, comp = abs, tol = $tol:expr) => { matrixcompare::assert_matrix_eq!( $x.ominus(&$y), - VectorX::zeros($x.dim()), + VectorX::zeros($crate::variables::traits::Variable::dim(&$x)), comp = abs, tol = $tol ); @@ -158,3 +158,25 @@ macro_rules! test_lie { } }; } + +#[macro_export] +macro_rules! impl_variablesafe { +($($var:ident),*) => { + $( + #[cfg_attr(feature = "serde", typetag::serde)] + impl $crate::variables::VariableSafe for $var { + fn clone_box(&self) -> Box { + Box::new((*self).clone()) + } + + fn dim(&self) -> usize { + $crate::variables::Variable::dim(self) + } + + fn oplus_mut(&mut self, delta: VectorViewX) { + *self = self.oplus(delta); + } + } + )* + }; +} diff --git a/src/variables/se2.rs b/src/variables/se2.rs index 680284d..dbd3580 100644 --- a/src/variables/se2.rs +++ b/src/variables/se2.rs @@ -3,6 +3,7 @@ use std::{fmt, ops}; use super::Vector3; use crate::{ dtype, + impl_variablesafe, linalg::{ dvector, AllocatorBuffer, @@ -25,7 +26,10 @@ use crate::{ variables::{MatrixLieGroup, Variable, SO2}, }; +impl_variablesafe!(SE2); + #[derive(Clone)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct SE2 { rot: SO2, xy: Vector2, diff --git a/src/variables/se3.rs b/src/variables/se3.rs index 5b5d94a..0d2be51 100644 --- a/src/variables/se3.rs +++ b/src/variables/se3.rs @@ -3,6 +3,7 @@ use std::{fmt, ops}; use super::Vector6; use crate::{ dtype, + impl_variablesafe, linalg::{ AllocatorBuffer, Const, @@ -25,7 +26,10 @@ use crate::{ variables::{MatrixLieGroup, Variable, SO3}, }; +impl_variablesafe!(SE3); + #[derive(Clone, Debug)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct SE3 { rot: SO3, xyz: Vector3, diff --git a/src/variables/so2.rs b/src/variables/so2.rs index 6ee3a1a..009d9e9 100644 --- a/src/variables/so2.rs +++ b/src/variables/so2.rs @@ -3,6 +3,7 @@ use std::{fmt, ops}; use super::{Vector1, Vector2}; use crate::{ dtype, + impl_variablesafe, linalg::{ dvector, AllocatorBuffer, @@ -25,7 +26,10 @@ use crate::{ variables::{MatrixLieGroup, Variable}, }; +impl_variablesafe!(SO2); + #[derive(Clone)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct SO2 { a: D, b: D, diff --git a/src/variables/so3.rs b/src/variables/so3.rs index 9a9984d..315f44b 100644 --- a/src/variables/so3.rs +++ b/src/variables/so3.rs @@ -2,6 +2,7 @@ use std::{fmt, ops}; use crate::{ dtype, + impl_variablesafe, linalg::{ dvector, AllocatorBuffer, @@ -24,7 +25,10 @@ use crate::{ variables::{MatrixLieGroup, Variable}, }; +impl_variablesafe!(SO3); + #[derive(Clone)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct SO3 { pub xyzw: Vector4, } diff --git a/src/variables/traits.rs b/src/variables/traits.rs index 29650aa..76f4652 100644 --- a/src/variables/traits.rs +++ b/src/variables/traits.rs @@ -91,6 +91,7 @@ pub trait Variable: Clone + Sized + Display + Debug { } } +#[cfg_attr(feature = "serde", typetag::serde)] pub trait VariableSafe: Debug + Display + Downcast { fn clone_box(&self) -> Box; @@ -99,20 +100,6 @@ pub trait VariableSafe: Debug + Display + Downcast { fn oplus_mut(&mut self, delta: VectorViewX); } -impl VariableSafe for T { - fn clone_box(&self) -> Box { - Box::new((*self).clone()) - } - - fn dim(&self) -> usize { - self.dim() - } - - fn oplus_mut(&mut self, delta: VectorViewX) { - *self = self.oplus(delta); - } -} - impl_downcast!(VariableSafe); impl Clone for Box { diff --git a/src/variables/vector.rs b/src/variables/vector.rs index d363cdf..2da682e 100644 --- a/src/variables/vector.rs +++ b/src/variables/vector.rs @@ -1,5 +1,7 @@ +use super::{Vector1, Vector2, Vector3, Vector4, Vector5, Vector6}; use crate::{ dtype, + impl_variablesafe, linalg::{ AllocatorBuffer, Const, @@ -16,6 +18,8 @@ use crate::{ variables::Variable, }; +impl_variablesafe!(Vector1, Vector2, Vector3, Vector4, Vector5, Vector6); + // ------------------------- Our needs ------------------------- // impl Variable for Vector { type Dim = Const; From 4ec3726d1b353d4bac9fcc9c52d65c7c7e38e4f4 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Tue, 2 Jul 2024 14:21:00 -0400 Subject: [PATCH 02/17] Added serialization for robust and noise --- src/containers/symbol.rs | 4 ++++ src/factors/factor.rs | 15 ++++++++------- src/noise/gaussian.rs | 16 ++++++++++++++++ src/noise/mod.rs | 33 +++++++++++++++++++++------------ src/optimizers/mod.rs | 2 ++ src/robust/mod.rs | 33 ++++++++++++++++++++++++++------- src/variables/macros.rs | 6 +++--- src/variables/se2.rs | 4 ++-- src/variables/se3.rs | 4 ++-- src/variables/so2.rs | 4 ++-- src/variables/so3.rs | 4 ++-- src/variables/traits.rs | 2 +- src/variables/vector.rs | 12 +++++++++--- 13 files changed, 98 insertions(+), 41 deletions(-) diff --git a/src/containers/symbol.rs b/src/containers/symbol.rs index 59ac071..d82fda1 100644 --- a/src/containers/symbol.rs +++ b/src/containers/symbol.rs @@ -14,6 +14,10 @@ const IDX_MASK: u64 = !CHR_MASK; pub struct Symbol(u64); impl Symbol { + pub fn new_raw(key: u64) -> Self { + Symbol(key) + } + pub fn chr(&self) -> char { ((self.0 & CHR_MASK) >> IDX_BITS) as u8 as char } diff --git a/src/factors/factor.rs b/src/factors/factor.rs index 1fdaded..0213328 100644 --- a/src/factors/factor.rs +++ b/src/factors/factor.rs @@ -5,7 +5,7 @@ use crate::{ linear::LinearFactor, noise::{GaussianNoise, NoiseModel, NoiseModelSafe}, residuals::{Residual, ResidualSafe}, - robust::{RobustCost, RobustCostSafe, L2}, + robust::{RobustCostSafe, L2}, }; pub struct Factor { @@ -21,9 +21,10 @@ impl Factor { residual: R, ) -> Self where - R: 'static + Residual, DimOut = Const>, + R: 'static + Residual, DimOut = Const> + ResidualSafe, AllocatorBuffer: Sync + Send, DefaultAllocator: DualAllocator, + GaussianNoise: NoiseModelSafe, { Self { keys: keys.to_vec(), @@ -39,8 +40,8 @@ impl Factor { noise: N, ) -> Self where - R: 'static + Residual, DimOut = Const>, - N: 'static + NoiseModel>, + R: 'static + Residual, DimOut = Const> + ResidualSafe, + N: 'static + NoiseModel> + NoiseModelSafe, AllocatorBuffer: Sync + Send, DefaultAllocator: DualAllocator, { @@ -59,11 +60,11 @@ impl Factor { robust: C, ) -> Self where - R: 'static + Residual, DimOut = Const>, + R: 'static + Residual, DimOut = Const> + ResidualSafe, AllocatorBuffer: Sync + Send, DefaultAllocator: DualAllocator, - N: 'static + NoiseModel>, - C: 'static + RobustCost, + N: 'static + NoiseModel> + NoiseModelSafe, + C: 'static + RobustCostSafe, { Self { keys: keys.to_vec(), diff --git a/src/noise/gaussian.rs b/src/noise/gaussian.rs index 5a412f0..818e8d0 100644 --- a/src/noise/gaussian.rs +++ b/src/noise/gaussian.rs @@ -16,7 +16,23 @@ use crate::{ }, }; +impl_safe_noise!( + GaussianNoise<1>, + GaussianNoise<2>, + GaussianNoise<3>, + GaussianNoise<4>, + GaussianNoise<5>, + GaussianNoise<6>, + GaussianNoise<7>, + GaussianNoise<8>, + GaussianNoise<9>, + GaussianNoise<10>, + GaussianNoise<11>, + GaussianNoise<12>, +); + #[derive(Clone, Debug)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct GaussianNoise { sqrt_inf: Matrix, } diff --git a/src/noise/mod.rs b/src/noise/mod.rs index d81b8f4..db9c6e0 100644 --- a/src/noise/mod.rs +++ b/src/noise/mod.rs @@ -11,6 +11,7 @@ pub trait NoiseModel: Sized { fn whiten_mat(&self, m: MatrixViewX) -> MatrixX; } +#[cfg_attr(feature = "serde", typetag::serde(tag = "type"))] pub trait NoiseModelSafe { fn dim(&self) -> usize; @@ -19,18 +20,26 @@ pub trait NoiseModelSafe { fn whiten_mat(&self, m: MatrixViewX) -> MatrixX; } -impl NoiseModelSafe for T { - fn dim(&self) -> usize { - self.dim() - } - - fn whiten_vec(&self, v: VectorViewX) -> VectorX { - self.whiten_vec(v) - } - - fn whiten_mat(&self, m: MatrixViewX) -> MatrixX { - self.whiten_mat(m) - } +#[macro_export] +macro_rules! impl_safe_noise { + ($($var:ident $(< $num:literal >)? ),* $(,)?) => { + $( + #[cfg_attr(feature = "serde", typetag::serde)] + impl $crate::noise::NoiseModelSafe for $var$(< $num >)? { + fn dim(&self) -> usize { + $crate::noise::NoiseModel::dim(self) + } + + fn whiten_vec(&self, v: VectorViewX) -> VectorX { + $crate::noise::NoiseModel::whiten_vec(self, v) + } + + fn whiten_mat(&self, m: MatrixViewX) -> MatrixX { + $crate::noise::NoiseModel::whiten_mat(self, m) + } + } + )* + }; } mod gaussian; diff --git a/src/optimizers/mod.rs b/src/optimizers/mod.rs index 1deac3d..e4b83e2 100644 --- a/src/optimizers/mod.rs +++ b/src/optimizers/mod.rs @@ -21,6 +21,7 @@ pub mod test { dtype, factors::Factor, linalg::{AllocatorBuffer, Const, DualAllocator, DualVector, VectorX}, + noise::{GaussianNoise, NoiseModelSafe}, residuals::{BetweenResidual, PriorResidual}, variables::{Variable, VariableSafe}, }; @@ -28,6 +29,7 @@ pub mod test { pub fn optimize_prior() where T: 'static + Variable, Alias = T> + VariableSafe, + GaussianNoise: NoiseModelSafe, O: Optimizer, { let t = VectorX::from_fn(T::DIM, |_, i| ((i + 1) as dtype) / 10.0); diff --git a/src/robust/mod.rs b/src/robust/mod.rs index 71571f8..55cb2eb 100644 --- a/src/robust/mod.rs +++ b/src/robust/mod.rs @@ -7,23 +7,35 @@ pub trait RobustCost: Default { fn weight(&self, d2: dtype) -> dtype; } +#[cfg_attr(feature = "serde", typetag::serde(tag = "type"))] pub trait RobustCostSafe { fn loss(&self, d2: dtype) -> dtype; fn weight(&self, d2: dtype) -> dtype; } -impl RobustCostSafe for T { - fn loss(&self, d2: dtype) -> dtype { - self.loss(d2) - } +#[macro_export] +macro_rules! impl_safe_robust { + ($($var:ident),*) => { + $( + #[cfg_attr(feature = "serde", typetag::serde)] + impl $crate::robust::RobustCostSafe for $var { + fn loss(&self, d2: dtype) -> dtype { + $crate::robust::RobustCost::loss(self, d2) + } - fn weight(&self, d2: dtype) -> dtype { - self.weight(d2) - } + fn weight(&self, d2: dtype) -> dtype { + $crate::robust::RobustCost::weight(self, d2) + } + } + )* + }; } +impl_safe_robust!(L2, L1, Huber, Fair, Cauchy, GemanMcClure, Welsch, Tukey); + // ------------------------- L2 Norm ------------------------- // +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct L2; impl Default for L2 { @@ -43,6 +55,7 @@ impl RobustCost for L2 { } // ------------------------- L1 Norm ------------------------- // +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct L1; impl Default for L1 { @@ -66,6 +79,7 @@ impl RobustCost for L1 { } // ------------------------- Huber ------------------------- // +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Huber { k: dtype, } @@ -103,6 +117,7 @@ impl RobustCost for Huber { } // ------------------------- Fair ------------------------- // +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Fair { c: dtype, } @@ -131,6 +146,7 @@ impl RobustCost for Fair { } // ------------------------- Cauchy ------------------------- // +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Cauchy { c2: dtype, } @@ -160,6 +176,7 @@ impl RobustCost for Cauchy { } // ------------------------- Geman-McClure ------------------------- // +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct GemanMcClure { c2: dtype, } @@ -191,6 +208,7 @@ impl RobustCost for GemanMcClure { } // ------------------------- Welsch ------------------------- // +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Welsch { c2: dtype, } @@ -220,6 +238,7 @@ impl RobustCost for Welsch { } // ------------------------- Tukey ------------------------- // +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Tukey { c2: dtype, } diff --git a/src/variables/macros.rs b/src/variables/macros.rs index 306b21b..4e3db1b 100644 --- a/src/variables/macros.rs +++ b/src/variables/macros.rs @@ -160,11 +160,11 @@ macro_rules! test_lie { } #[macro_export] -macro_rules! impl_variablesafe { -($($var:ident),*) => { +macro_rules! impl_safe_variable { +($($var:ident $(< $num:literal >)? ),* $(,)?) => { $( #[cfg_attr(feature = "serde", typetag::serde)] - impl $crate::variables::VariableSafe for $var { + impl $crate::variables::VariableSafe for $var$(< $num >)? { fn clone_box(&self) -> Box { Box::new((*self).clone()) } diff --git a/src/variables/se2.rs b/src/variables/se2.rs index dbd3580..2524425 100644 --- a/src/variables/se2.rs +++ b/src/variables/se2.rs @@ -3,7 +3,7 @@ use std::{fmt, ops}; use super::Vector3; use crate::{ dtype, - impl_variablesafe, + impl_safe_variable, linalg::{ dvector, AllocatorBuffer, @@ -26,7 +26,7 @@ use crate::{ variables::{MatrixLieGroup, Variable, SO2}, }; -impl_variablesafe!(SE2); +impl_safe_variable!(SE2); #[derive(Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/src/variables/se3.rs b/src/variables/se3.rs index 0d2be51..4242b87 100644 --- a/src/variables/se3.rs +++ b/src/variables/se3.rs @@ -3,7 +3,7 @@ use std::{fmt, ops}; use super::Vector6; use crate::{ dtype, - impl_variablesafe, + impl_safe_variable, linalg::{ AllocatorBuffer, Const, @@ -26,7 +26,7 @@ use crate::{ variables::{MatrixLieGroup, Variable, SO3}, }; -impl_variablesafe!(SE3); +impl_safe_variable!(SE3); #[derive(Clone, Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/src/variables/so2.rs b/src/variables/so2.rs index 009d9e9..0398874 100644 --- a/src/variables/so2.rs +++ b/src/variables/so2.rs @@ -3,7 +3,7 @@ use std::{fmt, ops}; use super::{Vector1, Vector2}; use crate::{ dtype, - impl_variablesafe, + impl_safe_variable, linalg::{ dvector, AllocatorBuffer, @@ -26,7 +26,7 @@ use crate::{ variables::{MatrixLieGroup, Variable}, }; -impl_variablesafe!(SO2); +impl_safe_variable!(SO2); #[derive(Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/src/variables/so3.rs b/src/variables/so3.rs index 315f44b..a71c205 100644 --- a/src/variables/so3.rs +++ b/src/variables/so3.rs @@ -2,7 +2,7 @@ use std::{fmt, ops}; use crate::{ dtype, - impl_variablesafe, + impl_safe_variable, linalg::{ dvector, AllocatorBuffer, @@ -25,7 +25,7 @@ use crate::{ variables::{MatrixLieGroup, Variable}, }; -impl_variablesafe!(SO3); +impl_safe_variable!(SO3); #[derive(Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/src/variables/traits.rs b/src/variables/traits.rs index 76f4652..5af15e4 100644 --- a/src/variables/traits.rs +++ b/src/variables/traits.rs @@ -91,7 +91,7 @@ pub trait Variable: Clone + Sized + Display + Debug { } } -#[cfg_attr(feature = "serde", typetag::serde)] +#[cfg_attr(feature = "serde", typetag::serde(tag = "type"))] pub trait VariableSafe: Debug + Display + Downcast { fn clone_box(&self) -> Box; diff --git a/src/variables/vector.rs b/src/variables/vector.rs index 2da682e..6464369 100644 --- a/src/variables/vector.rs +++ b/src/variables/vector.rs @@ -1,7 +1,6 @@ -use super::{Vector1, Vector2, Vector3, Vector4, Vector5, Vector6}; use crate::{ dtype, - impl_variablesafe, + impl_safe_variable, linalg::{ AllocatorBuffer, Const, @@ -18,7 +17,14 @@ use crate::{ variables::Variable, }; -impl_variablesafe!(Vector1, Vector2, Vector3, Vector4, Vector5, Vector6); +impl_safe_variable!( + Vector<1>, + Vector<2>, + Vector<3>, + Vector<4>, + Vector<5>, + Vector<6>, +); // ------------------------- Our needs ------------------------- // impl Variable for Vector { From d4f518646e24c8523ae4b804ff4eeac4c1aa3595 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Tue, 2 Jul 2024 14:46:32 -0400 Subject: [PATCH 03/17] Finalized saving graph --- examples/serde.rs | 41 +++++++++++++++++++++++++++++++++------ src/containers/graph.rs | 3 ++- src/factors/factor.rs | 2 ++ src/noise/mod.rs | 42 +++++++++++++++++++++++----------------- src/optimizers/mod.rs | 3 ++- src/residuals/between.rs | 23 +++++++++++++++++++++- src/residuals/macros.rs | 30 ++++++++++++++++++++++++++++ src/residuals/prior.rs | 23 +++++++++++++++++++++- src/residuals/traits.rs | 25 ++++-------------------- src/robust/mod.rs | 14 ++++++++++++-- 10 files changed, 155 insertions(+), 51 deletions(-) diff --git a/examples/serde.rs b/examples/serde.rs index 9763fcb..3e016de 100644 --- a/examples/serde.rs +++ b/examples/serde.rs @@ -1,22 +1,51 @@ use samrs::{ - containers::{Values, X}, + containers::{Graph, Values, X}, + factors::Factor, + noise::GaussianNoise, + residuals::{BetweenResidual, PriorResidual}, + robust::{GemanMcClure, Huber, L2}, variables::{SE2, SO2}, }; use serde_json; fn main() { + // ------------------------- Try with values ------------------------- // let x = SO2::from_theta(0.6); let y = SE2::new(1.0, 2.0, 0.3); let mut values = Values::new(); - values.insert(X(0), x); - values.insert(X(1), y); + values.insert(X(0), x.clone()); + values.insert(X(1), y.clone()); - let serialized = serde_json::to_string(&values).unwrap(); + let serialized = serde_json::to_string_pretty(&values).unwrap(); println!("serialized = {}", serialized); // Convert the JSON string back to a Point. let deserialized: Values = serde_json::from_str(&serialized).unwrap(); + println!("deserialized = {}", deserialized); - // Prints deserialized = Point { x: 1, y: 2 } - println!("deserialized = {:?}", deserialized); + // ------------------------- Try with graph ------------------------- // + let prior = PriorResidual::new(x); + let bet = BetweenResidual::new(y); + + let prior = Factor::new_full( + &[X(0)], + prior, + GaussianNoise::from_scalar_cov(0.1), + GemanMcClure::default(), + ); + let bet = Factor::new_full( + &[X(0), X(1)], + bet, + GaussianNoise::from_scalar_cov(10.0), + Huber::default(), + ); + let mut graph = Graph::new(); + graph.add_factor(prior); + graph.add_factor(bet); + + let serialized = serde_json::to_string_pretty(&graph).unwrap(); + println!("serialized = {}", serialized); + + let deserialized: Graph = serde_json::from_str(&serialized).unwrap(); + println!("deserialized = {:?}", graph); } diff --git a/src/containers/graph.rs b/src/containers/graph.rs index 220ef2a..869d8b2 100644 --- a/src/containers/graph.rs +++ b/src/containers/graph.rs @@ -3,7 +3,8 @@ use faer::sparse::SymbolicSparseColMat; use super::{Idx, Values, ValuesOrder}; use crate::{dtype, factors::Factor, linear::LinearGraph}; -#[derive(Default)] +#[derive(Default, Debug)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Graph { factors: Vec, } diff --git a/src/factors/factor.rs b/src/factors/factor.rs index 0213328..39f9aa3 100644 --- a/src/factors/factor.rs +++ b/src/factors/factor.rs @@ -8,6 +8,8 @@ use crate::{ robust::{RobustCostSafe, L2}, }; +#[derive(Debug)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Factor { pub keys: Vec, residual: Box, diff --git a/src/noise/mod.rs b/src/noise/mod.rs index db9c6e0..73e2ba7 100644 --- a/src/noise/mod.rs +++ b/src/noise/mod.rs @@ -1,5 +1,7 @@ +use std::fmt::{Debug, Display}; + use crate::linalg::{DimName, MatrixViewX, MatrixX, VectorViewX, VectorX}; -pub trait NoiseModel: Sized { +pub trait NoiseModel: Debug + Display { type Dim: DimName; fn dim(&self) -> usize { @@ -12,7 +14,7 @@ pub trait NoiseModel: Sized { } #[cfg_attr(feature = "serde", typetag::serde(tag = "type"))] -pub trait NoiseModelSafe { +pub trait NoiseModelSafe: Debug + Display { fn dim(&self) -> usize; fn whiten_vec(&self, v: VectorViewX) -> VectorX; @@ -22,23 +24,27 @@ pub trait NoiseModelSafe { #[macro_export] macro_rules! impl_safe_noise { - ($($var:ident $(< $num:literal >)? ),* $(,)?) => { - $( - #[cfg_attr(feature = "serde", typetag::serde)] - impl $crate::noise::NoiseModelSafe for $var$(< $num >)? { - fn dim(&self) -> usize { - $crate::noise::NoiseModel::dim(self) - } - - fn whiten_vec(&self, v: VectorViewX) -> VectorX { - $crate::noise::NoiseModel::whiten_vec(self, v) - } - - fn whiten_mat(&self, m: MatrixViewX) -> MatrixX { - $crate::noise::NoiseModel::whiten_mat(self, m) + ($($var:ident < $num:literal > ),* $(,)?) => { + use paste::paste; + paste!{ + $( + type [<$var $num>] = $var< $num >; + #[cfg_attr(feature = "serde", typetag::serde)] + impl $crate::noise::NoiseModelSafe for [<$var $num>]{ + fn dim(&self) -> usize { + $crate::noise::NoiseModel::dim(self) + } + + fn whiten_vec(&self, v: VectorViewX) -> VectorX { + $crate::noise::NoiseModel::whiten_vec(self, v) + } + + fn whiten_mat(&self, m: MatrixViewX) -> MatrixX { + $crate::noise::NoiseModel::whiten_mat(self, m) + } } - } - )* + )* + } }; } diff --git a/src/optimizers/mod.rs b/src/optimizers/mod.rs index e4b83e2..1436cc1 100644 --- a/src/optimizers/mod.rs +++ b/src/optimizers/mod.rs @@ -22,7 +22,7 @@ pub mod test { factors::Factor, linalg::{AllocatorBuffer, Const, DualAllocator, DualVector, VectorX}, noise::{GaussianNoise, NoiseModelSafe}, - residuals::{BetweenResidual, PriorResidual}, + residuals::{BetweenResidual, PriorResidual, ResidualSafe}, variables::{Variable, VariableSafe}, }; @@ -30,6 +30,7 @@ pub mod test { where T: 'static + Variable, Alias = T> + VariableSafe, GaussianNoise: NoiseModelSafe, + PriorResidual: ResidualSafe, O: Optimizer, { let t = VectorX::from_fn(T::DIM, |_, i| ((i + 1) as dtype) / 10.0); diff --git a/src/residuals/between.rs b/src/residuals/between.rs index 20235b6..ba77149 100644 --- a/src/residuals/between.rs +++ b/src/residuals/between.rs @@ -4,6 +4,7 @@ use super::{Residual, Residual2}; use crate::{ containers::{Symbol, Values}, dtype, + impl_safe_residual, linalg::{ AllocatorBuffer, Const, @@ -14,13 +15,33 @@ use crate::{ ForwardProp, MatrixX, Numeric, + Vector1, + Vector2, + Vector3, + Vector4, + Vector5, + Vector6, VectorX, }, - variables::{Variable, VariableSafe}, + variables::{Variable, VariableSafe, SE2, SE3, SO2, SO3}, }; +impl_safe_residual!( + BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, +); + // Between Variable #[derive(Clone, Debug, derive_more::Display)] +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub struct BetweenResidual { delta: P, } diff --git a/src/residuals/macros.rs b/src/residuals/macros.rs index 9331660..ed7dd5a 100644 --- a/src/residuals/macros.rs +++ b/src/residuals/macros.rs @@ -21,3 +21,33 @@ macro_rules! impl_residual { } }; } + +#[macro_export] +macro_rules! impl_safe_residual { + ($($var:ident < $T:ident > ),* $(,)?) => { + use paste::paste; + $( + paste!{ + type [<$var $T>] = $var< $T >; + #[cfg_attr(feature = "serde", typetag::serde)] + impl $crate::residuals::ResidualSafe for [<$var $T>] { + fn dim_in(&self) -> usize { + $crate::residuals::Residual::dim_in(self) + } + + fn dim_out(&self) -> usize { + $crate::residuals::Residual::dim_out(self) + } + + fn residual(&self, values: &$crate::containers::Values, keys: &[Symbol]) -> VectorX { + $crate::residuals::Residual::residual(self, values, keys) + } + + fn residual_jacobian(&self, values: &$crate::containers::Values, keys: &[Symbol]) -> DiffResult { + $crate::residuals::Residual::residual_jacobian(self, values, keys) + } + } + } + )* + }; +} diff --git a/src/residuals/prior.rs b/src/residuals/prior.rs index fb6d718..e4c61ed 100644 --- a/src/residuals/prior.rs +++ b/src/residuals/prior.rs @@ -2,6 +2,7 @@ use super::{Residual, Residual1}; use crate::{ containers::{Symbol, Values}, dtype, + impl_safe_residual, linalg::{ AllocatorBuffer, Const, @@ -12,12 +13,32 @@ use crate::{ ForwardProp, MatrixX, Numeric, + Vector1, + Vector2, + Vector3, + Vector4, + Vector5, + Vector6, VectorX, }, - variables::{Variable, VariableSafe}, + variables::{Variable, VariableSafe, SE2, SE3, SO2, SO3}, }; +impl_safe_residual!( + PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, +); + #[derive(Clone, Debug, derive_more::Display)] +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub struct PriorResidual { prior: P, } diff --git a/src/residuals/traits.rs b/src/residuals/traits.rs index 81bea37..6da240a 100644 --- a/src/residuals/traits.rs +++ b/src/residuals/traits.rs @@ -1,4 +1,4 @@ -use std::fmt; +use std::fmt::{Debug, Display}; use crate::{ containers::{Symbol, Values}, @@ -10,7 +10,7 @@ use crate::{ type Alias = ::Alias; // ------------------------- Base Residual Trait & Helpers ------------------------- // -pub trait Residual: fmt::Debug { +pub trait Residual: Debug + Display { type DimIn: DimName; type DimOut: DimName; type NumVars: DimName; @@ -28,7 +28,8 @@ pub trait Residual: fmt::Debug { fn residual_jacobian(&self, values: &Values, keys: &[Symbol]) -> DiffResult; } -pub trait ResidualSafe { +#[cfg_attr(feature = "serde", typetag::serde(tag = "type"))] +pub trait ResidualSafe: Debug + Display { fn dim_in(&self) -> usize; fn dim_out(&self) -> usize; @@ -38,24 +39,6 @@ pub trait ResidualSafe { fn residual_jacobian(&self, values: &Values, keys: &[Symbol]) -> DiffResult; } -impl ResidualSafe for T { - fn dim_in(&self) -> usize { - T::DimIn::USIZE - } - - fn dim_out(&self) -> usize { - T::DimOut::USIZE - } - - fn residual(&self, values: &Values, keys: &[Symbol]) -> VectorX { - self.residual(values, keys) - } - - fn residual_jacobian(&self, values: &Values, keys: &[Symbol]) -> DiffResult { - self.residual_jacobian(values, keys) - } -} - // ------------------------- Use Macro to create residuals with set sizes ------------------------- use paste::paste; diff --git a/src/robust/mod.rs b/src/robust/mod.rs index 55cb2eb..2d92331 100644 --- a/src/robust/mod.rs +++ b/src/robust/mod.rs @@ -1,14 +1,16 @@ +use std::fmt::{Debug, Display}; + use crate::dtype; // TODO: Consider changing names to \rho and w -pub trait RobustCost: Default { +pub trait RobustCost: Default + Debug { fn loss(&self, d2: dtype) -> dtype; fn weight(&self, d2: dtype) -> dtype; } #[cfg_attr(feature = "serde", typetag::serde(tag = "type"))] -pub trait RobustCostSafe { +pub trait RobustCostSafe: Debug { fn loss(&self, d2: dtype) -> dtype; fn weight(&self, d2: dtype) -> dtype; @@ -35,6 +37,7 @@ macro_rules! impl_safe_robust { impl_safe_robust!(L2, L1, Huber, Fair, Cauchy, GemanMcClure, Welsch, Tukey); // ------------------------- L2 Norm ------------------------- // +#[derive(Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct L2; @@ -55,6 +58,7 @@ impl RobustCost for L2 { } // ------------------------- L1 Norm ------------------------- // +#[derive(Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct L1; @@ -79,6 +83,7 @@ impl RobustCost for L1 { } // ------------------------- Huber ------------------------- // +#[derive(Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Huber { k: dtype, @@ -117,6 +122,7 @@ impl RobustCost for Huber { } // ------------------------- Fair ------------------------- // +#[derive(Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Fair { c: dtype, @@ -146,6 +152,7 @@ impl RobustCost for Fair { } // ------------------------- Cauchy ------------------------- // +#[derive(Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Cauchy { c2: dtype, @@ -176,6 +183,7 @@ impl RobustCost for Cauchy { } // ------------------------- Geman-McClure ------------------------- // +#[derive(Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct GemanMcClure { c2: dtype, @@ -208,6 +216,7 @@ impl RobustCost for GemanMcClure { } // ------------------------- Welsch ------------------------- // +#[derive(Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Welsch { c2: dtype, @@ -238,6 +247,7 @@ impl RobustCost for Welsch { } // ------------------------- Tukey ------------------------- // +#[derive(Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Tukey { c2: dtype, From 67ab52457500eac38951a64f7bf23d088378cfbd Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Tue, 2 Jul 2024 16:16:46 -0400 Subject: [PATCH 04/17] Move from type -> tag --- src/noise/mod.rs | 2 +- src/residuals/traits.rs | 2 +- src/robust/mod.rs | 2 +- src/variables/mod.rs | 2 +- src/variables/traits.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/noise/mod.rs b/src/noise/mod.rs index 73e2ba7..bf43605 100644 --- a/src/noise/mod.rs +++ b/src/noise/mod.rs @@ -13,7 +13,7 @@ pub trait NoiseModel: Debug + Display { fn whiten_mat(&self, m: MatrixViewX) -> MatrixX; } -#[cfg_attr(feature = "serde", typetag::serde(tag = "type"))] +#[cfg_attr(feature = "serde", typetag::serde(tag = "tag"))] pub trait NoiseModelSafe: Debug + Display { fn dim(&self) -> usize; diff --git a/src/residuals/traits.rs b/src/residuals/traits.rs index 6da240a..f5c8145 100644 --- a/src/residuals/traits.rs +++ b/src/residuals/traits.rs @@ -28,7 +28,7 @@ pub trait Residual: Debug + Display { fn residual_jacobian(&self, values: &Values, keys: &[Symbol]) -> DiffResult; } -#[cfg_attr(feature = "serde", typetag::serde(tag = "type"))] +#[cfg_attr(feature = "serde", typetag::serde(tag = "tag"))] pub trait ResidualSafe: Debug + Display { fn dim_in(&self) -> usize; diff --git a/src/robust/mod.rs b/src/robust/mod.rs index 2d92331..7922320 100644 --- a/src/robust/mod.rs +++ b/src/robust/mod.rs @@ -9,7 +9,7 @@ pub trait RobustCost: Default + Debug { fn weight(&self, d2: dtype) -> dtype; } -#[cfg_attr(feature = "serde", typetag::serde(tag = "type"))] +#[cfg_attr(feature = "serde", typetag::serde(tag = "tag"))] pub trait RobustCostSafe: Debug { fn loss(&self, d2: dtype) -> dtype; diff --git a/src/variables/mod.rs b/src/variables/mod.rs index af1903c..64db7fd 100644 --- a/src/variables/mod.rs +++ b/src/variables/mod.rs @@ -1,6 +1,6 @@ // ------------------------- Import all variable types ------------------------- // mod traits; -pub use traits::{MatrixLieGroup, Variable, VariableSafe}; +pub use traits::{MatrixLieGroup, Variable, VariableSafe, VariableSerialize}; mod so2; pub use so2::SO2; diff --git a/src/variables/traits.rs b/src/variables/traits.rs index 5af15e4..5f7649a 100644 --- a/src/variables/traits.rs +++ b/src/variables/traits.rs @@ -91,7 +91,7 @@ pub trait Variable: Clone + Sized + Display + Debug { } } -#[cfg_attr(feature = "serde", typetag::serde(tag = "type"))] +#[cfg_attr(feature = "serde", typetag::serde(tag = "tag"))] pub trait VariableSafe: Debug + Display + Downcast { fn clone_box(&self) -> Box; From a9ef5cc1453b5eaa3627c1b010990594939b4371 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Fri, 5 Jul 2024 16:29:37 -0400 Subject: [PATCH 05/17] Added helper type for variable --- src/optimizers/mod.rs | 4 ++-- src/residuals/between.rs | 6 +++--- src/residuals/prior.rs | 13 ++++++------- src/residuals/traits.rs | 5 ++--- src/variables/mod.rs | 2 +- src/variables/traits.rs | 6 ++++++ 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/optimizers/mod.rs b/src/optimizers/mod.rs index 1436cc1..e2994f6 100644 --- a/src/optimizers/mod.rs +++ b/src/optimizers/mod.rs @@ -23,12 +23,12 @@ pub mod test { linalg::{AllocatorBuffer, Const, DualAllocator, DualVector, VectorX}, noise::{GaussianNoise, NoiseModelSafe}, residuals::{BetweenResidual, PriorResidual, ResidualSafe}, - variables::{Variable, VariableSafe}, + variables::{Variable, VariableSafe, VariableUmbrella}, }; pub fn optimize_prior() where - T: 'static + Variable, Alias = T> + VariableSafe, + T: 'static + VariableUmbrella>, GaussianNoise: NoiseModelSafe, PriorResidual: ResidualSafe, O: Optimizer, diff --git a/src/residuals/between.rs b/src/residuals/between.rs index ba77149..2ae5fe5 100644 --- a/src/residuals/between.rs +++ b/src/residuals/between.rs @@ -23,7 +23,7 @@ use crate::{ Vector6, VectorX, }, - variables::{Variable, VariableSafe, SE2, SE3, SO2, SO3}, + variables::{Variable, VariableUmbrella, SE2, SE3, SO2, SO3}, }; impl_safe_residual!( @@ -52,7 +52,7 @@ impl BetweenResidual

{ } } -impl = P> + VariableSafe + 'static> Residual2 for BetweenResidual

+impl Residual2 for BetweenResidual

where AllocatorBuffer>: Sync + Send, DefaultAllocator: DualAllocator>, @@ -76,7 +76,7 @@ where AllocatorBuffer>: Sync + Send, DefaultAllocator: DualAllocator>, DualVector>: Copy, - P: Variable = P> + VariableSafe + 'static, + P: VariableUmbrella + 'static, P::Dim: DimNameAdd, { type DimOut = ::DimOut; diff --git a/src/residuals/prior.rs b/src/residuals/prior.rs index e4c61ed..6897e33 100644 --- a/src/residuals/prior.rs +++ b/src/residuals/prior.rs @@ -1,7 +1,6 @@ use super::{Residual, Residual1}; use crate::{ containers::{Symbol, Values}, - dtype, impl_safe_residual, linalg::{ AllocatorBuffer, @@ -21,7 +20,7 @@ use crate::{ Vector6, VectorX, }, - variables::{Variable, VariableSafe, SE2, SE3, SO2, SO3}, + variables::{Variable, VariableUmbrella, SE2, SE3, SO2, SO3}, }; impl_safe_residual!( @@ -43,13 +42,13 @@ pub struct PriorResidual { prior: P, } -impl = P>> PriorResidual

{ +impl PriorResidual

{ pub fn new(prior: P) -> Self { Self { prior } } } -impl = P> + VariableSafe + 'static> Residual1 for PriorResidual

+impl Residual1 for PriorResidual

where AllocatorBuffer: Sync + Send, DefaultAllocator: DualAllocator, @@ -65,7 +64,7 @@ where } } -impl = P> + VariableSafe + 'static> Residual for PriorResidual

+impl Residual for PriorResidual

where AllocatorBuffer: Sync + Send, DefaultAllocator: DualAllocator, @@ -91,7 +90,7 @@ mod test { use crate::{ containers::X, linalg::{dvector, DefaultAllocator, Diff, DualAllocator, NumericalDiff}, - variables::{VariableSafe, Vector3, SE3, SO3}, + variables::{Vector3, SE3, SO3}, }; #[cfg(not(feature = "f32"))] @@ -106,7 +105,7 @@ mod test { fn test_prior_jacobian

(prior: P) where - P: Variable = P> + VariableSafe + 'static, + P: VariableUmbrella + 'static, AllocatorBuffer: Sync + Send, DefaultAllocator: DualAllocator, DualVector: Copy, diff --git a/src/residuals/traits.rs b/src/residuals/traits.rs index f5c8145..3f6c7c0 100644 --- a/src/residuals/traits.rs +++ b/src/residuals/traits.rs @@ -2,9 +2,8 @@ use std::fmt::{Debug, Display}; use crate::{ containers::{Symbol, Values}, - dtype, linalg::{Diff, DiffResult, DimName, MatrixX, Numeric, VectorX}, - variables::{Variable, VariableSafe}, + variables::{Variable, VariableUmbrella}, }; type Alias = ::Alias; @@ -48,7 +47,7 @@ macro_rules! residual_maker { pub trait []: Residual { $( - type $var: Variable = Self::$var> + VariableSafe; + type $var: VariableUmbrella; )* type DimIn: DimName; type DimOut: DimName; diff --git a/src/variables/mod.rs b/src/variables/mod.rs index 64db7fd..064e213 100644 --- a/src/variables/mod.rs +++ b/src/variables/mod.rs @@ -1,6 +1,6 @@ // ------------------------- Import all variable types ------------------------- // mod traits; -pub use traits::{MatrixLieGroup, Variable, VariableSafe, VariableSerialize}; +pub use traits::{MatrixLieGroup, Variable, VariableSafe, VariableUmbrella}; mod so2; pub use so2::SO2; diff --git a/src/variables/traits.rs b/src/variables/traits.rs index 5f7649a..87f7ef3 100644 --- a/src/variables/traits.rs +++ b/src/variables/traits.rs @@ -100,6 +100,12 @@ pub trait VariableSafe: Debug + Display + Downcast { fn oplus_mut(&mut self, delta: VectorViewX); } +pub trait VariableUmbrella: + VariableSafe + Variable = Self> +{ +} +impl = T>> VariableUmbrella for T {} + impl_downcast!(VariableSafe); impl Clone for Box { From b18279bbdb96988b15a5bc8a5539557fdc0772ed Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Fri, 5 Jul 2024 16:42:02 -0400 Subject: [PATCH 06/17] Fix some optimizer tests --- src/containers/values.rs | 3 +- src/optimizers/mod.rs | 102 ++++++++++++++++++++------------------- src/residuals/between.rs | 1 - src/robust/mod.rs | 3 +- 4 files changed, 54 insertions(+), 55 deletions(-) diff --git a/src/containers/values.rs b/src/containers/values.rs index af2e28d..3718875 100644 --- a/src/containers/values.rs +++ b/src/containers/values.rs @@ -36,8 +36,7 @@ impl Values { key: Symbol, value: impl VariableSafe, ) -> Option> { - // TODO: Avoid cloning here? - self.values.insert(key, value.clone_box()) + self.values.insert(key, Box::new(value)) } pub fn get(&self, key: &Symbol) -> Option<&Box> { diff --git a/src/optimizers/mod.rs b/src/optimizers/mod.rs index e2994f6..d45a622 100644 --- a/src/optimizers/mod.rs +++ b/src/optimizers/mod.rs @@ -13,17 +13,16 @@ pub use levenberg_marquardt::LevenMarquardt; #[cfg(test)] pub mod test { use faer::assert_matrix_eq; - use nalgebra::{allocator::Allocator, DefaultAllocator, DimNameAdd, DimNameSum}; use super::*; use crate::{ containers::{Graph, Values, X}, dtype, factors::Factor, - linalg::{AllocatorBuffer, Const, DualAllocator, DualVector, VectorX}, + linalg::{Const, VectorX}, noise::{GaussianNoise, NoiseModelSafe}, - residuals::{BetweenResidual, PriorResidual, ResidualSafe}, - variables::{Variable, VariableSafe, VariableUmbrella}, + residuals::{BetweenResidual, PriorResidual, Residual, ResidualSafe}, + variables::VariableUmbrella, }; pub fn optimize_prior() @@ -56,50 +55,53 @@ pub mod test { ); } - // pub fn optimize_between() - // where - // T: 'static + Variable, Alias = T>, - // O: Optimizer, - // Const: DimNameAdd>, - // DualVector, Const>>: Copy, - // { - // let t = VectorX::from_fn(T::DIM, |_, i| ((i as dtype) - (T::DIM as dtype)) / 10.0); - // let p1 = T::exp(t.as_view()); - - // let t = VectorX::from_fn(T::DIM, |_, i| ((i + 1) as dtype) / 10.0); - // let p2 = T::exp(t.as_view()); - - // let mut values = Values::new(); - // values.insert(X(0), T::identity()); - // values.insert(X(1), T::identity()); - - // let mut graph = Graph::new(); - // let res = PriorResidual::new(p1.clone()); - // let factor = Factor::new_base(&[X(0)], res); - // graph.add_factor(factor); - - // let diff = p2.minus(&p1); - // let res = BetweenResidual::new(diff); - // let factor = Factor::new_base(&[X(0), X(1)], res); - // graph.add_factor(factor); - - // let mut opt = O::new(graph); - // values = opt.optimize(values).unwrap(); - - // let out1: &T = values.get_cast(&X(0)).unwrap(); - // assert_matrix_eq!( - // out1.ominus(&p1), - // VectorX::zeros(T::DIM), - // comp = abs, - // tol = 1e-6 - // ); - - // let out2: &T = values.get_cast(&X(1)).unwrap(); - // assert_matrix_eq!( - // out2.ominus(&p2), - // VectorX::zeros(T::DIM), - // comp = abs, - // tol = 1e-6 - // ); - // } + pub fn optimize_between() + where + T: 'static + VariableUmbrella>, + GaussianNoise: NoiseModelSafe, + PriorResidual: + ResidualSafe + Residual, DimOut = Const, NumVars = Const<1>>, + BetweenResidual: ResidualSafe + + Residual, DimOut = Const, NumVars = Const<2>>, + O: Optimizer, + { + let t = VectorX::from_fn(T::DIM, |_, i| ((i as dtype) - (T::DIM as dtype)) / 10.0); + let p1 = T::exp(t.as_view()); + + let t = VectorX::from_fn(T::DIM, |_, i| ((i + 1) as dtype) / 10.0); + let p2 = T::exp(t.as_view()); + + let mut values = Values::new(); + values.insert(X(0), T::identity()); + values.insert(X(1), T::identity()); + + let mut graph = Graph::new(); + let res = PriorResidual::new(p1.clone()); + let factor = Factor::new_base(&[X(0)], res); + graph.add_factor(factor); + + let diff = p2.minus(&p1); + let res = BetweenResidual::new(diff); + let factor = Factor::new_base(&[X(0), X(1)], res); + graph.add_factor(factor); + + let mut opt = O::new(graph); + values = opt.optimize(values).unwrap(); + + let out1: &T = values.get_cast(&X(0)).unwrap(); + assert_matrix_eq!( + out1.ominus(&p1), + VectorX::zeros(T::DIM), + comp = abs, + tol = 1e-6 + ); + + let out2: &T = values.get_cast(&X(1)).unwrap(); + assert_matrix_eq!( + out2.ominus(&p2), + VectorX::zeros(T::DIM), + comp = abs, + tol = 1e-6 + ); + } } diff --git a/src/residuals/between.rs b/src/residuals/between.rs index 2ae5fe5..e2aa820 100644 --- a/src/residuals/between.rs +++ b/src/residuals/between.rs @@ -3,7 +3,6 @@ use nalgebra::{DimNameAdd, DimNameSum}; use super::{Residual, Residual2}; use crate::{ containers::{Symbol, Values}, - dtype, impl_safe_residual, linalg::{ AllocatorBuffer, diff --git a/src/robust/mod.rs b/src/robust/mod.rs index 7922320..8b6a6bd 100644 --- a/src/robust/mod.rs +++ b/src/robust/mod.rs @@ -1,8 +1,7 @@ -use std::fmt::{Debug, Display}; +use std::fmt::Debug; use crate::dtype; -// TODO: Consider changing names to \rho and w pub trait RobustCost: Default + Debug { fn loss(&self, d2: dtype) -> dtype; From 16cdc613083c55220629ffd3926e51fb55e331b9 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Fri, 5 Jul 2024 16:59:44 -0400 Subject: [PATCH 07/17] Fix rerun changes --- Cargo.lock | 275 +++++++-------------------------------- Cargo.toml | 40 ++++-- examples/serde.rs | 1 - src/optimizers/macros.rs | 21 +-- src/residuals/between.rs | 33 +++-- src/residuals/prior.rs | 33 +++-- src/variables/vector.rs | 3 +- 7 files changed, 137 insertions(+), 269 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 10589e7..9a9dccc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -164,12 +164,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -880,12 +874,7 @@ version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", "num-traits", - "wasm-bindgen", - "windows-targets 0.52.5", ] [[package]] @@ -1098,18 +1087,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-text" -version = "20.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d2790b5c08465d49f8dc05c8bcae9fea467855947db39b0f8145c091aaced5" -dependencies = [ - "core-foundation", - "core-graphics", - "foreign-types", - "libc", -] - [[package]] name = "cpufeatures" version = "0.2.12" @@ -1200,16 +1177,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "cstr" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68523903c8ae5aacfa32a0d9ae60cadeb764e1da14ee0d26b1f3089f13a54636" -dependencies = [ - "proc-macro2", - "quote", -] - [[package]] name = "cursor-icon" version = "1.1.0" @@ -1316,16 +1283,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1367,18 +1324,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" -[[package]] -name = "dwrote" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" -dependencies = [ - "lazy_static", - "libc", - "winapi", - "wio", -] - [[package]] name = "dyn-clone" version = "1.0.17" @@ -1757,6 +1702,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" +dependencies = [ + "serde", + "typeid", +] + [[package]] name = "errno" version = "0.3.9" @@ -1962,43 +1917,12 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "float-ord" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce81f49ae8a0482e4c55ea62ebbd7e5a686af544c00b9d090bba3ff9be97b3d" - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "font-kit" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2845a73bbd781e691ab7c2a028c579727cd254942e8ced57ff73e0eafd60de87" -dependencies = [ - "bitflags 2.5.0", - "byteorder", - "core-foundation", - "core-graphics", - "core-text", - "dirs-next", - "dwrote", - "float-ord", - "freetype-sys", - "lazy_static", - "libc", - "log", - "pathfinder_geometry", - "pathfinder_simd", - "walkdir", - "winapi", - "yeslogic-fontconfig-sys", -] - [[package]] name = "foreign-types" version = "0.5.0" @@ -2041,17 +1965,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "freetype-sys" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7edc5b9669349acfda99533e9e0bcf26a51862ab43b08ee7745c55d28eb134" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "fsevent-sys" version = "4.1.0" @@ -2301,16 +2214,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gif" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" -dependencies = [ - "color_quant", - "weezl", -] - [[package]] name = "gimli" version = "0.29.0" @@ -2591,29 +2494,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - [[package]] name = "icrate" version = "0.0.4" @@ -2650,7 +2530,6 @@ dependencies = [ "bytemuck", "byteorder", "color_quant", - "jpeg-decoder", "num-traits", "png", ] @@ -2731,6 +2610,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "inventory" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -3339,6 +3224,7 @@ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "bytemuck", "num-traits", + "serde", ] [[package]] @@ -3658,7 +3544,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b41438d2fc63c46c74a2203bf5ccd82c41ba04347b2fcf5754f230b167067d5" dependencies = [ - "ttf-parser 0.21.1", + "ttf-parser", ] [[package]] @@ -3702,25 +3588,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" -[[package]] -name = "pathfinder_geometry" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3" -dependencies = [ - "log", - "pathfinder_simd", -] - -[[package]] -name = "pathfinder_simd" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebf45976c56919841273f2a0fc684c28437e2f304e264557d9c72be5d5a718be" -dependencies = [ - "rustc_version", -] - [[package]] name = "peg" version = "0.6.3" @@ -3792,52 +3659,6 @@ dependencies = [ "array-init-cursor", ] -[[package]] -name = "plotters" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" -dependencies = [ - "chrono", - "font-kit", - "image 0.24.9", - "lazy_static", - "num-traits", - "pathfinder_geometry", - "plotters-backend", - "plotters-bitmap", - "plotters-svg", - "ttf-parser 0.20.0", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "plotters-backend" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" - -[[package]] -name = "plotters-bitmap" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e7f6fb8302456d7c264a94dada86f76d76e1a03e2294ee86ca7da92983b0a6" -dependencies = [ - "gif", - "image 0.24.9", - "plotters-backend", -] - -[[package]] -name = "plotters-svg" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" -dependencies = [ - "plotters-backend", -] - [[package]] name = "ply-rs" version = "0.1.3" @@ -5520,10 +5341,11 @@ dependencies = [ "nalgebra", "num-dual", "paste", - "plotters", "pretty_env_logger", "rerun", "serde", + "serde_json", + "typetag", ] [[package]] @@ -6093,12 +5915,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "ttf-parser" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" - [[package]] name = "ttf-parser" version = "0.21.1" @@ -6143,12 +5959,42 @@ dependencies = [ "rustc-hash", ] +[[package]] +name = "typeid" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "059d83cc991e7a42fc37bd50941885db0888e34209f8cfd9aab07ddec03bc9cf" + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "typetag" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "661d18414ec032a49ece2d56eee03636e43c4e8d577047ab334c0ba892e29aaf" +dependencies = [ + "erased-serde", + "inventory", + "once_cell", + "serde", + "typetag-impl", +] + +[[package]] +name = "typetag-impl" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.68", +] + [[package]] name = "uds_windows" version = "1.1.0" @@ -7010,15 +6856,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "wio" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" -dependencies = [ - "winapi", -] - [[package]] name = "x11-dl" version = "2.21.0" @@ -7107,18 +6944,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" -[[package]] -name = "yeslogic-fontconfig-sys" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb6b23999a8b1a997bf47c7bb4d19ad4029c3327bb3386ebe0a5ff584b33c7a" -dependencies = [ - "cstr", - "dlib", - "once_cell", - "pkg-config", -] - [[package]] name = "zbus" version = "3.15.2" diff --git a/Cargo.toml b/Cargo.toml index edaf8af..6a1867f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,29 +10,53 @@ derive_more = "0.99.17" paste = "1.0.15" downcast-rs = "1.2.1" log = "0.4.21" -log = "0.4.21" # numerical -faer = { version = "0.19.0", default-features = false, features = ["perf-warn", "std"] } +faer = { version = "0.19.0", default-features = false, features = [ + "perf-warn", + "std", +] } faer-ext = { version = "0.2.0", features = ["nalgebra"] } nalgebra = { version = "0.32.5" } num-dual = "0.9.1" matrixcompare-core = { version = "0.1", optional = true } # serialization -serde = {version = "1.0.203", optional = true } -typetag = {version = "0.2.16", optional = true } +serde = { version = "1.0.203", optional = true } +typetag = { version = "0.2.16", optional = true } +serde_json = { version = "1.0.120", optional = true } # rerun support -rerun = { version = "0.16.1", optional = true} +rerun = { version = "0.16.1", optional = true } [features] +# Run everything with f32 instead of the defaul f64 f32 = [] + +# Use left instead of right for lie group updates left = [] + +# use SO(n) x R instead of SE(n) for exponential map fake_exp = [] + +# Necessary dependencies for matrix comparing compare = ["dep:matrixcompare-core", "nalgebra/compare", "faer/matrixcompare"] -serde = ["dep:serde", "dep:typetag", "nalgebra/serde-serialize", "faer/serde", "ahash/serde"] -multithread = ["faer/rayon"] + +# Add multithreaded support (may run slower on smaller problems) +rayon = ["faer/rayon"] + +# Add support for serialization +serde = [ + "dep:serde", + "dep:typetag", + "nalgebra/serde-serialize", + "faer/serde", + "ahash/serde", +] +# just used for examples +serde_json = ["dep:serde_json"] + +# Support for conversion to rerun variable types rerun = ["dep:rerun"] [dev-dependencies] @@ -49,4 +73,4 @@ required-features = ["rerun"] [[example]] name = "serde" -required-features=["serde"] +required-features = ["serde", "serde_json"] diff --git a/examples/serde.rs b/examples/serde.rs index 3e016de..0855b53 100644 --- a/examples/serde.rs +++ b/examples/serde.rs @@ -6,7 +6,6 @@ use samrs::{ robust::{GemanMcClure, Huber, L2}, variables::{SE2, SO2}, }; -use serde_json; fn main() { // ------------------------- Try with values ------------------------- // diff --git a/src/optimizers/macros.rs b/src/optimizers/macros.rs index db76963..f136c6a 100644 --- a/src/optimizers/macros.rs +++ b/src/optimizers/macros.rs @@ -16,14 +16,19 @@ macro_rules! test_optimizer { $crate::optimizers::test::optimize_prior::<$optimizer$(< $($gen),* >)?, $crate::variables::SE3, 6>(); } - // #[test] - // fn betweenvector3() { - // $crate::optimizers::test::optimize_between::<$optimizer$(< $($gen),* >)?, $crate::variables::Vector3, 3>(); - // } + #[test] + fn betweenvector3() { + $crate::optimizers::test::optimize_between::<$optimizer$(< $($gen),* >)?, $crate::variables::VectorVar3, 3, 6>(); + } - // #[test] - // fn betweenso3() { - // $crate::optimizers::test::optimize_between::<$optimizer$(< $($gen),* >)?, $crate::variables::SO3, 3>(); - // } + #[test] + fn betweenso3() { + $crate::optimizers::test::optimize_between::<$optimizer$(< $($gen),* >)?, $crate::variables::SO3, 3, 6>(); + } + + #[test] + fn betweense3() { + $crate::optimizers::test::optimize_between::<$optimizer$(< $($gen),* >)?, $crate::variables::SE3, 6, 12>(); + } }; } diff --git a/src/residuals/between.rs b/src/residuals/between.rs index e2aa820..57bf098 100644 --- a/src/residuals/between.rs +++ b/src/residuals/between.rs @@ -14,24 +14,31 @@ use crate::{ ForwardProp, MatrixX, Numeric, - Vector1, - Vector2, - Vector3, - Vector4, - Vector5, - Vector6, VectorX, }, - variables::{Variable, VariableUmbrella, SE2, SE3, SO2, SO3}, + variables::{ + Variable, + VariableUmbrella, + VectorVar1, + VectorVar2, + VectorVar3, + VectorVar4, + VectorVar5, + VectorVar6, + SE2, + SE3, + SO2, + SO3, + }, }; impl_safe_residual!( - BetweenResidual, - BetweenResidual, - BetweenResidual, - BetweenResidual, - BetweenResidual, - BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, + BetweenResidual, BetweenResidual, BetweenResidual, BetweenResidual, diff --git a/src/residuals/prior.rs b/src/residuals/prior.rs index af0dc77..058ad69 100644 --- a/src/residuals/prior.rs +++ b/src/residuals/prior.rs @@ -12,24 +12,31 @@ use crate::{ ForwardProp, MatrixX, Numeric, - Vector1, - Vector2, - Vector3, - Vector4, - Vector5, - Vector6, VectorX, }, - variables::{Variable, VariableUmbrella, SE2, SE3, SO2, SO3}, + variables::{ + Variable, + VariableUmbrella, + VectorVar1, + VectorVar2, + VectorVar3, + VectorVar4, + VectorVar5, + VectorVar6, + SE2, + SE3, + SO2, + SO3, + }, }; impl_safe_residual!( - PriorResidual, - PriorResidual, - PriorResidual, - PriorResidual, - PriorResidual, - PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, + PriorResidual, PriorResidual, PriorResidual, PriorResidual, diff --git a/src/variables/vector.rs b/src/variables/vector.rs index ac5090f..9e8ee73 100644 --- a/src/variables/vector.rs +++ b/src/variables/vector.rs @@ -37,7 +37,8 @@ impl_safe_variable!( // 2 - Overcome identity issues with the underlying Vector type // 3 - Impl Into #[derive(Clone)] -pub struct VectorVar(Vector); +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct VectorVar(Vector); impl Variable for VectorVar { type Dim = Const; From b835f9b7b1a0810387f4fa725888e1017aeac981 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Mon, 8 Jul 2024 11:33:56 -0400 Subject: [PATCH 08/17] Added unit noise option --- src/factors/factor.rs | 12 ++++++------ src/noise/gaussian.rs | 34 +++++++--------------------------- src/noise/mod.rs | 17 ++++++++++------- src/noise/unit.rs | 33 +++++++++++++++++++++++++++++++++ src/optimizers/mod.rs | 6 +++--- 5 files changed, 59 insertions(+), 43 deletions(-) create mode 100644 src/noise/unit.rs diff --git a/src/factors/factor.rs b/src/factors/factor.rs index 856a0d5..4ad67f1 100644 --- a/src/factors/factor.rs +++ b/src/factors/factor.rs @@ -3,7 +3,7 @@ use crate::{ dtype, linalg::{AllocatorBuffer, Const, DefaultAllocator, DiffResult, DualAllocator, MatrixBlock}, linear::LinearFactor, - noise::{GaussianNoise, NoiseModel, NoiseModelSafe}, + noise::{NoiseModel, NoiseModelSafe, UnitNoise}, residuals::{Residual, ResidualSafe}, robust::{RobustCostSafe, L2}, }; @@ -26,12 +26,12 @@ impl Factor { R: 'static + Residual, DimOut = Const> + ResidualSafe, AllocatorBuffer: Sync + Send, DefaultAllocator: DualAllocator, - GaussianNoise: NoiseModelSafe, + UnitNoise: NoiseModelSafe, { Self { keys: keys.to_vec(), residual: Box::new(residual), - noise: Box::new(GaussianNoise::::identity()), + noise: Box::new(UnitNoise::), robust: Box::new(L2), } } @@ -78,7 +78,7 @@ impl Factor { pub fn error(&self, values: &Values) -> dtype { let r = self.residual.residual(values, &self.keys); - let r = self.noise.whiten_vec(r.as_view()); + let r = self.noise.whiten_vec(r); let norm2 = r.norm_squared(); self.robust.loss(norm2) } @@ -92,8 +92,8 @@ impl Factor { let DiffResult { value: r, diff: a } = self.residual.residual_jacobian(values, &self.keys); // Whiten residual and jacobian - let r = self.noise.whiten_vec(r.as_view()); - let a = self.noise.whiten_mat(a.as_view()); + let r = self.noise.whiten_vec(r); + let a = self.noise.whiten_mat(a); // Weight according to robust cost let norm2 = r.norm_squared(); diff --git a/src/noise/gaussian.rs b/src/noise/gaussian.rs index 818e8d0..6264338 100644 --- a/src/noise/gaussian.rs +++ b/src/noise/gaussian.rs @@ -1,19 +1,9 @@ use std::fmt; -use super::NoiseModel; +use super::{NoiseModel, UnitNoise}; use crate::{ dtype, - linalg::{ - Const, - Matrix, - MatrixView, - MatrixViewX, - MatrixX, - Vector, - VectorView, - VectorViewX, - VectorX, - }, + linalg::{Const, Matrix, MatrixView, MatrixX, Vector, VectorView, VectorX}, }; impl_safe_noise!( @@ -40,13 +30,13 @@ pub struct GaussianNoise { impl NoiseModel for GaussianNoise { type Dim = Const; - fn whiten_vec(&self, v: VectorViewX) -> VectorX { + fn whiten_vec(&self, v: VectorX) -> VectorX { let mut out = VectorX::zeros(v.len()); self.sqrt_inf.mul_to(&v, &mut out); out } - fn whiten_mat(&self, m: MatrixViewX) -> MatrixX { + fn whiten_mat(&self, m: MatrixX) -> MatrixX { let mut out = MatrixX::zeros(m.nrows(), m.ncols()); self.sqrt_inf.mul_to(&m, &mut out); out @@ -54,9 +44,8 @@ impl NoiseModel for GaussianNoise { } impl GaussianNoise { - pub fn identity() -> Self { - let sqrt_inf = Matrix::::identity(); - Self { sqrt_inf } + pub fn identity() -> UnitNoise { + UnitNoise } pub fn from_scalar_sigma(sigma: dtype) -> Self { @@ -123,16 +112,7 @@ macro_rules! make_gaussian_vector { make_gaussian_vector!(1, [s0]); make_gaussian_vector!(2, [s0, s1]); -impl GaussianNoise<3> { - pub fn from_diag_sigmas(s0: dtype, s1: dtype, s2: dtype) -> Self { - let sigmas = Vector::<3>::new(s0, s1, s2); - Self::from_vec_sigma(sigmas.as_view()) - } - pub fn from_diag_covs(s0: dtype, s1: dtype, s2: dtype) -> Self { - let sigmas = Vector::<3>::new(s0, s1, s2); - Self::from_vec_cov(sigmas.as_view()) - } -} +make_gaussian_vector!(3, [s0, s1, s2]); make_gaussian_vector!(4, [s0, s1, s2, s3]); make_gaussian_vector!(5, [s0, s1, s2, s3, s4]); make_gaussian_vector!(6, [s0, s1, s2, s3, s4, s5]); diff --git a/src/noise/mod.rs b/src/noise/mod.rs index bf43605..8184743 100644 --- a/src/noise/mod.rs +++ b/src/noise/mod.rs @@ -1,6 +1,6 @@ use std::fmt::{Debug, Display}; -use crate::linalg::{DimName, MatrixViewX, MatrixX, VectorViewX, VectorX}; +use crate::linalg::{DimName, MatrixX, VectorX}; pub trait NoiseModel: Debug + Display { type Dim: DimName; @@ -8,18 +8,18 @@ pub trait NoiseModel: Debug + Display { Self::Dim::USIZE } - fn whiten_vec(&self, v: VectorViewX) -> VectorX; + fn whiten_vec(&self, v: VectorX) -> VectorX; - fn whiten_mat(&self, m: MatrixViewX) -> MatrixX; + fn whiten_mat(&self, m: MatrixX) -> MatrixX; } #[cfg_attr(feature = "serde", typetag::serde(tag = "tag"))] pub trait NoiseModelSafe: Debug + Display { fn dim(&self) -> usize; - fn whiten_vec(&self, v: VectorViewX) -> VectorX; + fn whiten_vec(&self, v: VectorX) -> VectorX; - fn whiten_mat(&self, m: MatrixViewX) -> MatrixX; + fn whiten_mat(&self, m: MatrixX) -> MatrixX; } #[macro_export] @@ -35,11 +35,11 @@ macro_rules! impl_safe_noise { $crate::noise::NoiseModel::dim(self) } - fn whiten_vec(&self, v: VectorViewX) -> VectorX { + fn whiten_vec(&self, v: VectorX) -> VectorX { $crate::noise::NoiseModel::whiten_vec(self, v) } - fn whiten_mat(&self, m: MatrixViewX) -> MatrixX { + fn whiten_mat(&self, m: MatrixX) -> MatrixX { $crate::noise::NoiseModel::whiten_mat(self, m) } } @@ -50,3 +50,6 @@ macro_rules! impl_safe_noise { mod gaussian; pub use gaussian::GaussianNoise; + +mod unit; +pub use unit::UnitNoise; diff --git a/src/noise/unit.rs b/src/noise/unit.rs new file mode 100644 index 0000000..d2ff7bc --- /dev/null +++ b/src/noise/unit.rs @@ -0,0 +1,33 @@ +use super::NoiseModel; +use crate::linalg::{Const, MatrixX, VectorX}; + +impl_safe_noise!( + UnitNoise<1>, + UnitNoise<2>, + UnitNoise<3>, + UnitNoise<4>, + UnitNoise<5>, + UnitNoise<6>, + UnitNoise<7>, + UnitNoise<8>, + UnitNoise<9>, + UnitNoise<10>, + UnitNoise<11>, + UnitNoise<12>, +); + +#[derive(Clone, Debug, derive_more::Display)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct UnitNoise; + +impl NoiseModel for UnitNoise { + type Dim = Const; + + fn whiten_vec(&self, v: VectorX) -> VectorX { + v + } + + fn whiten_mat(&self, m: MatrixX) -> MatrixX { + m + } +} diff --git a/src/optimizers/mod.rs b/src/optimizers/mod.rs index 897b180..2062e96 100644 --- a/src/optimizers/mod.rs +++ b/src/optimizers/mod.rs @@ -20,7 +20,7 @@ pub mod test { dtype, factors::Factor, linalg::{Const, VectorX}, - noise::{GaussianNoise, NoiseModelSafe}, + noise::{NoiseModelSafe, UnitNoise}, residuals::{BetweenResidual, PriorResidual, Residual, ResidualSafe}, variables::VariableUmbrella, }; @@ -28,7 +28,7 @@ pub mod test { pub fn optimize_prior() where T: 'static + VariableUmbrella>, - GaussianNoise: NoiseModelSafe, + UnitNoise: NoiseModelSafe, PriorResidual: ResidualSafe, O: Optimizer, { @@ -58,7 +58,7 @@ pub mod test { pub fn optimize_between() where T: 'static + VariableUmbrella>, - GaussianNoise: NoiseModelSafe, + UnitNoise: NoiseModelSafe, PriorResidual: ResidualSafe + Residual, DimOut = Const, NumVars = Const<1>>, BetweenResidual: ResidualSafe From efb4350a6f8f76e159968e126e251f9966a36800 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Mon, 8 Jul 2024 11:36:35 -0400 Subject: [PATCH 09/17] Fix small dtype bug --- src/linalg/forward_prop.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/linalg/forward_prop.rs b/src/linalg/forward_prop.rs index 0874f19..f88b388 100644 --- a/src/linalg/forward_prop.rs +++ b/src/linalg/forward_prop.rs @@ -7,6 +7,7 @@ use super::{ MatrixDim, }; use crate::{ + dtype, linalg::{Const, DefaultAllocator, DiffResult, DimName, Dyn, MatrixX, VectorDim, VectorX}, variables::Variable, }; @@ -19,7 +20,7 @@ macro_rules! forward_maker { ($num:expr, $( ($name:ident: $var:ident) ),*) => { paste! { #[allow(unused_assignments)] - fn []<$( $var: Variable = $var>, )* F: Fn($($var::Alias,)*) -> VectorX> + fn []<$( $var: Variable = $var>, )* F: Fn($($var::Alias,)*) -> VectorX> (f: F, $($name: &$var,)*) -> DiffResult{ // Prepare variables let mut curr_dim = 0; From 78ac2d7316e0ac30e7167452283a0d560f087c68 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Mon, 8 Jul 2024 11:37:31 -0400 Subject: [PATCH 10/17] Small typo in robust tests --- src/robust/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robust/mod.rs b/src/robust/mod.rs index 8b6a6bd..fd18dce 100644 --- a/src/robust/mod.rs +++ b/src/robust/mod.rs @@ -297,7 +297,7 @@ mod test { const TOL: dtype = 1e-6; #[cfg(feature = "f32")] - const EPS: dtype = 1e-33; + const EPS: dtype = 1e-3; #[cfg(feature = "f32")] const TOL: dtype = 1e-2; From 2c2d10091d3fd7c6eaf7a3a0d6b35df3bddddb90 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Mon, 8 Jul 2024 11:40:16 -0400 Subject: [PATCH 11/17] samrs -> factrs --- Cargo.lock | 44 +++++++++++++++++++++---------------------- Cargo.toml | 2 +- examples/g2o-rerun.rs | 4 ++-- examples/g2o.rs | 2 +- examples/serde.rs | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a9dccc..ce3d141 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1796,6 +1796,28 @@ dependencies = [ "web-sys", ] +[[package]] +name = "factrs" +version = "0.1.0" +dependencies = [ + "ahash", + "derive_more", + "downcast-rs", + "faer", + "faer-ext", + "log", + "matrixcompare", + "matrixcompare-core", + "nalgebra", + "num-dual", + "paste", + "pretty_env_logger", + "rerun", + "serde", + "serde_json", + "typetag", +] + [[package]] name = "faer" version = "0.19.1" @@ -5326,28 +5348,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "samrs" -version = "0.1.0" -dependencies = [ - "ahash", - "derive_more", - "downcast-rs", - "faer", - "faer-ext", - "log", - "matrixcompare", - "matrixcompare-core", - "nalgebra", - "num-dual", - "paste", - "pretty_env_logger", - "rerun", - "serde", - "serde_json", - "typetag", -] - [[package]] name = "scoped-tls" version = "1.0.1" diff --git a/Cargo.toml b/Cargo.toml index 6a1867f..aab7b33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "samrs" +name = "factrs" version = "0.1.0" edition = "2021" diff --git a/examples/g2o-rerun.rs b/examples/g2o-rerun.rs index e524cee..f1afe4c 100644 --- a/examples/g2o-rerun.rs +++ b/examples/g2o-rerun.rs @@ -4,13 +4,13 @@ use std::{ time::Instant, }; -use rerun::{Arrows2D, Arrows3D, Points2D, Points3D}; -use samrs::{ +use factrs::{ optimizers::{GaussNewton, Optimizer}, rerun::RerunSender, utils::load_g20, variables::*, }; +use rerun::{Arrows2D, Arrows3D, Points2D, Points3D}; fn main() -> Result<(), Box> { // ------------------------- Parse Arguments & Load data ------------------------- // diff --git a/examples/g2o.rs b/examples/g2o.rs index 52c9d63..8e8920e 100644 --- a/examples/g2o.rs +++ b/examples/g2o.rs @@ -1,6 +1,6 @@ use std::{env, time::Instant}; -use samrs::{ +use factrs::{ optimizers::{GaussNewton, Optimizer}, utils::load_g20, }; diff --git a/examples/serde.rs b/examples/serde.rs index 0855b53..de35ec1 100644 --- a/examples/serde.rs +++ b/examples/serde.rs @@ -1,4 +1,4 @@ -use samrs::{ +use factrs::{ containers::{Graph, Values, X}, factors::Factor, noise::GaussianNoise, From 84449aa6535674bcd1338c11a53d2bb3535f75c3 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Tue, 9 Jul 2024 17:05:32 -0400 Subject: [PATCH 12/17] Filled out observer structure more fully --- Cargo.lock | 3493 ++----------------------- Cargo.toml | 4 +- examples/g2o-rerun.rs | 20 +- examples/g2o.rs | 2 +- src/containers/values.rs | 7 + src/linear/values.rs | 25 +- src/optimizers/gauss_newton.rs | 28 +- src/optimizers/levenberg_marquardt.rs | 28 +- src/optimizers/mod.rs | 14 +- src/optimizers/traits.rs | 79 +- src/rerun.rs | 18 +- 11 files changed, 314 insertions(+), 3404 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce3d141..552ae2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,97 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ab_glyph" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c3a1cbc201cc13ed06cf875efb781f2249b3677f5c74571b67d817877f9d697" -dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", -] - -[[package]] -name = "ab_glyph_rasterizer" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" - -[[package]] -name = "accesskit" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a4b14f3d99c1255dcba8f45621ab1a2e7540a0009652d33989005a4d0bfc6b" -dependencies = [ - "enumn", - "serde", -] - -[[package]] -name = "accesskit_consumer" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c17cca53c09fbd7288667b22a201274b9becaa27f0b91bf52a526db95de45e6" -dependencies = [ - "accesskit", -] - -[[package]] -name = "accesskit_macos" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3b6ae1eabbfbced10e840fd3fce8a93ae84f174b3e4ba892ab7bcb42e477a7" -dependencies = [ - "accesskit", - "accesskit_consumer", - "objc2 0.3.0-beta.3.patch-leaks.3", - "once_cell", -] - -[[package]] -name = "accesskit_unix" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f46c18d99ba61ad7123dd13eeb0c104436ab6af1df6a1cd8c11054ed394a08" -dependencies = [ - "accesskit", - "accesskit_consumer", - "async-channel", - "async-once-cell", - "atspi", - "futures-lite 1.13.0", - "once_cell", - "serde", - "zbus", -] - -[[package]] -name = "accesskit_windows" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcae27ec0974fc7c3b0b318783be89fd1b2e66dd702179fe600166a38ff4a0b" -dependencies = [ - "accesskit", - "accesskit_consumer", - "once_cell", - "paste", - "static_assertions", - "windows 0.48.0", -] - -[[package]] -name = "accesskit_winit" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5284218aca17d9e150164428a0ebc7b955f70e3a9a78b4c20894513aabf98a67" -dependencies = [ - "accesskit", - "accesskit_macos", - "accesskit_unix", - "accesskit_windows", - "winit", -] - [[package]] name = "addr2line" version = "0.22.0" @@ -131,48 +40,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "android-activity" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" -dependencies = [ - "android-properties", - "bitflags 2.5.0", - "cc", - "cesu8", - "jni", - "jni-sys", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-sys", - "num_enum", - "thiserror", -] - -[[package]] -name = "android-properties" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - [[package]] name = "anyhow" version = "1.0.86" @@ -188,24 +55,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "arboard" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89" -dependencies = [ - "clipboard-win", - "core-graphics", - "image 0.25.1", - "log", - "objc2 0.5.2", - "objc2-app-kit", - "objc2-foundation", - "parking_lot", - "windows-sys 0.48.0", - "x11rb", -] - [[package]] name = "array-init" version = "2.1.0" @@ -218,12 +67,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - [[package]] name = "arrow-format" version = "0.8.1" @@ -234,27 +77,6 @@ dependencies = [ "serde", ] -[[package]] -name = "as-raw-xcb-connection" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" - -[[package]] -name = "ascii" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" - -[[package]] -name = "ash" -version = "0.37.3+1.3.251" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" -dependencies = [ - "libloading 0.7.4", -] - [[package]] name = "ashpd" version = "0.6.8" @@ -402,12 +224,6 @@ dependencies = [ "futures-lite 2.3.0", ] -[[package]] -name = "async-once-cell" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb" - [[package]] name = "async-process" version = "1.8.1" @@ -477,54 +293,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atspi" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6059f350ab6f593ea00727b334265c4dfc7fd442ee32d264794bd9bdc68e87ca" -dependencies = [ - "atspi-common", - "atspi-connection", - "atspi-proxies", -] - -[[package]] -name = "atspi-common" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92af95f966d2431f962bc632c2e68eda7777330158bf640c4af4249349b2cdf5" -dependencies = [ - "enumflags2", - "serde", - "static_assertions", - "zbus", - "zbus_names", - "zvariant", -] - -[[package]] -name = "atspi-connection" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c65e7d70f86d4c0e3b2d585d9bf3f979f0b19d635a336725a88d279f76b939" -dependencies = [ - "atspi-common", - "atspi-proxies", - "futures-lite 1.13.0", - "zbus", -] - -[[package]] -name = "atspi-proxies" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6495661273703e7a229356dcbe8c8f38223d697aacfaf0e13590a9ac9977bb52" -dependencies = [ - "atspi-common", - "serde", - "zbus", -] - [[package]] name = "atty" version = "0.2.14" @@ -563,24 +331,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - [[package]] name = "bincode" version = "1.3.3" @@ -590,21 +340,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" version = "1.3.2" @@ -616,10 +351,6 @@ name = "bitflags" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" -dependencies = [ - "bytemuck", - "serde", -] [[package]] name = "block" @@ -636,53 +367,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-sys" -version = "0.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" -dependencies = [ - "objc-sys 0.2.0-beta.2", -] - -[[package]] -name = "block-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" -dependencies = [ - "objc-sys 0.3.5", -] - -[[package]] -name = "block2" -version = "0.2.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" -dependencies = [ - "block-sys 0.1.0-beta.1", - "objc2-encode 2.0.0-pre.2", -] - -[[package]] -name = "block2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" -dependencies = [ - "block-sys 0.2.1", - "objc2 0.4.1", -] - -[[package]] -name = "block2" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" -dependencies = [ - "objc2 0.5.2", -] - [[package]] name = "blocking" version = "1.6.1" @@ -745,38 +429,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" -[[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" - -[[package]] -name = "calloop" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" -dependencies = [ - "bitflags 2.5.0", - "log", - "polling 3.7.2", - "rustix 0.38.34", - "slab", - "thiserror", -] - -[[package]] -name = "calloop-wayland-source" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" -dependencies = [ - "calloop", - "rustix 0.38.34", - "wayland-backend", - "wayland-client", -] - [[package]] name = "camino" version = "1.1.7" @@ -827,17 +479,6 @@ name = "cc" version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac367972e516d45567c7eafc73d24e1c193dcf200a8d94e9db7b3d38b349572d" -dependencies = [ - "jobserver", - "libc", - "once_cell", -] - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfb" @@ -856,18 +497,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - [[package]] name = "chrono" version = "0.4.38" @@ -877,12 +506,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "chunked_transfer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" - [[package]] name = "clang-format" version = "0.3.0" @@ -899,125 +522,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aaa6b4b263a5d737e9bf6b7c09b72c41a5480aec4d7219af827f6564e950b6a5" [[package]] -name = "clipboard-win" -version = "5.3.1" +name = "coe-rs" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79f4473f5144e20d9aceaf2972478f06ddf687831eafeeb434fbaf0acc4144ad" -dependencies = [ - "error-code", -] +checksum = "7e8f1e641542c07631228b1e0dc04b69ae3c1d58ef65d5691a439711d805c698" [[package]] -name = "cocoa" -version = "0.25.0" +name = "comfy-table" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics", - "foreign-types", - "libc", - "objc", + "strum", + "strum_macros", + "unicode-width", ] [[package]] -name = "cocoa-foundation" -version = "0.1.2" +name = "concurrent-queue" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation", - "core-graphics-types", - "libc", - "objc", -] - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "coe-rs" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8f1e641542c07631228b1e0dc04b69ae3c1d58ef65d5691a439711d805c698" - -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - -[[package]] -name = "com" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" -dependencies = [ - "com_macros", -] - -[[package]] -name = "com_macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" -dependencies = [ - "com_macros_support", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "com_macros_support" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "comfy-table" -version = "7.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" -dependencies = [ - "strum 0.26.3", - "strum_macros 0.26.4", - "unicode-width", -] - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", + "crossbeam-utils", ] [[package]] @@ -1047,46 +574,12 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -[[package]] -name = "core-graphics" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", - "foreign-types", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "libc", -] - [[package]] name = "cpufeatures" version = "0.2.12" @@ -1096,15 +589,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - [[package]] name = "crossbeam" version = "0.8.4" @@ -1177,52 +661,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "cursor-icon" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" - -[[package]] -name = "darling" -version = "0.20.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "syn 2.0.68", -] - -[[package]] -name = "darling_macro" -version = "0.20.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.68", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - [[package]] name = "dbgf" version = "0.1.2" @@ -1236,7 +674,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", - "serde", ] [[package]] @@ -1273,42 +710,12 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "directories-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "dispatch" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" -[[package]] -name = "dlib" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" -dependencies = [ - "libloading 0.8.4", -] - [[package]] name = "document-features" version = "0.2.8" @@ -1340,190 +747,6 @@ dependencies = [ "reborrow", ] -[[package]] -name = "ecolor" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20930a432bbd57a6d55e07976089708d4893f3d556cf42a0d79e9e321fa73b10" -dependencies = [ - "bytemuck", - "serde", -] - -[[package]] -name = "eframe" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020e2ccef6bbcec71dbc542f7eed64a5846fc3076727f5746da8fd307c91bab2" -dependencies = [ - "bytemuck", - "cocoa", - "directories-next", - "document-features", - "egui", - "egui-wgpu", - "egui-winit", - "egui_glow", - "image 0.24.9", - "js-sys", - "log", - "objc", - "parking_lot", - "percent-encoding", - "pollster", - "puffin", - "raw-window-handle 0.6.2", - "ron", - "serde", - "static_assertions", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "web-time", - "wgpu", - "winapi", - "winit", -] - -[[package]] -name = "egui" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "584c5d1bf9a67b25778a3323af222dbe1a1feb532190e103901187f92c7fe29a" -dependencies = [ - "accesskit", - "ahash", - "backtrace", - "epaint", - "log", - "nohash-hasher", - "puffin", - "ron", - "serde", -] - -[[package]] -name = "egui-wgpu" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469ff65843f88a702b731a1532b7d03b0e8e96d283e70f3a22b0e06c46cb9b37" -dependencies = [ - "bytemuck", - "document-features", - "egui", - "epaint", - "log", - "puffin", - "thiserror", - "type-map", - "web-time", - "wgpu", - "winit", -] - -[[package]] -name = "egui-winit" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e3da0cbe020f341450c599b35b92de4af7b00abde85624fd16f09c885573609" -dependencies = [ - "accesskit_winit", - "arboard", - "egui", - "log", - "puffin", - "raw-window-handle 0.6.2", - "serde", - "smithay-clipboard", - "web-time", - "webbrowser", - "winit", -] - -[[package]] -name = "egui_commonmark" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "013480797931a2649e03069613ed35514569372d6f79df70fc3653ae18a75c6c" -dependencies = [ - "egui", - "egui_extras", - "pulldown-cmark 0.10.3", -] - -[[package]] -name = "egui_extras" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b78779f35ded1a853786c9ce0b43fe1053e10a21ea3b23ebea411805ce41593" -dependencies = [ - "egui", - "ehttp", - "enum-map", - "image 0.24.9", - "log", - "mime_guess2", - "puffin", - "serde", -] - -[[package]] -name = "egui_glow" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0e5d975f3c86edc3d35b1db88bb27c15dde7c55d3b5af164968ab5ede3f44ca" -dependencies = [ - "bytemuck", - "egui", - "egui-winit", - "glow", - "log", - "memoffset 0.9.1", - "puffin", - "wasm-bindgen", - "web-sys", - "winit", -] - -[[package]] -name = "egui_plot" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7854b86dc1c2d352c5270db3d600011daa913d6b554141a03939761323288a1" -dependencies = [ - "egui", -] - -[[package]] -name = "egui_tiles" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e2c0ff99daddcbdc54b141dbb7be3b014463da48a03ebc801bf63e500b23d75" -dependencies = [ - "ahash", - "egui", - "itertools", - "log", - "serde", -] - -[[package]] -name = "ehttp" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a81c221a1e4dad06cb9c9deb19aea1193a5eea084e8cd42d869068132bf876" -dependencies = [ - "document-features", - "futures-util", - "js-sys", - "ureq", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", -] - [[package]] name = "either" version = "1.13.0" @@ -1533,47 +756,22 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "emath" version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c3a552cfca14630702449d35f41c84a0d15963273771c6059175a803620f3f" -dependencies = [ - "bytemuck", - "serde", -] - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "enum-as-inner" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 2.0.68", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c3a552cfca14630702449d35f41c84a0d15963273771c6059175a803620f3f" [[package]] -name = "enum-map" -version = "2.7.3" +name = "encode_unicode" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" -dependencies = [ - "enum-map-derive", - "serde", -] +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] -name = "enum-map-derive" -version = "0.17.0" +name = "enum-as-inner" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" +checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" dependencies = [ + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.68", @@ -1600,38 +798,6 @@ dependencies = [ "syn 2.0.68", ] -[[package]] -name = "enumn" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.68", -] - -[[package]] -name = "enumset" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226c0da7462c13fb57e5cc9e0dc8f0635e7d27f276a3a7fd30054647f669007d" -dependencies = [ - "enumset_derive", -] - -[[package]] -name = "enumset_derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.68", -] - [[package]] name = "env_logger" version = "0.7.1" @@ -1657,25 +823,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "epaint" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b381f8b149657a4acf837095351839f32cd5c4aec1817fc4df84e18d76334176" -dependencies = [ - "ab_glyph", - "ahash", - "bytemuck", - "ecolor", - "emath", - "log", - "nohash-hasher", - "parking_lot", - "puffin", - "rayon", - "serde", -] - [[package]] name = "equator" version = "0.2.2" @@ -1731,12 +878,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "error-code" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" - [[package]] name = "ethnum" version = "1.5.0" @@ -1781,21 +922,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "ewebsock" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6177769715c6ec5a324acee995183b22721ea23c58e49af14a828eadec85d120" -dependencies = [ - "document-features", - "js-sys", - "log", - "tungstenite", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "factrs" version = "0.1.0" @@ -1885,27 +1011,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" -[[package]] -name = "fdeflate" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" -dependencies = [ - "simd-adler32", -] - -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", -] - [[package]] name = "fixed" version = "1.27.0" @@ -1929,49 +1034,12 @@ dependencies = [ "rustc_version", ] -[[package]] -name = "flate2" -version = "1.0.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-macros" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.68", -] - -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - [[package]] name = "foreign_vec" version = "0.1.0" @@ -1987,15 +1055,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fsevent-sys" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" -dependencies = [ - "libc", -] - [[package]] name = "futures-channel" version = "0.3.30" @@ -2131,255 +1190,112 @@ dependencies = [ "num-complex", "num-traits", "paste", - "raw-cpuid", - "seq-macro", -] - -[[package]] -name = "gemm-common" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fd234fc525939654f47b39325fd5f55e552ceceea9135f3aa8bdba61eabef6" -dependencies = [ - "bytemuck", - "dyn-stack", - "half", - "num-complex", - "num-traits", - "once_cell", - "paste", - "pulp", - "raw-cpuid", - "rayon", - "seq-macro", - "sysctl", -] - -[[package]] -name = "gemm-f16" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc3652651f96a711d46b8833e1fac27a864be4bdfa81a374055f33ddd25c0c6" -dependencies = [ - "dyn-stack", - "gemm-common", - "gemm-f32", - "half", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "rayon", - "seq-macro", -] - -[[package]] -name = "gemm-f32" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbc51c44ae3defd207e6d9416afccb3c4af1e7cef5e4960e4c720ac4d6f998e" -dependencies = [ - "dyn-stack", - "gemm-common", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] - -[[package]] -name = "gemm-f64" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f37fc86e325c2415a4d0cab8324a0c5371ec06fc7d2f9cb1636fcfc9536a8d8" -dependencies = [ - "dyn-stack", - "gemm-common", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "gethostname" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" -dependencies = [ - "libc", - "windows-targets 0.48.5", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" - -[[package]] -name = "gl_generator" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" -dependencies = [ - "khronos_api", - "log", - "xml-rs", -] - -[[package]] -name = "glam" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f597d56c1bd55a811a1be189459e8fad2bbc272616375602443bdfb37fa774" -dependencies = [ - "bytemuck", - "serde", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "glow" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" -dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gltf" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ce1918195723ce6ac74e80542c5a96a40c2b26162c1957a5cd70799b8cacf7" -dependencies = [ - "base64 0.13.1", - "byteorder", - "gltf-json", - "image 0.25.1", - "lazy_static", - "serde_json", - "urlencoding", + "raw-cpuid", + "seq-macro", ] [[package]] -name = "gltf-derive" -version = "1.4.1" +name = "gemm-common" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14070e711538afba5d6c807edb74bcb84e5dbb9211a3bf5dea0dfab5b24f4c51" +checksum = "90fd234fc525939654f47b39325fd5f55e552ceceea9135f3aa8bdba61eabef6" dependencies = [ - "inflections", - "proc-macro2", - "quote", - "syn 2.0.68", + "bytemuck", + "dyn-stack", + "half", + "num-complex", + "num-traits", + "once_cell", + "paste", + "pulp", + "raw-cpuid", + "rayon", + "seq-macro", + "sysctl", ] [[package]] -name = "gltf-json" -version = "1.4.1" +name = "gemm-f16" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6176f9d60a7eab0a877e8e96548605dedbde9190a7ae1e80bbcc1c9af03ab14" +checksum = "3fc3652651f96a711d46b8833e1fac27a864be4bdfa81a374055f33ddd25c0c6" dependencies = [ - "gltf-derive", - "serde", - "serde_derive", - "serde_json", + "dyn-stack", + "gemm-common", + "gemm-f32", + "half", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "rayon", + "seq-macro", ] [[package]] -name = "glutin_wgl_sys" -version = "0.5.0" +name = "gemm-f32" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +checksum = "acbc51c44ae3defd207e6d9416afccb3c4af1e7cef5e4960e4c720ac4d6f998e" dependencies = [ - "gl_generator", + "dyn-stack", + "gemm-common", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", ] [[package]] -name = "gpu-alloc" -version = "0.6.0" +name = "gemm-f64" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +checksum = "3f37fc86e325c2415a4d0cab8324a0c5371ec06fc7d2f9cb1636fcfc9536a8d8" dependencies = [ - "bitflags 2.5.0", - "gpu-alloc-types", + "dyn-stack", + "gemm-common", + "num-complex", + "num-traits", + "paste", + "raw-cpuid", + "seq-macro", ] [[package]] -name = "gpu-alloc-types" -version = "0.3.0" +name = "generic-array" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "bitflags 2.5.0", + "typenum", + "version_check", ] [[package]] -name = "gpu-allocator" -version = "0.25.0" +name = "getrandom" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "log", - "presser", - "thiserror", - "winapi", - "windows 0.52.0", + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", ] [[package]] -name = "gpu-descriptor" -version = "0.2.4" +name = "gimli" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" -dependencies = [ - "bitflags 2.5.0", - "gpu-descriptor-types", - "hashbrown", -] +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] -name = "gpu-descriptor-types" -version = "0.1.2" +name = "glob" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" -dependencies = [ - "bitflags 2.5.0", -] +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "half" @@ -2406,22 +1322,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", - "allocator-api2", -] - -[[package]] -name = "hassle-rs" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" -dependencies = [ - "bitflags 2.5.0", - "com", - "libc", - "libloading 0.8.4", - "thiserror", - "widestring", - "winapi", ] [[package]] @@ -2463,44 +1363,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hexf-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "httparse" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - [[package]] name = "humantime" version = "1.3.0" @@ -2516,23 +1378,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "icrate" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" -dependencies = [ - "block2 0.3.0", - "dispatch", - "objc2 0.4.1", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.5.0" @@ -2543,34 +1388,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "image" -version = "0.24.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "num-traits", - "png", -] - -[[package]] -name = "image" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11" -dependencies = [ - "bytemuck", - "byteorder", - "num-traits", - "png", - "tiff", - "zune-core", - "zune-jpeg", -] - [[package]] name = "indent" version = "0.1.1" @@ -2585,7 +1402,6 @@ checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", - "serde", ] [[package]] @@ -2597,32 +1413,6 @@ dependencies = [ "cfb", ] -[[package]] -name = "inflections" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" - -[[package]] -name = "inotify" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" -dependencies = [ - "bitflags 1.3.2", - "inotify-sys", - "libc", -] - -[[package]] -name = "inotify-sys" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" -dependencies = [ - "libc", -] - [[package]] name = "instant" version = "0.1.13" @@ -2675,43 +1465,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "jobserver" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" -dependencies = [ - "libc", -] - -[[package]] -name = "jpeg-decoder" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" - [[package]] name = "js-sys" version = "0.3.69" @@ -2721,43 +1474,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "khronos-egl" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" -dependencies = [ - "libc", - "libloading 0.8.4", - "pkg-config", -] - -[[package]] -name = "khronos_api" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" - -[[package]] -name = "kqueue" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" -dependencies = [ - "kqueue-sys", - "libc", -] - -[[package]] -name = "kqueue-sys" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" -dependencies = [ - "bitflags 1.3.2", - "libc", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -2770,53 +1486,12 @@ version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - -[[package]] -name = "libloading" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" -dependencies = [ - "cfg-if", - "windows-targets 0.52.5", -] - [[package]] name = "libm" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" -[[package]] -name = "libredox" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" -dependencies = [ - "bitflags 2.5.0", - "libc", - "redox_syscall 0.4.1", -] - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.5.0", - "libc", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -2849,7 +1524,6 @@ checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", - "serde", ] [[package]] @@ -2873,18 +1547,7 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" dependencies = [ - "twox-hash", -] - -[[package]] -name = "macaw" -version = "0.18.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fdbfdf07a7e53090afb7fd427eb0a4b46fc51cb484b2deba27b47919762dfb" -dependencies = [ - "glam", - "num-traits", - "serde", + "twox-hash", ] [[package]] @@ -2928,15 +1591,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "memmap2" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" -dependencies = [ - "libc", -] - [[package]] name = "memoffset" version = "0.7.1" @@ -2965,21 +1619,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "metal" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" -dependencies = [ - "bitflags 2.5.0", - "block", - "core-graphics-types", - "foreign-types", - "log", - "objc", - "paste", -] - [[package]] name = "mime" version = "0.3.17" @@ -3003,39 +1642,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", - "simd-adler32", -] - -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "naga" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843" -dependencies = [ - "bit-set", - "bitflags 2.5.0", - "codespan-reporting", - "hexf-parse", - "indexmap", - "log", - "num-traits", - "rustc-hash", - "spirv", - "termcolor", - "thiserror", - "unicode-xid", ] [[package]] @@ -3156,42 +1762,6 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "ndk" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" -dependencies = [ - "bitflags 2.5.0", - "jni-sys", - "log", - "ndk-sys", - "num_enum", - "raw-window-handle 0.6.2", - "thiserror", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-sys" -version = "0.5.0+25.2.9519653" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "never" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96aba5aa877601bb3f6dd6a63a969e1f82e60646e81e71b14496995e9853c91" - [[package]] name = "nix" version = "0.26.4" @@ -3210,25 +1780,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" -[[package]] -name = "notify" -version = "6.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" -dependencies = [ - "bitflags 2.5.0", - "crossbeam-channel", - "filetime", - "fsevent-sys", - "inotify", - "kqueue", - "libc", - "log", - "mio", - "walkdir", - "windows-sys 0.48.0", -] - [[package]] name = "ntapi" version = "0.4.1" @@ -3307,27 +1858,6 @@ dependencies = [ "libm", ] -[[package]] -name = "num_enum" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" -dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.68", -] - [[package]] name = "num_threads" version = "0.1.7" @@ -3344,7 +1874,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", - "objc_exception", ] [[package]] @@ -3358,156 +1887,6 @@ dependencies = [ "objc_id", ] -[[package]] -name = "objc-sys" -version = "0.2.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" - -[[package]] -name = "objc-sys" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" - -[[package]] -name = "objc2" -version = "0.3.0-beta.3.patch-leaks.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" -dependencies = [ - "block2 0.2.0-alpha.6", - "objc-sys 0.2.0-beta.2", - "objc2-encode 2.0.0-pre.2", -] - -[[package]] -name = "objc2" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" -dependencies = [ - "objc-sys 0.3.5", - "objc2-encode 3.0.0", -] - -[[package]] -name = "objc2" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" -dependencies = [ - "objc-sys 0.3.5", - "objc2-encode 4.0.3", -] - -[[package]] -name = "objc2-app-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" -dependencies = [ - "bitflags 2.5.0", - "block2 0.5.1", - "libc", - "objc2 0.5.2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation", - "objc2-quartz-core", -] - -[[package]] -name = "objc2-core-data" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" -dependencies = [ - "bitflags 2.5.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-image" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" -dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation", - "objc2-metal", -] - -[[package]] -name = "objc2-encode" -version = "2.0.0-pre.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" -dependencies = [ - "objc-sys 0.2.0-beta.2", -] - -[[package]] -name = "objc2-encode" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" - -[[package]] -name = "objc2-encode" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" - -[[package]] -name = "objc2-foundation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" -dependencies = [ - "bitflags 2.5.0", - "block2 0.5.1", - "libc", - "objc2 0.5.2", -] - -[[package]] -name = "objc2-metal" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" -dependencies = [ - "bitflags 2.5.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation", -] - -[[package]] -name = "objc2-quartz-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" -dependencies = [ - "bitflags 2.5.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation", - "objc2-metal", -] - -[[package]] -name = "objc_exception" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" -dependencies = [ - "cc", -] - [[package]] name = "objc_id" version = "0.1.1" @@ -3532,24 +1911,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "orbclient" -version = "0.3.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" -dependencies = [ - "libredox 0.0.2", -] - -[[package]] -name = "ordered-float" -version = "4.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ff2cf528c6c03d9ed653d6c4ce1dc0582dc4af309790ad92f07c1cd551b0be" -dependencies = [ - "num-traits", -] - [[package]] name = "ordered-stream" version = "0.2.0" @@ -3560,15 +1921,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "owned_ttf_parser" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b41438d2fc63c46c74a2203bf5ccd82c41ba04347b2fcf5754f230b167067d5" -dependencies = [ - "ttf-parser", -] - [[package]] name = "parking" version = "2.2.0" @@ -3593,7 +1945,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall", "smallvec", "windows-targets 0.52.5", ] @@ -3604,12 +1956,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pathdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" - [[package]] name = "peg" version = "0.6.3" @@ -3666,12 +2012,6 @@ dependencies = [ "futures-io", ] -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - [[package]] name = "planus" version = "0.3.1" @@ -3693,31 +2033,6 @@ dependencies = [ "skeptic", ] -[[package]] -name = "png" -version = "0.17.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "poll-promise" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6a58fecbf9da8965bcdb20ce4fd29788d1acee68ddbb64f0ba1b81bccdb7df" -dependencies = [ - "document-features", - "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", -] - [[package]] name = "polling" version = "2.8.0" @@ -3767,12 +2082,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "presser" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" - [[package]] name = "pretty_env_logger" version = "0.4.0" @@ -3800,16 +2109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -3821,26 +2121,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "profiling" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" -dependencies = [ - "profiling-procmacros", - "puffin", -] - -[[package]] -name = "profiling-procmacros" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" -dependencies = [ - "quote", - "syn 2.0.68", -] - [[package]] name = "puffin" version = "0.19.0" @@ -3863,29 +2143,18 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4936c085e48efc86f6d96609dc5086d1d236afe3ec4676f09b157a4f4be83ff6" dependencies = [ - "anyhow", - "crossbeam-channel", - "log", - "parking_lot", - "puffin", -] - -[[package]] -name = "pulldown-cmark" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" -dependencies = [ - "bitflags 2.5.0", - "memchr", - "unicase", + "anyhow", + "crossbeam-channel", + "log", + "parking_lot", + "puffin", ] [[package]] name = "pulldown-cmark" -version = "0.10.3" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76979bea66e7875e7509c4ec5300112b316af87fa7a252ca91c448b32dfe3993" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ "bitflags 2.5.0", "memchr", @@ -3910,15 +2179,6 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-xml" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" -dependencies = [ - "memchr", -] - [[package]] name = "quote" version = "1.0.36" @@ -3973,12 +2233,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" -[[package]] -name = "raw-window-handle" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" - [[package]] name = "rawpointer" version = "0.2.1" @@ -4005,28 +2259,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "re_analytics" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb5ef9e4371db07bf89ad4c528011adc3098f98a333a183a57cf237f906dfa3c" -dependencies = [ - "crossbeam", - "directories-next", - "ehttp", - "re_build_info", - "re_build_tools", - "re_log", - "serde", - "serde_json", - "sha2", - "thiserror", - "time", - "url", - "uuid", - "web-sys", -] - [[package]] name = "re_arrow2" version = "0.17.4" @@ -4084,51 +2316,7 @@ dependencies = [ "itertools", "libc", "parking_lot", - "re_analytics", - "re_build_info", -] - -[[package]] -name = "re_data_loader" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67151bdd68c1573090a56d2893ee60db1498941e05ad194d74b8795d6fb5b0d5" -dependencies = [ - "ahash", - "anyhow", - "image 0.24.9", - "once_cell", - "parking_lot", - "rayon", "re_build_info", - "re_build_tools", - "re_log", - "re_log_encoding", - "re_log_types", - "re_smart_channel", - "re_tracing", - "re_types", - "thiserror", - "walkdir", -] - -[[package]] -name = "re_data_source" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a0e0268ec19ba6d549c24f3d979b0b5d57fe55c7f9af386b473e0f80a4bf41" -dependencies = [ - "anyhow", - "itertools", - "rayon", - "re_build_tools", - "re_data_loader", - "re_log", - "re_log_encoding", - "re_log_types", - "re_smart_channel", - "re_tracing", - "re_ws_comms", ] [[package]] @@ -4156,37 +2344,6 @@ dependencies = [ "web-time", ] -[[package]] -name = "re_data_ui" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a280b35814e8ef60dae54e04a7717ebecc5161dc456a9878124e94869fdbcec" -dependencies = [ - "ahash", - "anyhow", - "bytemuck", - "egui", - "egui_extras", - "egui_plot", - "image 0.24.9", - "itertools", - "re_data_store", - "re_entity_db", - "re_error", - "re_format", - "re_log", - "re_log_types", - "re_renderer", - "re_smart_channel", - "re_tracing", - "re_types", - "re_types_blueprint", - "re_types_core", - "re_ui", - "re_viewer_context", - "rfd", -] - [[package]] name = "re_entity_db" version = "0.16.1" @@ -4211,8 +2368,6 @@ dependencies = [ "re_smart_channel", "re_tracing", "re_types_core", - "rmp-serde", - "serde", "thiserror", "web-time", ] @@ -4275,8 +2430,6 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d890d616f16b88ad231206ec9215737edefdbec679cf99ee933b285c708683e8" dependencies = [ - "ehttp", - "js-sys", "lz4_flex", "parking_lot", "re_build_info", @@ -4286,10 +2439,6 @@ dependencies = [ "re_tracing", "rmp-serde", "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "web-time", ] [[package]] @@ -4386,54 +2535,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "re_renderer" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be2aa2aa18d523ef6725d3e4d0089a4ccb751c794f0ab0965e765086b5ad273" -dependencies = [ - "ahash", - "anyhow", - "bitflags 2.5.0", - "bytemuck", - "cfg-if", - "cfg_aliases 0.2.1", - "clean-path", - "crossbeam", - "document-features", - "ecolor", - "enumset", - "getrandom", - "glam", - "gltf", - "half", - "itertools", - "macaw", - "never", - "notify", - "ordered-float", - "parking_lot", - "pathdiff", - "profiling", - "re_arrow2", - "re_build_tools", - "re_error", - "re_log", - "re_tracing", - "serde", - "slotmap", - "smallvec", - "static_assertions", - "thiserror", - "tinystl", - "tobj", - "type-map", - "walkdir", - "wasm-bindgen-futures", - "wgpu", - "wgpu-core", -] - [[package]] name = "re_sdk" version = "0.16.1" @@ -4449,13 +2550,11 @@ dependencies = [ "parking_lot", "re_build_info", "re_build_tools", - "re_data_loader", "re_log", "re_log_encoding", "re_log_types", "re_memory", "re_sdk_comms", - "re_smart_channel", "re_types_core", "thiserror", ] @@ -4469,7 +2568,6 @@ dependencies = [ "ahash", "crossbeam", "document-features", - "rand", "re_build_info", "re_log", "re_log_encoding", @@ -4487,195 +2585,8 @@ dependencies = [ "crossbeam", "parking_lot", "re_tracing", - "serde", - "web-time", -] - -[[package]] -name = "re_space_view" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3823d666ea85fa699ee0e0ee983ba2ab0bc8579dad144b2bf283876096530ec1" -dependencies = [ - "egui", - "itertools", - "nohash-hasher", - "re_data_store", - "re_entity_db", - "re_log", - "re_log_types", - "re_query", - "re_tracing", - "re_types", - "re_types_core", - "re_viewer_context", - "slotmap", - "smallvec", -] - -[[package]] -name = "re_space_view_bar_chart" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0029e4e1822c31973dc8628571ee6762acb8a2b7c0ea49453a196191235f2e" -dependencies = [ - "egui", - "egui_plot", - "re_data_store", - "re_entity_db", - "re_log", - "re_log_types", - "re_renderer", - "re_space_view", - "re_tracing", - "re_types", - "re_ui", - "re_viewer_context", -] - -[[package]] -name = "re_space_view_dataframe" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77b714132042e2407bba1b115183424a7ee55adde8670335ddcc131d628fc28b" -dependencies = [ - "egui", - "egui_extras", - "re_data_store", - "re_data_ui", - "re_entity_db", - "re_log_types", - "re_renderer", - "re_tracing", - "re_types_core", - "re_ui", - "re_viewer_context", -] - -[[package]] -name = "re_space_view_spatial" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e5f5d6b4c1b53b158464cdf0b710d5b50c4f498b742b2145d3c524d54b688b" -dependencies = [ - "ahash", - "anyhow", - "bitflags 2.5.0", - "bytemuck", - "egui", - "glam", - "itertools", - "macaw", - "nohash-hasher", - "once_cell", - "re_data_store", - "re_data_ui", - "re_entity_db", - "re_error", - "re_format", - "re_log", - "re_log_types", - "re_query", - "re_renderer", - "re_space_view", - "re_tracing", - "re_types", - "re_ui", - "re_viewer_context", - "serde", - "smallvec", - "web-time", -] - -[[package]] -name = "re_space_view_tensor" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4ccc9fb69c83f607041183e434fc8a46836ebc41689de1c0bbc4d51a9e13ab" -dependencies = [ - "ahash", - "anyhow", - "bytemuck", - "egui", - "half", - "ndarray", - "re_data_store", - "re_data_ui", - "re_entity_db", - "re_log", - "re_log_types", - "re_renderer", - "re_space_view", - "re_tracing", - "re_types", - "re_ui", - "re_viewer_context", - "serde", - "thiserror", - "wgpu", -] - -[[package]] -name = "re_space_view_text_document" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "485fe733be93f237db6155a3c1f983d425f6e2e532e468bb4f3313041a124aee" -dependencies = [ - "egui", - "egui_commonmark", - "re_data_store", - "re_log", - "re_renderer", - "re_space_view", - "re_tracing", - "re_types", - "re_ui", - "re_viewer_context", -] - -[[package]] -name = "re_space_view_text_log" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34a1d6ec934d08c56630a8775e2ce31d1b3f2b11e81c2d36d0daa37a6fafad31" -dependencies = [ - "egui", - "egui_extras", - "itertools", - "re_data_store", - "re_data_ui", - "re_entity_db", - "re_log", - "re_log_types", - "re_query", - "re_renderer", - "re_tracing", - "re_types", - "re_ui", - "re_viewer_context", -] - -[[package]] -name = "re_space_view_time_series" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c709670fd0afcee4572a2776cfd5a9e5b412303e71025d94a1fe619671cd8ac4" -dependencies = [ - "egui", - "egui_plot", - "itertools", - "rayon", - "re_data_store", - "re_format", - "re_log", - "re_log_types", - "re_query", - "re_renderer", - "re_space_view", - "re_tracing", - "re_types", - "re_ui", - "re_viewer_context", + "serde", + "web-time", ] [[package]] @@ -4692,27 +2603,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "re_time_panel" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065d8b63715272ba4a1985861ad6f0898498e5f82765572bc6b31f6c72b78600" -dependencies = [ - "egui", - "itertools", - "re_data_store", - "re_data_ui", - "re_entity_db", - "re_format", - "re_log_types", - "re_tracing", - "re_ui", - "re_viewer_context", - "re_viewport", - "serde", - "vec1", -] - [[package]] name = "re_tracing" version = "0.16.1" @@ -4748,12 +2638,8 @@ dependencies = [ "array-init", "bytemuck", "document-features", - "ecolor", - "egui_plot", "emath", - "glam", "half", - "image 0.24.9", "infer", "itertools", "linked-hash-map", @@ -4772,8 +2658,6 @@ dependencies = [ "smallvec", "thiserror", "uuid", - "zune-core", - "zune-jpeg", ] [[package]] @@ -4841,232 +2725,12 @@ dependencies = [ "thiserror", ] -[[package]] -name = "re_ui" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d0e778cfafcc306ce2afe910b195eecc584b3fe7bed759750935198e2be714" -dependencies = [ - "eframe", - "egui", - "egui_commonmark", - "egui_extras", - "egui_tiles", - "parking_lot", - "rand", - "re_entity_db", - "re_format", - "re_log", - "re_log_types", - "serde", - "serde_json", - "strum 0.25.0", - "strum_macros 0.25.3", - "sublime_fuzzy", -] - -[[package]] -name = "re_viewer" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a066652e7efc85fe6a87bafe148e1ff67d48ec1d9094d78003bdf0f2eb52c2" -dependencies = [ - "ahash", - "anyhow", - "bytemuck", - "cfg-if", - "eframe", - "egui", - "egui-wgpu", - "egui_extras", - "egui_plot", - "egui_tiles", - "ehttp", - "image 0.24.9", - "itertools", - "js-sys", - "once_cell", - "poll-promise", - "re_analytics", - "re_build_info", - "re_build_tools", - "re_data_loader", - "re_data_source", - "re_data_store", - "re_data_ui", - "re_entity_db", - "re_error", - "re_format", - "re_log", - "re_log_encoding", - "re_log_types", - "re_memory", - "re_query", - "re_renderer", - "re_sdk_comms", - "re_smart_channel", - "re_space_view", - "re_space_view_bar_chart", - "re_space_view_dataframe", - "re_space_view_spatial", - "re_space_view_tensor", - "re_space_view_text_document", - "re_space_view_text_log", - "re_space_view_time_series", - "re_time_panel", - "re_tracing", - "re_types", - "re_types_blueprint", - "re_types_core", - "re_ui", - "re_viewer_context", - "re_viewport", - "re_ws_comms", - "rfd", - "ron", - "serde", - "serde_json", - "static_assertions", - "thiserror", - "time", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "web-time", - "wgpu", -] - -[[package]] -name = "re_viewer_context" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad47e4d58a5221abc5ef2a6c5a849157068e5c63885f810ce099631cdf0b7e8" -dependencies = [ - "ahash", - "anyhow", - "arboard", - "bit-vec", - "bytemuck", - "egui", - "egui-wgpu", - "egui_tiles", - "glam", - "half", - "indexmap", - "itertools", - "macaw", - "ndarray", - "nohash-hasher", - "once_cell", - "parking_lot", - "re_data_source", - "re_data_store", - "re_entity_db", - "re_log", - "re_log_types", - "re_query", - "re_renderer", - "re_smart_channel", - "re_string_interner", - "re_tracing", - "re_types", - "re_ui", - "serde", - "slotmap", - "smallvec", - "thiserror", - "uuid", - "wgpu", -] - -[[package]] -name = "re_viewport" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64dab6c9867e80350d776e11e784e5af0f7ca49c6d11a2b4b62b7a17158d43e1" -dependencies = [ - "ahash", - "egui", - "egui_tiles", - "glam", - "image 0.24.9", - "itertools", - "nohash-hasher", - "once_cell", - "rayon", - "re_data_store", - "re_data_ui", - "re_entity_db", - "re_log", - "re_log_types", - "re_renderer", - "re_smart_channel", - "re_space_view", - "re_tracing", - "re_types", - "re_types_blueprint", - "re_types_core", - "re_ui", - "re_viewer_context", - "smallvec", - "static_assertions", -] - -[[package]] -name = "re_web_viewer_server" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01bbf645e190288321bc3d6eed971035c55fcef078c8bacd63e927eb91933e54" -dependencies = [ - "document-features", - "re_analytics", - "re_log", - "thiserror", - "tiny_http", -] - -[[package]] -name = "re_ws_comms" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b66f7be4ac70f837b87437a232ee012f46de3ff3c0be60ec7ee865187f3b91e" -dependencies = [ - "anyhow", - "bincode", - "document-features", - "ewebsock", - "re_format", - "re_log", - "re_log_types", - "re_memory", - "re_tracing", - "thiserror", -] - [[package]] name = "reborrow" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.2" @@ -5076,17 +2740,6 @@ dependencies = [ "bitflags 2.5.0", ] -[[package]] -name = "redox_users" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" -dependencies = [ - "getrandom", - "libredox 0.1.3", - "thiserror", -] - [[package]] name = "regex" version = "1.10.5" @@ -5122,12 +2775,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "renderdoc-sys" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" - [[package]] name = "rerun" version = "0.16.1" @@ -5136,12 +2783,9 @@ checksum = "591ea8198d8485f834c4c8f1f65928ea0f364fd6326139f946dd37ad35e61cf0" dependencies = [ "anyhow", "document-features", - "env_logger 0.10.2", "itertools", - "log", "puffin", "rayon", - "re_analytics", "re_build_info", "re_build_tools", "re_crash_handler", @@ -5151,12 +2795,9 @@ dependencies = [ "re_log_types", "re_memory", "re_sdk", - "re_sdk_comms", "re_smart_channel", "re_tracing", "re_types", - "re_viewer", - "re_web_viewer_server", ] [[package]] @@ -5176,7 +2817,7 @@ dependencies = [ "objc-foundation", "objc_id", "pollster", - "raw-window-handle 0.5.2", + "raw-window-handle", "urlencoding", "wasm-bindgen", "wasm-bindgen-futures", @@ -5184,21 +2825,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - [[package]] name = "rmp" version = "0.8.14" @@ -5221,18 +2847,6 @@ dependencies = [ "serde", ] -[[package]] -name = "ron" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" -dependencies = [ - "base64 0.21.7", - "bitflags 2.5.0", - "serde", - "serde_derive", -] - [[package]] name = "rust-format" version = "0.3.4" @@ -5245,12 +2859,6 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc_version" version = "0.4.0" @@ -5287,37 +2895,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" -dependencies = [ - "log", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" - -[[package]] -name = "rustls-webpki" -version = "0.102.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.17" @@ -5348,12 +2925,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scopeguard" version = "1.2.0" @@ -5470,12 +3041,6 @@ dependencies = [ "wide", ] -[[package]] -name = "simd-adler32" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" - [[package]] name = "simdutf8" version = "0.1.4" @@ -5512,7 +3077,7 @@ dependencies = [ "cargo_metadata 0.14.2", "error-chain", "glob", - "pulldown-cmark 0.9.6", + "pulldown-cmark", "tempfile", "walkdir", ] @@ -5521,74 +3086,16 @@ dependencies = [ name = "slab" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "slotmap" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" -dependencies = [ - "serde", - "version_check", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -dependencies = [ - "serde", -] - -[[package]] -name = "smithay-client-toolkit" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" -dependencies = [ - "bitflags 2.5.0", - "calloop", - "calloop-wayland-source", - "cursor-icon", - "libc", - "log", - "memmap2", - "rustix 0.38.34", - "thiserror", - "wayland-backend", - "wayland-client", - "wayland-csd-frame", - "wayland-cursor", - "wayland-protocols", - "wayland-protocols-wlr", - "wayland-scanner", - "xkeysym", -] - -[[package]] -name = "smithay-clipboard" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c091e7354ea8059d6ad99eace06dd13ddeedbb0ac72d40a9a6e7ff790525882d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "libc", - "smithay-client-toolkit", - "wayland-backend", + "autocfg", ] [[package]] -name = "smol_str" -version = "0.2.2" +name = "smallvec" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" -dependencies = [ - "serde", -] +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -5600,55 +3107,18 @@ dependencies = [ "winapi", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "spirv" -version = "0.3.0+sdk-1.3.268.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" -dependencies = [ - "bitflags 2.5.0", -] - [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -dependencies = [ - "strum_macros 0.25.3", -] - [[package]] name = "strum" version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.68", -] - [[package]] name = "strum_macros" version = "0.26.4" @@ -5662,18 +3132,6 @@ dependencies = [ "syn 2.0.68", ] -[[package]] -name = "sublime_fuzzy" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7986063f7c0ab374407e586d7048a3d5aac94f103f751088bf398e07cd5400" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - [[package]] name = "syn" version = "1.0.109" @@ -5721,7 +3179,7 @@ dependencies = [ "libc", "ntapi", "once_cell", - "windows 0.52.0", + "windows", ] [[package]] @@ -5765,17 +3223,6 @@ dependencies = [ "syn 2.0.68", ] -[[package]] -name = "tiff" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" -dependencies = [ - "flate2", - "jpeg-decoder", - "weezl", -] - [[package]] name = "time" version = "0.3.36" @@ -5810,27 +3257,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny_http" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82" -dependencies = [ - "ascii", - "chunked_transfer", - "httpdate", - "log", -] - -[[package]] -name = "tinystl" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbcdda2f86a57b89b5d9ac17cd4c9f3917ec8edcde403badf3d992d2947af2a" -dependencies = [ - "bytemuck", -] - [[package]] name = "tinyvec" version = "1.6.1" @@ -5846,15 +3272,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" -[[package]] -name = "tobj" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bd4ba05f29e4c65b6c0c11a58b6465ffa820bac890d76ad407b4e81d8372e8" -dependencies = [ - "ahash", -] - [[package]] name = "toml_datetime" version = "0.6.6" @@ -5872,17 +3289,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - [[package]] name = "tracing" version = "0.1.40" @@ -5915,31 +3321,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "ttf-parser" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" - -[[package]] -name = "tungstenite" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "url", - "utf-8", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -5950,15 +3331,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "type-map" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" -dependencies = [ - "rustc-hash", -] - [[package]] name = "typeid" version = "1.0.0" @@ -6048,41 +3420,12 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "unindent" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "ureq" -version = "2.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" -dependencies = [ - "base64 0.22.1", - "flate2", - "log", - "once_cell", - "rustls", - "rustls-pki-types", - "rustls-webpki", - "url", - "webpki-roots", -] - [[package]] name = "url" version = "2.5.2" @@ -6101,12 +3444,6 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "uuid" version = "1.9.1" @@ -6118,12 +3455,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "vec1" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab68b56840f69efb0fefbe3ab6661499217ffdc58e2eef7c3f6f69835386322" - [[package]] name = "version_check" version = "0.9.4" @@ -6133,367 +3464,109 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "waker-fn" version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.68", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.68", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "wasm-streams" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "wayland-backend" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e9e6b6d4a2bb4e7e69433e0b35c7923b95d4dc8503a84d25ec917a4bbfdf07" -dependencies = [ - "cc", - "downcast-rs", - "rustix 0.38.34", - "scoped-tls", - "smallvec", - "wayland-sys", -] - -[[package]] -name = "wayland-client" -version = "0.31.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e63801c85358a431f986cffa74ba9599ff571fc5774ac113ed3b490c19a1133" -dependencies = [ - "bitflags 2.5.0", - "rustix 0.38.34", - "wayland-backend", - "wayland-scanner", -] - -[[package]] -name = "wayland-csd-frame" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" -dependencies = [ - "bitflags 2.5.0", - "cursor-icon", - "wayland-backend", -] - -[[package]] -name = "wayland-cursor" -version = "0.31.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a206e8b2b53b1d3fcb9428fec72bc278ce539e2fa81fe2bfc1ab27703d5187b9" -dependencies = [ - "rustix 0.38.34", - "wayland-client", - "xcursor", -] - -[[package]] -name = "wayland-protocols" -version = "0.31.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" -dependencies = [ - "bitflags 2.5.0", - "wayland-backend", - "wayland-client", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-plasma" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" -dependencies = [ - "bitflags 2.5.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] -name = "wayland-protocols-wlr" -version = "0.2.0" +name = "walkdir" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ - "bitflags 2.5.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", + "same-file", + "winapi-util", ] [[package]] -name = "wayland-scanner" -version = "0.31.2" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67da50b9f80159dec0ea4c11c13e24ef9e7574bd6ce24b01860a175010cea565" -dependencies = [ - "proc-macro2", - "quick-xml", - "quote", -] +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wayland-sys" -version = "0.31.2" +name = "wasm-bindgen" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "105b1842da6554f91526c14a2a2172897b7f745a805d62af4ce698706be79c12" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ - "dlib", - "log", - "once_cell", - "pkg-config", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] -name = "web-sys" -version = "0.3.69" +name = "wasm-bindgen-backend" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ - "js-sys", - "wasm-bindgen", + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.68", + "wasm-bindgen-shared", ] [[package]] -name = "web-time" -version = "0.2.4" +name = "wasm-bindgen-futures" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ + "cfg-if", "js-sys", "wasm-bindgen", -] - -[[package]] -name = "webbrowser" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db67ae75a9405634f5882791678772c94ff5f16a66535aae186e26aa0841fc8b" -dependencies = [ - "core-foundation", - "home", - "jni", - "log", - "ndk-context", - "objc", - "raw-window-handle 0.5.2", - "url", "web-sys", ] [[package]] -name = "webpki-roots" -version = "0.26.3" +name = "wasm-bindgen-macro" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ - "rustls-pki-types", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "weezl" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" - -[[package]] -name = "wgpu" -version = "0.19.4" +name = "wasm-bindgen-macro-support" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd7311dbd2abcfebaabf1841a2824ed7c8be443a0f29166e5d3c6a53a762c01" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ - "arrayvec", - "cfg-if", - "cfg_aliases 0.1.1", - "js-sys", - "log", - "naga", - "parking_lot", - "profiling", - "raw-window-handle 0.6.2", - "smallvec", - "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu-core", - "wgpu-hal", - "wgpu-types", + "proc-macro2", + "quote", + "syn 2.0.68", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] -name = "wgpu-core" -version = "0.19.4" +name = "wasm-bindgen-shared" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b94525fc99ba9e5c9a9e24764f2bc29bad0911a7446c12f446a8277369bf3a" -dependencies = [ - "arrayvec", - "bit-vec", - "bitflags 2.5.0", - "cfg_aliases 0.1.1", - "codespan-reporting", - "indexmap", - "log", - "naga", - "once_cell", - "parking_lot", - "profiling", - "raw-window-handle 0.6.2", - "rustc-hash", - "smallvec", - "thiserror", - "web-sys", - "wgpu-hal", - "wgpu-types", -] +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] -name = "wgpu-hal" -version = "0.19.4" +name = "web-sys" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1a4924366df7ab41a5d8546d6534f1f33231aa5b3f72b9930e300f254e39c3" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ - "android_system_properties", - "arrayvec", - "ash", - "bitflags 2.5.0", - "block", - "cfg_aliases 0.1.1", - "core-graphics-types", - "glow", - "glutin_wgl_sys", - "gpu-alloc", - "gpu-allocator", - "gpu-descriptor", - "hassle-rs", "js-sys", - "khronos-egl", - "libc", - "libloading 0.8.4", - "log", - "metal", - "naga", - "ndk-sys", - "objc", - "once_cell", - "parking_lot", - "profiling", - "raw-window-handle 0.6.2", - "renderdoc-sys", - "rustc-hash", - "smallvec", - "thiserror", "wasm-bindgen", - "web-sys", - "wgpu-types", - "winapi", ] [[package]] -name = "wgpu-types" -version = "0.19.2" +name = "web-time" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b671ff9fb03f78b46ff176494ee1ebe7d603393f42664be55b64dc8d53969805" +checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" dependencies = [ - "bitflags 2.5.0", "js-sys", - "web-sys", + "wasm-bindgen", ] [[package]] @@ -6506,12 +3579,6 @@ dependencies = [ "safe_arch", ] -[[package]] -name = "widestring" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" - [[package]] name = "winapi" version = "0.3.9" @@ -6543,17 +3610,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-targets 0.48.5", -] - [[package]] name = "windows" version = "0.52.0" @@ -6573,37 +3629,6 @@ dependencies = [ "windows-targets 0.52.5", ] -[[package]] -name = "windows-implement" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "windows-interface" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -6622,21 +3647,6 @@ dependencies = [ "windows-targets 0.52.5", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -6668,12 +3678,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.5", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -6686,12 +3690,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -6704,12 +3702,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -6728,12 +3720,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -6746,12 +3732,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -6764,12 +3744,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -6782,12 +3756,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -6800,53 +3768,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" -[[package]] -name = "winit" -version = "0.29.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" -dependencies = [ - "ahash", - "android-activity", - "atomic-waker", - "bitflags 2.5.0", - "bytemuck", - "calloop", - "cfg_aliases 0.1.1", - "core-foundation", - "core-graphics", - "cursor-icon", - "icrate", - "js-sys", - "libc", - "log", - "memmap2", - "ndk", - "ndk-sys", - "objc2 0.4.1", - "once_cell", - "orbclient", - "percent-encoding", - "raw-window-handle 0.6.2", - "redox_syscall 0.3.5", - "rustix 0.38.34", - "smithay-client-toolkit", - "smol_str", - "unicode-segmentation", - "wasm-bindgen", - "wasm-bindgen-futures", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-plasma", - "web-sys", - "web-time", - "windows-sys 0.48.0", - "x11-dl", - "x11rb", - "xkbcommon-dl", -] - [[package]] name = "winnow" version = "0.5.40" @@ -6856,44 +3777,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "x11-dl" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" -dependencies = [ - "libc", - "once_cell", - "pkg-config", -] - -[[package]] -name = "x11rb" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" -dependencies = [ - "as-raw-xcb-connection", - "gethostname", - "libc", - "libloading 0.8.4", - "once_cell", - "rustix 0.38.34", - "x11rb-protocol", -] - -[[package]] -name = "x11rb-protocol" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" - -[[package]] -name = "xcursor" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" - [[package]] name = "xdg-home" version = "1.2.0" @@ -6904,31 +3787,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "xkbcommon-dl" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" -dependencies = [ - "bitflags 2.5.0", - "dlib", - "log", - "once_cell", - "xkeysym", -] - -[[package]] -name = "xkeysym" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" - -[[package]] -name = "xml-rs" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" - [[package]] name = "xshell" version = "0.2.6" @@ -6991,7 +3849,7 @@ version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "regex", @@ -7030,27 +3888,6 @@ dependencies = [ "syn 2.0.68", ] -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - -[[package]] -name = "zune-core" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" - -[[package]] -name = "zune-jpeg" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec866b44a2a1fd6133d363f073ca1b179f438f99e7e5bfb1e33f7181facfe448" -dependencies = [ - "zune-core", -] - [[package]] name = "zvariant" version = "3.15.2" @@ -7072,7 +3909,7 @@ version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", diff --git a/Cargo.toml b/Cargo.toml index aab7b33..34e3f6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,9 @@ typetag = { version = "0.2.16", optional = true } serde_json = { version = "1.0.120", optional = true } # rerun support -rerun = { version = "0.16.1", optional = true } +rerun = { version = "0.16.1", optional = true, default-features = false, features = [ + "sdk", +] } [features] # Run everything with f32 instead of the defaul f64 diff --git a/examples/g2o-rerun.rs b/examples/g2o-rerun.rs index f1afe4c..bb7edc5 100644 --- a/examples/g2o-rerun.rs +++ b/examples/g2o-rerun.rs @@ -5,8 +5,8 @@ use std::{ }; use factrs::{ - optimizers::{GaussNewton, Optimizer}, - rerun::RerunSender, + optimizers::{GaussNewton, GraphOptimizer, Optimizer}, + rerun::RerunObserver, utils::load_g20, variables::*, }; @@ -46,20 +46,20 @@ fn main() -> Result<(), Box> { let topic = "base/solution"; match (dim, obj) { ("se2", "points") => { - let callback = RerunSender::::new(rec, topic); - optimizer.params.add_callback(callback) + let callback = RerunObserver::::new(rec, topic); + optimizer.observers.add(callback) } ("se2", "arrows") => { - let callback = RerunSender::::new(rec, topic); - optimizer.params.add_callback(callback) + let callback = RerunObserver::::new(rec, topic); + optimizer.observers.add(callback) } ("se3", "points") => { - let callback = RerunSender::::new(rec, topic); - optimizer.params.add_callback(callback) + let callback = RerunObserver::::new(rec, topic); + optimizer.observers.add(callback) } ("se3", "arrows") => { - let callback = RerunSender::::new(rec, topic); - optimizer.params.add_callback(callback) + let callback = RerunObserver::::new(rec, topic); + optimizer.observers.add(callback) } _ => panic!("Invalid arguments"), }; diff --git a/examples/g2o.rs b/examples/g2o.rs index 8e8920e..6ba81b2 100644 --- a/examples/g2o.rs +++ b/examples/g2o.rs @@ -1,7 +1,7 @@ use std::{env, time::Instant}; use factrs::{ - optimizers::{GaussNewton, Optimizer}, + optimizers::{GaussNewton, GraphOptimizer, Optimizer}, utils::load_g20, }; fn main() { diff --git a/src/containers/values.rs b/src/containers/values.rs index 3718875..e024492 100644 --- a/src/containers/values.rs +++ b/src/containers/values.rs @@ -62,6 +62,13 @@ impl Values { self.values.get_mut(key) } + // TODO: This should be some kind of error + pub fn get_mut_cast(&mut self, key: &Symbol) -> Option<&mut T> { + self.values + .get_mut(key) + .and_then(|value| value.downcast_mut::()) + } + pub fn remove(&mut self, key: &Symbol) -> Option> { self.values.remove(key) } diff --git a/src/linear/values.rs b/src/linear/values.rs index 28d0caa..a7092ae 100644 --- a/src/linear/values.rs +++ b/src/linear/values.rs @@ -16,18 +16,27 @@ impl LinearValues { Self { values, order } } - pub fn from_order_and_values(order: ValuesOrder, values: VectorX) -> Self { + pub fn zero_from_values(values: &Values) -> Self { + let order = ValuesOrder::from_values(values); + let values = VectorX::zeros(order.dim()); + Self { values, order } + } + + pub fn from_order_and_vector(order: ValuesOrder, values: VectorX) -> Self { assert!( values.len() == order.dim(), - "Values and order must have the same dimension when creating LinearValues" + "Vector and order must have the same dimension when creating LinearValues" ); Self { values, order } } - pub fn zero_from_values(values: &Values) -> Self { + pub fn from_values_and_vector(values: &Values, vector: VectorX) -> Self { let order = ValuesOrder::from_values(values); - let values = VectorX::zeros(order.dim()); - Self { values, order } + assert!( + vector.len() == order.dim(), + "Vector and values must have the same dimension when creating LinearValues" + ); + Self::from_order_and_vector(order, vector) } pub fn len(&self) -> usize { @@ -96,11 +105,11 @@ mod test { } #[test] - fn from_order_and_values() { + fn from_order_and_vector() { let (order, vector) = make_order_vector(); // Create LinearValues - let linear_values = LinearValues::from_order_and_values(order, vector); + let linear_values = LinearValues::from_order_and_vector(order, vector); assert!(linear_values.len() == 3); assert!(linear_values.dim() == 11); assert!(linear_values.get(&X(0)).unwrap().len() == 2); @@ -114,6 +123,6 @@ mod test { fn mismatched_size() { let (order, vector) = make_order_vector(); let vector = vector.push(0.0); - LinearValues::from_order_and_values(order, vector); + LinearValues::from_order_and_vector(order, vector); } } diff --git a/src/optimizers/gauss_newton.rs b/src/optimizers/gauss_newton.rs index f397fc1..d7e23de 100644 --- a/src/optimizers/gauss_newton.rs +++ b/src/optimizers/gauss_newton.rs @@ -1,6 +1,6 @@ use faer_ext::IntoNalgebra; -use super::{OptResult, Optimizer, OptimizerParams}; +use super::{GraphOptimizer, OptObserverVec, OptParams, OptResult, Optimizer}; use crate::{ containers::{Graph, GraphOrder, Values, ValuesOrder}, linalg::DiffResult, @@ -11,17 +11,19 @@ use crate::{ pub struct GaussNewton { graph: Graph, solver: S, - pub params: OptimizerParams, + pub params: OptParams, + pub observers: OptObserverVec, // For caching computation between steps graph_order: Option, } -impl Optimizer for GaussNewton { +impl GraphOptimizer for GaussNewton { fn new(graph: Graph) -> Self { Self { graph, solver: S::default(), - params: OptimizerParams::default(), + observers: OptObserverVec::default(), + params: OptParams::default(), graph_order: None, } } @@ -29,8 +31,20 @@ impl Optimizer for GaussNewton { fn graph(&self) -> &Graph { &self.graph } +} + +impl Optimizer for GaussNewton { + type Input = Values; + + fn observers(&self) -> &OptObserverVec { + &self.observers + } + + fn error(&self, values: &Values) -> crate::dtype { + self.graph.error(values) + } - fn params(&self) -> &OptimizerParams { + fn params(&self) -> &OptParams { &self.params } @@ -43,7 +57,7 @@ impl Optimizer for GaussNewton { ); } - fn step(&mut self, mut values: Values) -> OptResult { + fn step(&mut self, mut values: Values) -> OptResult { // Solve the linear system let linear_graph = self.graph.linearize(&values); let DiffResult { value: r, diff: j } = @@ -59,7 +73,7 @@ impl Optimizer for GaussNewton { .clone_owned(); // Update the values - let dx = LinearValues::from_order_and_values( + let dx = LinearValues::from_order_and_vector( self.graph_order.as_ref().unwrap().order.clone(), delta, ); diff --git a/src/optimizers/levenberg_marquardt.rs b/src/optimizers/levenberg_marquardt.rs index 31df401..c3a2189 100644 --- a/src/optimizers/levenberg_marquardt.rs +++ b/src/optimizers/levenberg_marquardt.rs @@ -3,7 +3,7 @@ use std::ops::Mul; use faer::{scale, sparse::SparseColMat}; use faer_ext::IntoNalgebra; -use super::{OptError, OptResult, Optimizer, OptimizerParams}; +use super::{GraphOptimizer, OptError, OptObserverVec, OptParams, OptResult, Optimizer}; use crate::{ containers::{Graph, GraphOrder, Values, ValuesOrder}, dtype, @@ -32,20 +32,22 @@ impl Default for LevenParams { pub struct LevenMarquardt { graph: Graph, solver: S, - pub params_base: OptimizerParams, + pub params_base: OptParams, pub params_leven: LevenParams, + observers: OptObserverVec, lambda: dtype, // For caching computation between steps graph_order: Option, } -impl Optimizer for LevenMarquardt { +impl GraphOptimizer for LevenMarquardt { fn new(graph: Graph) -> Self { Self { graph, solver: S::default(), - params_base: OptimizerParams::default(), + params_base: OptParams::default(), params_leven: LevenParams::default(), + observers: OptObserverVec::default(), lambda: 1e-5, graph_order: None, } @@ -54,11 +56,23 @@ impl Optimizer for LevenMarquardt { fn graph(&self) -> &Graph { &self.graph } +} + +impl Optimizer for LevenMarquardt { + type Input = Values; + + fn observers(&self) -> &OptObserverVec { + &self.observers + } - fn params(&self) -> &OptimizerParams { + fn params(&self) -> &OptParams { &self.params_base } + fn error(&self, values: &Values) -> crate::dtype { + self.graph.error(values) + } + fn init(&mut self, _values: &Values) { // TODO: Some way to manual specify how to computer ValuesOrder // Precompute the sparsity pattern @@ -70,7 +84,7 @@ impl Optimizer for LevenMarquardt { // TODO: Some form of logging of the lambda value // TODO: More sophisticated stopping criteria based on magnitude of the gradient - fn step(&mut self, mut values: Values) -> OptResult { + fn step(&mut self, mut values: Values) -> OptResult { // Make an ordering let order = ValuesOrder::from_values(&values); @@ -122,7 +136,7 @@ impl Optimizer for LevenMarquardt { .into_nalgebra() .column(0) .clone_owned(); - dx = LinearValues::from_order_and_values( + dx = LinearValues::from_order_and_vector( self.graph_order.as_ref().unwrap().order.clone(), delta, ); diff --git a/src/optimizers/mod.rs b/src/optimizers/mod.rs index 2062e96..6cd4462 100644 --- a/src/optimizers/mod.rs +++ b/src/optimizers/mod.rs @@ -1,5 +1,13 @@ mod traits; -pub use traits::{OptError, OptResult, Optimizer, OptimizerCallback, OptimizerParams}; +pub use traits::{ + GraphOptimizer, + OptError, + OptObserver, + OptObserverVec, + OptParams, + OptResult, + Optimizer, +}; mod macros; @@ -30,7 +38,7 @@ pub mod test { T: 'static + VariableUmbrella>, UnitNoise: NoiseModelSafe, PriorResidual: ResidualSafe, - O: Optimizer, + O: Optimizer + GraphOptimizer, { let t = VectorX::from_fn(T::DIM, |_, i| ((i + 1) as dtype) / 10.0); let p = T::exp(t.as_view()); @@ -63,7 +71,7 @@ pub mod test { ResidualSafe + Residual, DimOut = Const, NumVars = Const<1>>, BetweenResidual: ResidualSafe + Residual, DimOut = Const, NumVars = Const<2>>, - O: Optimizer, + O: Optimizer + GraphOptimizer, { let t = VectorX::from_fn(T::DIM, |_, i| ((i as dtype) - (T::DIM as dtype)) / 10.0); let p1 = T::exp(t.as_view()); diff --git a/src/optimizers/traits.rs b/src/optimizers/traits.rs index c380657..78a4a62 100644 --- a/src/optimizers/traits.rs +++ b/src/optimizers/traits.rs @@ -1,71 +1,82 @@ -use crate::{ - containers::{Graph, Values}, - dtype, -}; +use crate::{containers::Graph, dtype}; #[derive(Debug)] pub enum OptError { - MaxIterations(Values), + MaxIterations, InvalidSystem, FailedToStep, } -pub type OptResult = Result; +pub type OptResult = Result; -pub struct OptimizerParams { +// ------------------------- Optimizer Params ------------------------- // +pub struct OptParams { pub max_iterations: usize, pub error_tol_relative: dtype, pub error_tol_absolute: dtype, pub error_tol: dtype, - pub callbacks: Vec>, } -pub trait OptimizerCallback { - fn on_step(&self, values: &Values, time: f64); -} - -impl Default for OptimizerParams { +impl Default for OptParams { fn default() -> Self { Self { max_iterations: 100, error_tol_relative: 1e-6, error_tol_absolute: 1e-6, error_tol: 0.0, - callbacks: Vec::new(), } } } -impl OptimizerParams { - pub fn add_callback(&mut self, callback: impl OptimizerCallback + 'static) { +// ------------------------- Optimizer Observers ------------------------- // +pub trait OptObserver { + type Input; + fn on_step(&self, values: &Self::Input, time: f64); +} + +pub struct OptObserverVec { + observers: Vec>>, +} + +impl OptObserverVec { + pub fn add(&mut self, callback: impl OptObserver + 'static) { let boxed = Box::new(callback); - self.callbacks.push(boxed); + self.observers.push(boxed); } - pub fn notify_callbacks(&self, values: &Values, idx: usize) { - for callback in &self.callbacks { + pub fn notify(&self, values: &I, idx: usize) { + for callback in &self.observers { callback.on_step(values, idx as f64); } } } +impl Default for OptObserverVec { + fn default() -> Self { + Self { + observers: Vec::new(), + } + } +} + +// ------------------------- Actual Trait Impl ------------------------- // pub trait Optimizer { - fn new(graph: Graph) -> Self; + type Input; - fn graph(&self) -> &Graph; + // Wrappers for setup + fn observers(&self) -> &OptObserverVec; - fn params(&self) -> &OptimizerParams; + fn params(&self) -> &OptParams; - fn step(&mut self, values: Values) -> OptResult; + // Core optimization functions + fn step(&mut self, values: Self::Input) -> OptResult; - fn error(&self, values: &Values) -> dtype { - self.graph().error(values) - } + fn error(&self, values: &Self::Input) -> dtype; - fn init(&mut self, _values: &Values) {} + fn init(&mut self, _values: &Self::Input) {} // TODO: Custom logging based on optimizer - fn optimize(&mut self, mut values: Values) -> OptResult { + fn optimize(&mut self, mut values: Self::Input) -> OptResult { // Setup up everything from our values self.init(&values); @@ -118,8 +129,8 @@ pub trait Optimizer { error_decrease_rel ); - // Notify callbacks - self.params().notify_callbacks(&values, i); + // Notify observers + self.observers().notify(&values, i); // Check if we need to stop if error_new <= self.params().error_tol { @@ -136,6 +147,12 @@ pub trait Optimizer { } } - Err(OptError::MaxIterations(values)) + Err(OptError::MaxIterations) } } + +pub trait GraphOptimizer: Optimizer { + fn new(graph: Graph) -> Self; + + fn graph(&self) -> &Graph; +} diff --git a/src/rerun.rs b/src/rerun.rs index 70e8ee7..4e099fc 100644 --- a/src/rerun.rs +++ b/src/rerun.rs @@ -13,8 +13,8 @@ use rerun::{ use crate::{ containers::Values, - optimizers::OptimizerCallback, - variables::{MatrixLieGroup, Variable, VectorVar2, VectorVar3, SE2, SE3, SO2, SO3}, + optimizers::OptObserver, + variables::{MatrixLieGroup, VariableUmbrella, VectorVar2, VectorVar3, SE2, SE3, SO2, SO3}, }; /* Each of our fact.rs types can be turned into a handful of rerun types. These include, @@ -351,9 +351,9 @@ impl<'a> FromIterator<&'a SE3> for Points3D { } // ------------------------- Streamer ------------------------- // -pub struct RerunSender +pub struct RerunObserver where - V: Variable + 'static, + V: VariableUmbrella + 'static, R: AsComponents, for<'a> R: FromIterator<&'a V>, { @@ -363,9 +363,9 @@ where v_phantom: std::marker::PhantomData, } -impl RerunSender +impl RerunObserver where - V: Variable + 'static, + V: VariableUmbrella + 'static, R: AsComponents, for<'a> R: FromIterator<&'a V>, { @@ -379,12 +379,14 @@ where } } -impl OptimizerCallback for RerunSender +impl OptObserver for RerunObserver where - V: Variable + 'static, + V: VariableUmbrella + 'static, R: AsComponents, for<'a> R: FromIterator<&'a V>, { + type Input = Values; + fn on_step(&self, values: &Values, idx: f64) { self.rec.set_time_seconds("stable_time", idx); let sol: R = values.filter::().collect(); From e8a9106f22c304c153420738b66da032ba9ccb39 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Wed, 10 Jul 2024 11:52:46 -0400 Subject: [PATCH 13/17] Updated NoiseModelSafe serialization. Blanket impl is back, conditioned on serial --- src/lib.rs | 37 ++++++++++++++++++++++++++++ src/noise/gaussian.rs | 3 ++- src/noise/mod.rs | 56 +++++++++++++++++++++++++------------------ src/noise/unit.rs | 7 ++++-- 4 files changed, 77 insertions(+), 26 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e21fb76..8867266 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,3 +19,40 @@ pub mod variables; #[cfg(feature = "rerun")] pub mod rerun; + +#[cfg(feature = "serde")] +pub mod serde { + pub trait Tagged: serde::Serialize { + const TAG: &'static str; + } + + #[macro_export] + macro_rules! register_typetag { + ($trait:path, $ty:ty) => { + // TODO: It'd be great if this was a blanket implementation, but + // I had problems getting it to run over const generics + impl $crate::serde::Tagged for $ty { + const TAG: &'static str = stringify!($ty); + } + + typetag::__private::inventory::submit! { + ::typetag_register( + <$ty as $crate::noise::Tagged>::TAG, + (|deserializer| typetag::__private::Result::Ok( + typetag::__private::Box::new( + typetag::__private::erased_serde::deserialize::<$ty>(deserializer)? + ), + )) as typetag::__private::DeserializeFn<::Object> + ) + } + }; + } +} + +#[cfg(not(feature = "serde"))] +pub mod serde { + #[macro_export] + macro_rules! register_typetag { + ($trait:path, $ty:ty) => {}; + } +} diff --git a/src/noise/gaussian.rs b/src/noise/gaussian.rs index 6264338..c9e0476 100644 --- a/src/noise/gaussian.rs +++ b/src/noise/gaussian.rs @@ -4,9 +4,10 @@ use super::{NoiseModel, UnitNoise}; use crate::{ dtype, linalg::{Const, Matrix, MatrixView, MatrixX, Vector, VectorView, VectorX}, + register_noise, }; -impl_safe_noise!( +register_noise!( GaussianNoise<1>, GaussianNoise<2>, GaussianNoise<3>, diff --git a/src/noise/mod.rs b/src/noise/mod.rs index 8184743..3b57e79 100644 --- a/src/noise/mod.rs +++ b/src/noise/mod.rs @@ -1,6 +1,7 @@ use std::fmt::{Debug, Display}; use crate::linalg::{DimName, MatrixX, VectorX}; + pub trait NoiseModel: Debug + Display { type Dim: DimName; @@ -22,30 +23,39 @@ pub trait NoiseModelSafe: Debug + Display { fn whiten_mat(&self, m: MatrixX) -> MatrixX; } +impl< + #[cfg(not(feature = "serde"))] T: NoiseModel, + #[cfg(feature = "serde")] T: NoiseModel + crate::serde::Tagged, + > NoiseModelSafe for T +{ + fn dim(&self) -> usize { + NoiseModel::dim(self) + } + + fn whiten_vec(&self, v: VectorX) -> VectorX { + NoiseModel::whiten_vec(self, v) + } + + fn whiten_mat(&self, m: MatrixX) -> MatrixX { + NoiseModel::whiten_mat(self, m) + } + + #[doc(hidden)] + #[cfg(feature = "serde")] + fn typetag_name(&self) -> &'static str { + Self::TAG + } + + #[doc(hidden)] + #[cfg(feature = "serde")] + fn typetag_deserialize(&self) {} +} + #[macro_export] -macro_rules! impl_safe_noise { - ($($var:ident < $num:literal > ),* $(,)?) => { - use paste::paste; - paste!{ - $( - type [<$var $num>] = $var< $num >; - #[cfg_attr(feature = "serde", typetag::serde)] - impl $crate::noise::NoiseModelSafe for [<$var $num>]{ - fn dim(&self) -> usize { - $crate::noise::NoiseModel::dim(self) - } - - fn whiten_vec(&self, v: VectorX) -> VectorX { - $crate::noise::NoiseModel::whiten_vec(self, v) - } - - fn whiten_mat(&self, m: MatrixX) -> MatrixX { - $crate::noise::NoiseModel::whiten_mat(self, m) - } - } - )* - } - }; +macro_rules! register_noise { + ($($ty:ty),* $(,)?) => {$( + $crate::register_typetag!($crate::noise::NoiseModelSafe, $ty); + )*}; } mod gaussian; diff --git a/src/noise/unit.rs b/src/noise/unit.rs index d2ff7bc..fba8505 100644 --- a/src/noise/unit.rs +++ b/src/noise/unit.rs @@ -1,7 +1,10 @@ use super::NoiseModel; -use crate::linalg::{Const, MatrixX, VectorX}; +use crate::{ + linalg::{Const, MatrixX, VectorX}, + register_noise, +}; -impl_safe_noise!( +register_noise!( UnitNoise<1>, UnitNoise<2>, UnitNoise<3>, From 61198b8db413a97088546d6c811caf338c820625 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Wed, 10 Jul 2024 11:58:30 -0400 Subject: [PATCH 14/17] Redid robust serialization --- src/lib.rs | 3 ++- src/robust/mod.rs | 45 +++++++++++++++++++++++++++++---------------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 8867266..4e2fed1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,7 +37,7 @@ pub mod serde { typetag::__private::inventory::submit! { ::typetag_register( - <$ty as $crate::noise::Tagged>::TAG, + <$ty as $crate::serde::Tagged>::TAG, // Tag of the type (|deserializer| typetag::__private::Result::Ok( typetag::__private::Box::new( typetag::__private::erased_serde::deserialize::<$ty>(deserializer)? @@ -49,6 +49,7 @@ pub mod serde { } } +// Dummy implementation so things don't break when the serde feature is disabled #[cfg(not(feature = "serde"))] pub mod serde { #[macro_export] diff --git a/src/robust/mod.rs b/src/robust/mod.rs index fd18dce..1d67324 100644 --- a/src/robust/mod.rs +++ b/src/robust/mod.rs @@ -15,25 +15,38 @@ pub trait RobustCostSafe: Debug { fn weight(&self, d2: dtype) -> dtype; } +impl< + #[cfg(not(feature = "serde"))] T: RobustCost, + #[cfg(feature = "serde")] T: RobustCost + crate::serde::Tagged, + > RobustCostSafe for T +{ + fn loss(&self, d2: dtype) -> dtype { + RobustCost::loss(self, d2) + } + + fn weight(&self, d2: dtype) -> dtype { + RobustCost::weight(self, d2) + } + + #[doc(hidden)] + #[cfg(feature = "serde")] + fn typetag_name(&self) -> &'static str { + Self::TAG + } + + #[doc(hidden)] + #[cfg(feature = "serde")] + fn typetag_deserialize(&self) {} +} + #[macro_export] -macro_rules! impl_safe_robust { - ($($var:ident),*) => { - $( - #[cfg_attr(feature = "serde", typetag::serde)] - impl $crate::robust::RobustCostSafe for $var { - fn loss(&self, d2: dtype) -> dtype { - $crate::robust::RobustCost::loss(self, d2) - } - - fn weight(&self, d2: dtype) -> dtype { - $crate::robust::RobustCost::weight(self, d2) - } - } - )* - }; +macro_rules! register_robust { + ($($ty:ty),* $(,)?) => {$( + $crate::register_typetag!($crate::robust::RobustCostSafe, $ty); + )*}; } -impl_safe_robust!(L2, L1, Huber, Fair, Cauchy, GemanMcClure, Welsch, Tukey); +register_robust!(L2, L1, Huber, Fair, Cauchy, GemanMcClure, Welsch, Tukey); // ------------------------- L2 Norm ------------------------- // #[derive(Debug)] From 67341898b39dc52913c35eb64724d2ad7bbeedfd Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Wed, 10 Jul 2024 14:19:50 -0400 Subject: [PATCH 15/17] Small renaming --- src/noise/gaussian.rs | 4 ++-- src/noise/mod.rs | 2 +- src/noise/unit.rs | 4 ++-- src/robust/mod.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/noise/gaussian.rs b/src/noise/gaussian.rs index c9e0476..1c3faee 100644 --- a/src/noise/gaussian.rs +++ b/src/noise/gaussian.rs @@ -4,10 +4,10 @@ use super::{NoiseModel, UnitNoise}; use crate::{ dtype, linalg::{Const, Matrix, MatrixView, MatrixX, Vector, VectorView, VectorX}, - register_noise, + tag_noise, }; -register_noise!( +tag_noise!( GaussianNoise<1>, GaussianNoise<2>, GaussianNoise<3>, diff --git a/src/noise/mod.rs b/src/noise/mod.rs index 3b57e79..e72384b 100644 --- a/src/noise/mod.rs +++ b/src/noise/mod.rs @@ -52,7 +52,7 @@ impl< } #[macro_export] -macro_rules! register_noise { +macro_rules! tag_noise { ($($ty:ty),* $(,)?) => {$( $crate::register_typetag!($crate::noise::NoiseModelSafe, $ty); )*}; diff --git a/src/noise/unit.rs b/src/noise/unit.rs index fba8505..fac6d22 100644 --- a/src/noise/unit.rs +++ b/src/noise/unit.rs @@ -1,10 +1,10 @@ use super::NoiseModel; use crate::{ linalg::{Const, MatrixX, VectorX}, - register_noise, + tag_noise, }; -register_noise!( +tag_noise!( UnitNoise<1>, UnitNoise<2>, UnitNoise<3>, diff --git a/src/robust/mod.rs b/src/robust/mod.rs index 1d67324..4053107 100644 --- a/src/robust/mod.rs +++ b/src/robust/mod.rs @@ -40,13 +40,13 @@ impl< } #[macro_export] -macro_rules! register_robust { +macro_rules! tag_robust { ($($ty:ty),* $(,)?) => {$( $crate::register_typetag!($crate::robust::RobustCostSafe, $ty); )*}; } -register_robust!(L2, L1, Huber, Fair, Cauchy, GemanMcClure, Welsch, Tukey); +tag_robust!(L2, L1, Huber, Fair, Cauchy, GemanMcClure, Welsch, Tukey); // ------------------------- L2 Norm ------------------------- // #[derive(Debug)] From c2a6fe508e3f5bb7f945458cad6b0a6501a8e273 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Wed, 10 Jul 2024 14:27:09 -0400 Subject: [PATCH 16/17] Updated residual serde support --- examples/serde.rs | 11 +++-------- src/residuals/between.rs | 5 +++-- src/residuals/macros.rs | 31 ++++--------------------------- src/residuals/prior.rs | 5 +++-- src/residuals/traits.rs | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 45 insertions(+), 39 deletions(-) diff --git a/examples/serde.rs b/examples/serde.rs index de35ec1..eda9b15 100644 --- a/examples/serde.rs +++ b/examples/serde.rs @@ -3,7 +3,7 @@ use factrs::{ factors::Factor, noise::GaussianNoise, residuals::{BetweenResidual, PriorResidual}, - robust::{GemanMcClure, Huber, L2}, + robust::{GemanMcClure, L2}, variables::{SE2, SO2}, }; @@ -32,12 +32,7 @@ fn main() { GaussianNoise::from_scalar_cov(0.1), GemanMcClure::default(), ); - let bet = Factor::new_full( - &[X(0), X(1)], - bet, - GaussianNoise::from_scalar_cov(10.0), - Huber::default(), - ); + let bet = Factor::new_full(&[X(0), X(1)], bet, GaussianNoise::from_scalar_cov(10.0), L2); let mut graph = Graph::new(); graph.add_factor(prior); graph.add_factor(bet); @@ -46,5 +41,5 @@ fn main() { println!("serialized = {}", serialized); let deserialized: Graph = serde_json::from_str(&serialized).unwrap(); - println!("deserialized = {:?}", graph); + println!("deserialized = {:?}", deserialized); } diff --git a/src/residuals/between.rs b/src/residuals/between.rs index 57bf098..d94ba97 100644 --- a/src/residuals/between.rs +++ b/src/residuals/between.rs @@ -1,9 +1,9 @@ use nalgebra::{DimNameAdd, DimNameSum}; use super::{Residual, Residual2}; +#[allow(unused_imports)] use crate::{ containers::{Symbol, Values}, - impl_safe_residual, linalg::{ AllocatorBuffer, Const, @@ -16,6 +16,7 @@ use crate::{ Numeric, VectorX, }, + tag_residual, variables::{ Variable, VariableUmbrella, @@ -32,7 +33,7 @@ use crate::{ }, }; -impl_safe_residual!( +tag_residual!( BetweenResidual, BetweenResidual, BetweenResidual, diff --git a/src/residuals/macros.rs b/src/residuals/macros.rs index ed7dd5a..4498c4a 100644 --- a/src/residuals/macros.rs +++ b/src/residuals/macros.rs @@ -23,31 +23,8 @@ macro_rules! impl_residual { } #[macro_export] -macro_rules! impl_safe_residual { - ($($var:ident < $T:ident > ),* $(,)?) => { - use paste::paste; - $( - paste!{ - type [<$var $T>] = $var< $T >; - #[cfg_attr(feature = "serde", typetag::serde)] - impl $crate::residuals::ResidualSafe for [<$var $T>] { - fn dim_in(&self) -> usize { - $crate::residuals::Residual::dim_in(self) - } - - fn dim_out(&self) -> usize { - $crate::residuals::Residual::dim_out(self) - } - - fn residual(&self, values: &$crate::containers::Values, keys: &[Symbol]) -> VectorX { - $crate::residuals::Residual::residual(self, values, keys) - } - - fn residual_jacobian(&self, values: &$crate::containers::Values, keys: &[Symbol]) -> DiffResult { - $crate::residuals::Residual::residual_jacobian(self, values, keys) - } - } - } - )* - }; +macro_rules! tag_residual { + ($($ty:ty),* $(,)?) => {$( + $crate::register_typetag!($crate::residuals::ResidualSafe, $ty); + )*}; } diff --git a/src/residuals/prior.rs b/src/residuals/prior.rs index 058ad69..a94c137 100644 --- a/src/residuals/prior.rs +++ b/src/residuals/prior.rs @@ -1,7 +1,7 @@ use super::{Residual, Residual1}; +#[allow(unused_imports)] use crate::{ containers::{Symbol, Values}, - impl_safe_residual, linalg::{ AllocatorBuffer, Const, @@ -14,6 +14,7 @@ use crate::{ Numeric, VectorX, }, + tag_residual, variables::{ Variable, VariableUmbrella, @@ -30,7 +31,7 @@ use crate::{ }, }; -impl_safe_residual!( +tag_residual!( PriorResidual, PriorResidual, PriorResidual, diff --git a/src/residuals/traits.rs b/src/residuals/traits.rs index 3f6c7c0..ed8cba1 100644 --- a/src/residuals/traits.rs +++ b/src/residuals/traits.rs @@ -38,6 +38,38 @@ pub trait ResidualSafe: Debug + Display { fn residual_jacobian(&self, values: &Values, keys: &[Symbol]) -> DiffResult; } +impl< + #[cfg(not(feature = "serde"))] T: Residual, + #[cfg(feature = "serde")] T: Residual + crate::serde::Tagged, + > ResidualSafe for T +{ + fn dim_in(&self) -> usize { + Residual::dim_in(self) + } + + fn dim_out(&self) -> usize { + Residual::dim_out(self) + } + + fn residual(&self, values: &Values, keys: &[Symbol]) -> VectorX { + Residual::residual(self, values, keys) + } + + fn residual_jacobian(&self, values: &Values, keys: &[Symbol]) -> DiffResult { + Residual::residual_jacobian(self, values, keys) + } + + #[doc(hidden)] + #[cfg(feature = "serde")] + fn typetag_name(&self) -> &'static str { + Self::TAG + } + + #[doc(hidden)] + #[cfg(feature = "serde")] + fn typetag_deserialize(&self) {} +} + // ------------------------- Use Macro to create residuals with set sizes ------------------------- use paste::paste; From 1454896c7dc401fd7f42479fc1a51306c82b9655 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Wed, 10 Jul 2024 14:37:51 -0400 Subject: [PATCH 17/17] Updated variable serde impl --- src/variables/macros.rs | 23 ++++------------------- src/variables/se2.rs | 4 ++-- src/variables/se3.rs | 4 ++-- src/variables/so2.rs | 4 ++-- src/variables/so3.rs | 4 ++-- src/variables/traits.rs | 28 ++++++++++++++++++++++++++++ src/variables/vector.rs | 4 ++-- 7 files changed, 42 insertions(+), 29 deletions(-) diff --git a/src/variables/macros.rs b/src/variables/macros.rs index 4e3db1b..61b6997 100644 --- a/src/variables/macros.rs +++ b/src/variables/macros.rs @@ -160,23 +160,8 @@ macro_rules! test_lie { } #[macro_export] -macro_rules! impl_safe_variable { -($($var:ident $(< $num:literal >)? ),* $(,)?) => { - $( - #[cfg_attr(feature = "serde", typetag::serde)] - impl $crate::variables::VariableSafe for $var$(< $num >)? { - fn clone_box(&self) -> Box { - Box::new((*self).clone()) - } - - fn dim(&self) -> usize { - $crate::variables::Variable::dim(self) - } - - fn oplus_mut(&mut self, delta: VectorViewX) { - *self = self.oplus(delta); - } - } - )* - }; +macro_rules! tag_variable { + ($($ty:ty),* $(,)?) => {$( + $crate::register_typetag!($crate::variables::VariableSafe, $ty); + )*}; } diff --git a/src/variables/se2.rs b/src/variables/se2.rs index 391cbce..8351807 100644 --- a/src/variables/se2.rs +++ b/src/variables/se2.rs @@ -3,7 +3,6 @@ use std::{fmt, ops}; use super::VectorVar2; use crate::{ dtype, - impl_safe_variable, linalg::{ dvector, AllocatorBuffer, @@ -24,10 +23,11 @@ use crate::{ VectorViewX, VectorX, }, + tag_variable, variables::{MatrixLieGroup, Variable, SO2}, }; -impl_safe_variable!(SE2); +tag_variable!(SE2); #[derive(Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/src/variables/se3.rs b/src/variables/se3.rs index b21679a..a4b0ce9 100644 --- a/src/variables/se3.rs +++ b/src/variables/se3.rs @@ -3,7 +3,6 @@ use std::{fmt, ops}; use super::VectorVar3; use crate::{ dtype, - impl_safe_variable, linalg::{ AllocatorBuffer, Const, @@ -24,10 +23,11 @@ use crate::{ VectorViewX, VectorX, }, + tag_variable, variables::{MatrixLieGroup, Variable, SO3}, }; -impl_safe_variable!(SE3); +tag_variable!(SE3); #[derive(Clone, Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/src/variables/so2.rs b/src/variables/so2.rs index 4a4ea92..cfd20fc 100644 --- a/src/variables/so2.rs +++ b/src/variables/so2.rs @@ -2,7 +2,6 @@ use std::{fmt, ops}; use crate::{ dtype, - impl_safe_variable, linalg::{ dvector, AllocatorBuffer, @@ -24,10 +23,11 @@ use crate::{ VectorViewX, VectorX, }, + tag_variable, variables::{MatrixLieGroup, Variable}, }; -impl_safe_variable!(SO2); +tag_variable!(SO2); #[derive(Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/src/variables/so3.rs b/src/variables/so3.rs index 08c1e62..14f0e49 100644 --- a/src/variables/so3.rs +++ b/src/variables/so3.rs @@ -3,7 +3,6 @@ use std::{fmt, ops}; use super::VectorVar4; use crate::{ dtype, - impl_safe_variable, linalg::{ dvector, AllocatorBuffer, @@ -23,10 +22,11 @@ use crate::{ VectorViewX, VectorX, }, + tag_variable, variables::{MatrixLieGroup, Variable}, }; -impl_safe_variable!(SO3); +tag_variable!(SO3); #[derive(Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/src/variables/traits.rs b/src/variables/traits.rs index 87f7ef3..5b57416 100644 --- a/src/variables/traits.rs +++ b/src/variables/traits.rs @@ -100,6 +100,34 @@ pub trait VariableSafe: Debug + Display + Downcast { fn oplus_mut(&mut self, delta: VectorViewX); } +impl< + #[cfg(not(feature = "serde"))] T: Variable + 'static, + #[cfg(feature = "serde")] T: Variable + 'static + crate::serde::Tagged, + > VariableSafe for T +{ + fn clone_box(&self) -> Box { + Box::new((*self).clone()) + } + + fn dim(&self) -> usize { + self.dim() + } + + fn oplus_mut(&mut self, delta: VectorViewX) { + *self = self.oplus(delta); + } + + #[doc(hidden)] + #[cfg(feature = "serde")] + fn typetag_name(&self) -> &'static str { + Self::TAG + } + + #[doc(hidden)] + #[cfg(feature = "serde")] + fn typetag_deserialize(&self) {} +} + pub trait VariableUmbrella: VariableSafe + Variable = Self> { diff --git a/src/variables/vector.rs b/src/variables/vector.rs index 9e8ee73..9bcae2a 100644 --- a/src/variables/vector.rs +++ b/src/variables/vector.rs @@ -5,7 +5,6 @@ use std::{ use crate::{ dtype, - impl_safe_variable, linalg::{ AllocatorBuffer, Const, @@ -19,10 +18,11 @@ use crate::{ VectorViewX, VectorX, }, + tag_variable, variables::Variable, }; -impl_safe_variable!( +tag_variable!( VectorVar<1>, VectorVar<2>, VectorVar<3>,