diff --git a/.cargo/config.toml b/.cargo/config.toml index a30ab5b5..3696d0ec 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,4 +1,4 @@ -[build] +[target.'cfg(not(target_arch = "wasm32"))'] # lld is not supported for wasm rustflags = ["-C", "link-arg=-fuse-ld=lld"] [alias] diff --git a/Cargo.lock b/Cargo.lock index a6061c8a..97c21cb0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -661,9 +661,9 @@ checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ "icu_collections", "icu_locale_core", @@ -675,9 +675,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" diff --git a/Cargo.toml b/Cargo.toml index 5d8c3074..82a304eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,10 +5,10 @@ members = [ "crates/rsonpath-lib", "crates/rsonpath-syntax", "crates/rsonpath-syntax-proptest", - "crates/rsonpath-test", + "crates/rsonpath-test" ] -exclude = ["crates/rsonpath-benchmarks", "crates/rsonpath-test-codegen"] +exclude = ["crates/rsonpath-benchmarks", "crates/rsonpath-test-codegen", "web/rsonpath-website"] resolver = "2" diff --git a/crates/rsonpath-lib/src/classification/depth.rs b/crates/rsonpath-lib/src/classification/depth.rs index 43b3aaea..1f14fa21 100644 --- a/crates/rsonpath-lib/src/classification/depth.rs +++ b/crates/rsonpath-lib/src/classification/depth.rs @@ -79,6 +79,8 @@ pub(crate) mod avx2_64; pub(crate) mod sse2_32; #[cfg(target_arch = "x86_64")] pub(crate) mod sse2_64; +#[cfg(target_arch = "wasm32")] +pub(crate) mod wasm_32; pub(crate) trait DepthImpl { type Classifier<'i, I, Q>: DepthIterator<'i, I, Q, MaskType, BLOCK_SIZE> diff --git a/crates/rsonpath-lib/src/classification/depth/shared.rs b/crates/rsonpath-lib/src/classification/depth/shared.rs index 149ae08d..2e8fdae5 100644 --- a/crates/rsonpath-lib/src/classification/depth/shared.rs +++ b/crates/rsonpath-lib/src/classification/depth/shared.rs @@ -1,8 +1,8 @@ -#[cfg(target_arch = "x86")] +#[cfg(any(target_arch = "x86", target_arch = "wasm32"))] pub(super) mod mask_32; #[cfg(target_arch = "x86_64")] pub(super) mod mask_64; -#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] +#[cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "wasm32"))] pub(super) mod vector_128; #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub(super) mod vector_256; diff --git a/crates/rsonpath-lib/src/classification/depth/shared/mask_32.rs b/crates/rsonpath-lib/src/classification/depth/shared/mask_32.rs index 8bbeb8f4..67caf643 100644 --- a/crates/rsonpath-lib/src/classification/depth/shared/mask_32.rs +++ b/crates/rsonpath-lib/src/classification/depth/shared/mask_32.rs @@ -29,7 +29,8 @@ pub(crate) struct DepthVector32<'a, B: InputBlock<'a, SIZE>> { impl<'a, B: InputBlock<'a, SIZE>> DepthBlock<'a> for DepthVector32<'a, B> { #[inline(always)] fn advance_to_next_depth_decrease(&mut self) -> bool { - debug_assert!(is_x86_feature_detected!("popcnt")); + #[cfg(target_arch = "x86")] // On wasm32 popcnt is built-in. + debug_assert!(!is_x86_feature_detected!("popcnt")); let next_closing = self.closing_mask.trailing_zeros() as usize; if next_closing == SIZE { @@ -68,6 +69,7 @@ impl<'a, B: InputBlock<'a, SIZE>> DepthBlock<'a> for DepthVector32<'a, B> { #[inline(always)] fn depth_at_end(&self) -> isize { + #[cfg(target_arch = "x86")] // On wasm32 popcnt is built-in. debug_assert!(is_x86_feature_detected!("popcnt")); (((self.opening_count as i32) - self.closing_mask.count_ones() as i32) + self.depth) as isize } @@ -79,6 +81,7 @@ impl<'a, B: InputBlock<'a, SIZE>> DepthBlock<'a> for DepthVector32<'a, B> { #[inline(always)] fn estimate_lowest_possible_depth(&self) -> isize { + #[cfg(target_arch = "x86")] // On wasm32 popcnt is built-in. debug_assert!(is_x86_feature_detected!("popcnt")); (self.depth - self.closing_mask.count_ones() as i32) as isize } diff --git a/crates/rsonpath-lib/src/classification/depth/shared/vector_128.rs b/crates/rsonpath-lib/src/classification/depth/shared/vector_128.rs index dec12a16..16373e43 100644 --- a/crates/rsonpath-lib/src/classification/depth/shared/vector_128.rs +++ b/crates/rsonpath-lib/src/classification/depth/shared/vector_128.rs @@ -1,5 +1,7 @@ use crate::classification::structural::BracketType; +#[cfg(target_arch = "wasm32")] +use core::arch::wasm32::*; #[cfg(target_arch = "x86")] use core::arch::x86::*; #[cfg(target_arch = "x86_64")] @@ -9,6 +11,7 @@ pub(crate) struct DelimiterClassifierImpl128 { opening: i8, } +#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] impl DelimiterClassifierImpl128 { pub(crate) fn new(opening: BracketType) -> Self { let opening = match opening { @@ -45,3 +48,40 @@ impl DelimiterClassifierImpl128 { } } } + +#[cfg(target_arch = "wasm32")] +impl DelimiterClassifierImpl128 { + pub(crate) fn new(opening: BracketType) -> Self { + let opening = match opening { + BracketType::Square => b'[', + BracketType::Curly => b'{', + }; + Self { opening: opening as i8 } + } + + #[inline(always)] + unsafe fn opening_mask(&self) -> v128 { + i8x16_splat(self.opening) + } + + #[inline(always)] + unsafe fn closing_mask(&self) -> v128 { + i8x16_splat(self.opening + 2) + } + + #[target_feature(enable = "simd128")] + #[inline] + pub(crate) unsafe fn get_opening_and_closing_masks(&self, bytes: &[u8]) -> (u16, u16) { + assert_eq!(16, bytes.len()); + + let byte_vector = v128_load(bytes.as_ptr() as *const v128); + + let opening_brace_cmp = i8x16_eq(byte_vector, self.opening_mask()); + let closing_brace_cmp = i8x16_eq(byte_vector, self.closing_mask()); + + let opening_mask = i8x16_bitmask(opening_brace_cmp) as u16; + let closing_mask = i8x16_bitmask(closing_brace_cmp) as u16; + + (opening_mask, closing_mask) + } +} diff --git a/crates/rsonpath-lib/src/classification/depth/wasm_32.rs b/crates/rsonpath-lib/src/classification/depth/wasm_32.rs new file mode 100644 index 00000000..48988361 --- /dev/null +++ b/crates/rsonpath-lib/src/classification/depth/wasm_32.rs @@ -0,0 +1,63 @@ +//The errors about mask_32 don't need to be fixed because they go away when the website is compiled +use super::{ + shared::{mask_32::DepthVector32, vector_128::DelimiterClassifierImpl128}, + *, +}; +use crate::{ + classification::{mask::m32, QuoteClassifiedBlock, ResumeClassifierBlockState}, + debug, + input::InputBlock, +}; +use core::marker::PhantomData; + +const SIZE: usize = 32; + +shared::depth_classifier!(WasmVectorIterator32, DelimiterClassifierImpl128, DepthVector32, 32, u32); + +#[inline(always)] +fn new_vector<'a, B: InputBlock<'a, SIZE>>( + bytes: QuoteClassifiedBlock, + classifier: &DelimiterClassifierImpl128, +) -> DepthVector32<'a, B> { + new_vector_from(bytes, classifier, 0) +} + +#[inline(always)] +fn new_vector_from<'a, B: InputBlock<'a, SIZE>>( + bytes: QuoteClassifiedBlock, + classifier: &DelimiterClassifierImpl128, + idx: usize, +) -> DepthVector32<'a, B> { + // SAFETY: target_feature invariant + unsafe { new_wasm(bytes, classifier, idx) } +} + +#[inline(always)] +unsafe fn new_wasm<'a, B: InputBlock<'a, SIZE>>( + bytes: QuoteClassifiedBlock, + classifier: &DelimiterClassifierImpl128, + start_idx: usize, +) -> DepthVector32<'a, B> { + let idx_mask = 0xFFFF_FFFF_u32 << start_idx; + + let (block1, block2) = bytes.block.halves(); + + let (opening_mask1, closing_mask1) = classifier.get_opening_and_closing_masks(block1); + let (opening_mask2, closing_mask2) = classifier.get_opening_and_closing_masks(block2); + + let combined_opening_mask = m32::combine_16(opening_mask1, opening_mask2); + let combined_closing_mask = m32::combine_16(closing_mask1, closing_mask2); + + let opening_mask = combined_opening_mask & (!bytes.within_quotes_mask) & idx_mask; + let closing_mask = combined_closing_mask & (!bytes.within_quotes_mask) & idx_mask; + + DepthVector32 { + quote_classified: bytes, + opening_mask, + closing_mask, + opening_count: opening_mask.count_ones(), + depth: 0, + idx: 0, + phantom: PhantomData, + } +} diff --git a/crates/rsonpath-lib/src/classification/memmem.rs b/crates/rsonpath-lib/src/classification/memmem.rs index 7ffc9980..e3de1b0c 100644 --- a/crates/rsonpath-lib/src/classification/memmem.rs +++ b/crates/rsonpath-lib/src/classification/memmem.rs @@ -37,6 +37,8 @@ pub(crate) mod avx2_64; pub(crate) mod sse2_32; #[cfg(target_arch = "x86_64")] pub(crate) mod sse2_64; +#[cfg(target_arch = "wasm32")] +pub(crate) mod wasm_32; pub(crate) trait MemmemImpl { type Classifier<'i, 'b, 'r, I, R>: Memmem<'i, 'b, 'r, I, BLOCK_SIZE> diff --git a/crates/rsonpath-lib/src/classification/memmem/shared.rs b/crates/rsonpath-lib/src/classification/memmem/shared.rs index adef4b2b..2455e780 100644 --- a/crates/rsonpath-lib/src/classification/memmem/shared.rs +++ b/crates/rsonpath-lib/src/classification/memmem/shared.rs @@ -6,11 +6,11 @@ use crate::{ string_pattern::StringPattern, }; -#[cfg(target_arch = "x86")] +#[cfg(any(target_arch = "x86", target_arch = "wasm32"))] pub(super) mod mask_32; #[cfg(target_arch = "x86_64")] pub(super) mod mask_64; -#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] +#[cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "wasm32"))] pub(super) mod vector_128; #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub(super) mod vector_256; diff --git a/crates/rsonpath-lib/src/classification/memmem/shared/vector_128.rs b/crates/rsonpath-lib/src/classification/memmem/shared/vector_128.rs index e87d4c8a..1b52c58e 100644 --- a/crates/rsonpath-lib/src/classification/memmem/shared/vector_128.rs +++ b/crates/rsonpath-lib/src/classification/memmem/shared/vector_128.rs @@ -1,13 +1,23 @@ +#[cfg(target_arch = "wasm32")] +use ::core::arch::wasm32::*; #[cfg(target_arch = "x86")] use ::core::arch::x86::*; #[cfg(target_arch = "x86_64")] use ::core::arch::x86_64::*; +#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub(crate) struct BlockClassifier128 { first: __m128i, second: __m128i, } +#[cfg(target_arch = "wasm32")] +pub(crate) struct BlockClassifier128 { + first: v128, + second: v128, +} + +#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] impl BlockClassifier128 { #[target_feature(enable = "sse2")] pub(crate) unsafe fn new(first: u8, second: u8) -> Self { @@ -31,6 +41,31 @@ impl BlockClassifier128 { } } +#[cfg(target_arch = "wasm32")] +impl BlockClassifier128 { + #[target_feature(enable = "simd128")] + pub(crate) unsafe fn new(first: u8, second: u8) -> Self { + Self { + first: i8x16_splat(first as i8), + second: i8x16_splat(second as i8), + } + } + + #[target_feature(enable = "simd128")] + pub(crate) unsafe fn classify_block(&self, block: &[u8]) -> BlockClassification128 { + debug_assert_eq!(block.len(), 16); + let byte_vector = v128_load(block.as_ptr() as *const v128); + + let first_cmp_vector = i8x16_eq(byte_vector, self.first); + let second_cmp_vector = i8x16_eq(byte_vector, self.second); + + let first = i8x16_bitmask(first_cmp_vector) as u16; + let second = i8x16_bitmask(second_cmp_vector) as u16; + + BlockClassification128 { first, second } + } +} + pub(crate) struct BlockClassification128 { pub(crate) first: u16, pub(crate) second: u16, diff --git a/crates/rsonpath-lib/src/classification/memmem/wasm_32.rs b/crates/rsonpath-lib/src/classification/memmem/wasm_32.rs new file mode 100644 index 00000000..da088397 --- /dev/null +++ b/crates/rsonpath-lib/src/classification/memmem/wasm_32.rs @@ -0,0 +1,183 @@ +use super::{shared::mask_32, shared::vector_128, *}; +use crate::{ + classification::mask::m32, + input::{error::InputErrorConvertible, InputBlock, InputBlockIterator}, +}; + +const SIZE: usize = 32; + +pub(crate) struct Constructor; + +impl MemmemImpl for Constructor { + type Classifier<'i, 'b, 'r, I, R> + = WasmMemmemClassifier32<'i, 'b, 'r, I, R> + where + I: Input + 'i, + ::BlockIterator<'i, 'r, R, BLOCK_SIZE>: 'b, + R: InputRecorder<::Block<'i, BLOCK_SIZE>> + 'r, + 'i: 'r; + + fn memmem<'i, 'b, 'r, I, R>( + input: &'i I, + iter: &'b mut ::BlockIterator<'i, 'r, R, BLOCK_SIZE>, + ) -> Self::Classifier<'i, 'b, 'r, I, R> + where + I: Input, + R: InputRecorder<::Block<'i, BLOCK_SIZE>>, + 'i: 'r, + { + Self::Classifier { input, iter } + } +} + +pub(crate) struct WasmMemmemClassifier32<'i, 'b, 'r, I, R> +where + I: Input, + R: InputRecorder> + 'r, +{ + input: &'i I, + iter: &'b mut I::BlockIterator<'i, 'r, R, SIZE>, +} + +impl<'i, 'b, 'r, I, R> WasmMemmemClassifier32<'i, 'b, 'r, I, R> +where + I: Input, + R: InputRecorder>, + 'i: 'r, +{ + #[inline] + #[allow(dead_code)] + pub(crate) fn new(input: &'i I, iter: &'b mut I::BlockIterator<'i, 'r, R, SIZE>) -> Self { + Self { input, iter } + } + + #[inline(always)] + unsafe fn find_empty( + &mut self, + label: &StringPattern, + mut offset: usize, + ) -> Result)>, InputError> { + // first='"', second='"' + let classifier = vector_128::BlockClassifier128::new(b'"', b'"'); + let mut previous_block: u32 = 0; + + while let Some(block) = self.iter.next().e()? { + let (block1, block2) = block.halves(); + let classified1 = classifier.classify_block(block1); + let classified2 = classifier.classify_block(block2); + + let first_bitmask = m32::combine_16(classified1.first, classified2.first); + let second_bitmask = m32::combine_16(classified1.second, classified2.second); + + let mut result = (previous_block | (first_bitmask << 1)) & second_bitmask; + while result != 0 { + let idx = result.trailing_zeros() as usize; + if self + .input + .is_member_match(offset + idx - 1, offset + idx + 1, label) + .e()? + { + return Ok(Some((offset + idx - 1, block))); + } + result &= !(1 << idx); + } + + offset += SIZE; + previous_block = first_bitmask >> (SIZE - 1); + } + + Ok(None) + } + + #[inline(always)] + unsafe fn find_letter( + &mut self, + label: &StringPattern, + mut offset: usize, + ) -> Result)>, InputError> { + // first=label[0], second='"' + let classifier = vector_128::BlockClassifier128::new(label.unquoted()[0], b'"'); + let mut previous_block: u32 = 0; + + while let Some(block) = self.iter.next().e()? { + let (block1, block2) = block.halves(); + let classified1 = classifier.classify_block(block1); + let classified2 = classifier.classify_block(block2); + + let first_bitmask = m32::combine_16(classified1.first, classified2.first); + let second_bitmask = m32::combine_16(classified1.second, classified2.second); + + if let Some(res) = + mask_32::find_in_mask(self.input, label, previous_block, first_bitmask, second_bitmask, offset)? + { + return Ok(Some((res, block))); + } + + offset += SIZE; + previous_block = first_bitmask >> (SIZE - 1); + } + + Ok(None) + } + + #[inline(always)] + unsafe fn find_label_wasm( + &mut self, + label: &StringPattern, + mut offset: usize, + ) -> Result)>, InputError> { + if label.unquoted().is_empty() { + return self.find_empty(label, offset); + } else if label.unquoted().len() == 1 { + return self.find_letter(label, offset); + } + + // first=label[0], second=label[1] + let classifier = vector_128::BlockClassifier128::new(label.unquoted()[0], label.unquoted()[1]); + let mut previous_block: u32 = 0; + + while let Some(block) = self.iter.next().e()? { + let (block1, block2) = block.halves(); + let classified1 = classifier.classify_block(block1); + let classified2 = classifier.classify_block(block2); + + let first_bitmask = m32::combine_16(classified1.first, classified2.first); + let second_bitmask = m32::combine_16(classified1.second, classified2.second); + + if let Some(res) = + mask_32::find_in_mask(self.input, label, previous_block, first_bitmask, second_bitmask, offset)? + { + return Ok(Some((res, block))); + } + + offset += SIZE; + previous_block = first_bitmask >> (SIZE - 1); + } + + Ok(None) + } +} + +impl<'i, 'b, 'r, I, R> Memmem<'i, 'b, 'r, I, SIZE> for WasmMemmemClassifier32<'i, 'b, 'r, I, R> +where + I: Input, + R: InputRecorder>, + 'i: 'r, +{ + #[inline(always)] + fn find_label( + &mut self, + first_block: Option>, + start_idx: usize, + label: &StringPattern, + ) -> Result)>, InputError> { + if let Some(b) = first_block { + if let Some(res) = shared::find_label_in_first_block(self.input, b, start_idx, label)? { + return Ok(Some(res)); + } + } + let next_block_offset = self.iter.get_offset(); + // SAFETY: wasm SIMD invariant handled in vector_128 with #[target_feature(enable="simd128")]. + unsafe { self.find_label_wasm(label, next_block_offset) } + } +} diff --git a/crates/rsonpath-lib/src/classification/simd.rs b/crates/rsonpath-lib/src/classification/simd.rs index d8f98945..8f0c7d21 100644 --- a/crates/rsonpath-lib/src/classification/simd.rs +++ b/crates/rsonpath-lib/src/classification/simd.rs @@ -458,6 +458,8 @@ pub(crate) enum SimdTag { Ssse3, /// AVX2 detected. Avx2, + /// WasmSimd128 detected + WasmSimd128, } /// Runtime-detected SIMD configuration guiding how to construct a [`Simd`] implementation for the engine. @@ -500,6 +502,7 @@ impl SimdConfiguration { "sse2" => Some(SimdTag::Sse2), "ssse3" => Some(SimdTag::Ssse3), "avx2" => Some(SimdTag::Avx2), + "wasmsimd128" => Some(SimdTag::WasmSimd128), _ => None, }; let quotes = match quotes_str.to_ascii_lowercase().as_ref() { @@ -562,6 +565,15 @@ pub(crate) fn configure() -> SimdConfiguration { let fast_quotes = is_x86_feature_detected!("pclmulqdq"); let fast_popcnt = is_x86_feature_detected!("popcnt"); } + // Wasm lacks dynamic feature detection (see https://doc.rust-lang.org/stable/core/arch/wasm32/index.html) + // Since SIMD is technically a proposal, to keep rsonpath usable as a library from Wasm contexts + // without simd128 we require the target_feature on compile-time to enable SIMD. + else if #[cfg(all(target_arch = "wasm32", target_feature = "simd128"))] + { + let highest_simd = SimdTag::WasmSimd128; + let fast_quotes = false; + let fast_popcnt = true; // popcnt is built-in on Wasm32 + } else { let highest_simd = SimdTag::Nosimd; @@ -585,6 +597,7 @@ impl Display for SimdConfiguration { SimdTag::Sse2 => "sse2", SimdTag::Ssse3 => "ssse3", SimdTag::Avx2 => "avx2", + SimdTag::WasmSimd128 => "wasmsimd128", }; let quote_desc = if self.fast_quotes { "fast_quotes" } else { "slow_quotes" }; let popcnt_desc = if self.fast_popcnt { "fast_popcnt" } else { "slow_popcnt" }; @@ -659,6 +672,26 @@ cfg_if! { }}; } } + else if #[cfg(target_arch = "wasm32")] { + pub(crate) const WASM32_SIMD128: usize = 1; + + macro_rules! dispatch_simd { + ($simd:expr; $( $arg:expr ),* => fn $( $fn:tt )*) => {{ + #[target_feature(enable = "simd128")] + unsafe fn wasm32_simd $($fn)* + fn nosimd $($fn)* + + let simd = $simd; + + unsafe { + match simd.dispatch_tag() { + $crate::classification::simd::WASM32_SIMD128 => wasm32_simd($($arg),*), + _ => nosimd($($arg),*), + } + } + }}; + } + } else { macro_rules! dispatch_simd { ($simd:expr; $( $arg:expr ),* => fn $( $fn:tt )*) => {{ @@ -792,6 +825,8 @@ cfg_if! { >::new(); $b } + $crate::classification::simd::SimdTag::WasmSimd128 => + unreachable!("WasmSimd128 tag on x86_64 arch; this is an error in SIMD configuration") } } }; @@ -919,6 +954,46 @@ cfg_if! { >::new(); $b } + $crate::classification::simd::SimdTag::WasmSimd128 => + unreachable!("WasmSimd128 tag on x86_64 arch; this is an error in SIMD configuration") + } + } + }; + } + } + else if #[cfg(target_arch = "wasm32")] { + macro_rules! config_simd { + ($conf:expr => |$simd:ident| $b:block) => { + { + let conf = $conf; + + match conf.highest_simd() { + $crate::classification::simd::SimdTag::WasmSimd128 => { + assert!(!conf.fast_quotes()); + assert!(conf.fast_popcnt()); + let $simd = $crate::classification::simd::ResolvedSimd::< + $crate::classification::quotes::nosimd::Constructor, + $crate::classification::structural::nosimd::Constructor, + $crate::classification::depth::wasm_32::Constructor, + $crate::classification::memmem::wasm_32::Constructor, + {$crate::classification::simd::WASM32_SIMD128}, + >::new(); + $b + } + + $crate::classification::simd::SimdTag::Avx2 + | $crate::classification::simd::SimdTag::Ssse3 + | $crate::classification::simd::SimdTag::Sse2 + | $crate::classification::simd::SimdTag::Nosimd => { + let $simd = $crate::classification::simd::ResolvedSimd::< + $crate::classification::quotes::nosimd::Constructor, + $crate::classification::structural::nosimd::Constructor, + $crate::classification::depth::nosimd::Constructor, + $crate::classification::memmem::nosimd::Constructor, + {$crate::classification::simd::NOSIMD}, + >::new(); + $b + } } } }; diff --git a/crates/rsonpath-lib/src/engine/error.rs b/crates/rsonpath-lib/src/engine/error.rs index beb21ffa..4e53f9e9 100644 --- a/crates/rsonpath-lib/src/engine/error.rs +++ b/crates/rsonpath-lib/src/engine/error.rs @@ -62,3 +62,9 @@ pub enum EngineError { InternalRsonpathError, ), } + +impl From for EngineError { + fn from(e: std::io::Error) -> Self { + EngineError::InternalError(InternalRsonpathError::from_error(e, "IO error during output write")) + } +} diff --git a/crates/rsonpath-lib/src/error.rs b/crates/rsonpath-lib/src/error.rs index e999f436..0843dc31 100644 --- a/crates/rsonpath-lib/src/error.rs +++ b/crates/rsonpath-lib/src/error.rs @@ -31,6 +31,12 @@ pub enum DepthError { struct InternalErrorSource(Box); +impl From for InternalRsonpathError { + fn from(e: std::io::Error) -> Self { + InternalRsonpathError::from_error(e, "IO error during output write") + } +} + impl fmt::Debug for InternalErrorSource { #[inline(always)] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/web/rsonpath-website/.cargo/config.toml b/web/rsonpath-website/.cargo/config.toml new file mode 100644 index 00000000..97c82f61 --- /dev/null +++ b/web/rsonpath-website/.cargo/config.toml @@ -0,0 +1,6 @@ +[build] +target = "wasm32-unknown-unknown" +rustflags = ["-C", "target-feature=+simd128"] + +[alias] +build-website = "build -p rsonpath-website --target wasm32-unknown-unknown" \ No newline at end of file diff --git a/web/rsonpath-website/.gitignore b/web/rsonpath-website/.gitignore new file mode 100644 index 00000000..db57ccf1 --- /dev/null +++ b/web/rsonpath-website/.gitignore @@ -0,0 +1,3 @@ +/target +/.vscode/*.log +/dist \ No newline at end of file diff --git a/web/rsonpath-website/Cargo.lock b/web/rsonpath-website/Cargo.lock new file mode 100644 index 00000000..a5aeb62b --- /dev/null +++ b/web/rsonpath-website/Cargo.lock @@ -0,0 +1,4485 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ab_glyph" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + +[[package]] +name = "accesskit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf203f9d3bd8f29f98833d1fbef628df18f759248a547e7e01cfbf63cda36a99" +dependencies = [ + "enumn", + "serde", +] + +[[package]] +name = "accesskit_atspi_common" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "890d241cf51fc784f0ac5ac34dfc847421f8d39da6c7c91a0fcc987db62a8267" +dependencies = [ + "accesskit", + "accesskit_consumer", + "atspi-common", + "serde", + "thiserror 1.0.69", + "zvariant", +] + +[[package]] +name = "accesskit_consumer" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db81010a6895d8707f9072e6ce98070579b43b717193d2614014abd5cb17dd43" +dependencies = [ + "accesskit", + "hashbrown 0.15.5", +] + +[[package]] +name = "accesskit_macos" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0089e5c0ac0ca281e13ea374773898d9354cc28d15af9f0f7394d44a495b575" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.15.5", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "accesskit_unix" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301e55b39cfc15d9c48943ce5f572204a551646700d0e8efa424585f94fec528" +dependencies = [ + "accesskit", + "accesskit_atspi_common", + "async-channel", + "async-executor", + "async-task", + "atspi", + "futures-lite", + "futures-util", + "serde", + "zbus", +] + +[[package]] +name = "accesskit_windows" +version = "0.29.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2d63dd5041e49c363d83f5419a896ecb074d309c414036f616dc0b04faca971" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.15.5", + "static_assertions", + "windows", + "windows-core", +] + +[[package]] +name = "accesskit_winit" +version = "0.29.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8cfabe59d0eaca7412bfb1f70198dd31e3b0496fee7e15b066f9c36a1a140a0" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_unix", + "accesskit_windows", + "raw-window-handle", + "winit", +] + +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "serde", + "version_check", + "zerocopy", +] + +[[package]] +name = "android-activity" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" +dependencies = [ + "android-properties", + "bitflags 2.10.0", + "cc", + "cesu8", + "jni", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror 1.0.69", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "arboard" +version = "3.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf" +dependencies = [ + "clipboard-win", + "image", + "log", + "objc2 0.6.3", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "parking_lot", + "percent-encoding", + "windows-sys 0.60.2", + "x11rb", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix 1.1.2", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix 1.1.2", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-signal" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 1.1.2", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "atomic_float" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628d228f918ac3b82fe590352cc719d30664a0c13ca3a60266fe02c7132d480a" + +[[package]] +name = "atspi" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c83247582e7508838caf5f316c00791eee0e15c0bf743e6880585b867e16815c" +dependencies = [ + "atspi-common", + "atspi-connection", + "atspi-proxies", +] + +[[package]] +name = "atspi-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33dfc05e7cdf90988a197803bf24f5788f94f7c94a69efa95683e8ffe76cfdfb" +dependencies = [ + "enumflags2", + "serde", + "static_assertions", + "zbus", + "zbus-lockstep", + "zbus-lockstep-macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "atspi-connection" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4193d51303d8332304056ae0004714256b46b6635a5c556109b319c0d3784938" +dependencies = [ + "atspi-common", + "atspi-proxies", + "futures-lite", + "zbus", +] + +[[package]] +name = "atspi-proxies" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2eebcb9e7e76f26d0bcfd6f0295e1cd1e6f33bedbc5698a971db8dc43d7751c" +dependencies = [ + "atspi-common", + "serde", + "zbus", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link 0.2.1", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +dependencies = [ + "serde_core", +] + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "bytemuck" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.10.0", + "log", + "polling", + "rustix 0.38.44", + "slab", + "thiserror 1.0.69", +] + +[[package]] +name = "calloop" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb9f6e1368bd4621d2c86baa7e37de77a938adf5221e5dd3d6133340101b309e" +dependencies = [ + "bitflags 2.10.0", + "polling", + "rustix 1.1.2", + "slab", + "tracing", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop 0.13.0", + "rustix 0.38.44", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" +dependencies = [ + "calloop 0.14.3", + "rustix 1.1.2", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cc" +version = "1.2.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c481bdbf0ed3b892f6f806287d72acd515b352a4ec27a208489b8c1bc839633a" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + +[[package]] +name = "clipboard-win" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" +dependencies = [ + "error-code", +] + +[[package]] +name = "codespan-reporting" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "color-eyre" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d" +dependencies = [ + "backtrace", + "eyre", + "indenter", + "once_cell", + "owo-colors", +] + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[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" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[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 0.9.4", + "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 0.9.4", + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + +[[package]] +name = "data-url" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dispatch2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags 2.10.0", + "objc2 0.6.3", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "ecolor" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "084980ebede2fb1ad6c4f54285b3e489052ef2b6aa4016e4c19349417adc75c5" +dependencies = [ + "bytemuck", + "emath", + "serde", +] + +[[package]] +name = "eframe" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f60ee3c69cd01d5725b4ef476ed6a3a6009968c57843a2f1beb96f021e4a54b" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "egui-wgpu", + "egui-winit", + "egui_glow", + "glow", + "glutin", + "glutin-winit", + "home", + "image", + "js-sys", + "log", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "parking_lot", + "percent-encoding", + "profiling", + "raw-window-handle", + "ron", + "serde", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "web-time", + "windows-sys 0.61.2", + "winit", +] + +[[package]] +name = "egui" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75645894de4ca1695ab3ab7201c7953bb95c1725aafeefa6822dc901ad2a81b" +dependencies = [ + "accesskit", + "ahash", + "bitflags 2.10.0", + "emath", + "epaint", + "log", + "nohash-hasher", + "profiling", + "ron", + "serde", + "smallvec", + "unicode-segmentation", +] + +[[package]] +name = "egui-async" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d8b581360d3d43ec0338e3fc0a9270a4a0394fca7b613ac9184e29c7b4edc80" +dependencies = [ + "atomic_float", + "egui", + "tokio", + "tracing", + "wasm-bindgen-futures", +] + +[[package]] +name = "egui-wgpu" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdaac35a6e0ff458aaa5776b2bda578e38334a9d1258f7795042a70372745b7" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "epaint", + "log", + "profiling", + "thiserror 2.0.17", + "type-map", + "web-time", + "wgpu", + "winit", +] + +[[package]] +name = "egui-winit" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4772ed5f16fa8ec2ba295e58f62b58ee83fcf49e67ec13d2b7ddf4e9a2dea34e" +dependencies = [ + "accesskit_winit", + "arboard", + "bytemuck", + "egui", + "log", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-ui-kit", + "profiling", + "raw-window-handle", + "serde", + "smithay-clipboard", + "web-time", + "webbrowser", + "winit", +] + +[[package]] +name = "egui_extras" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "550e844e608e356f4ad6843c510aa9bb5838b427e4700ed0056e9746ceeed866" +dependencies = [ + "ahash", + "egui", + "ehttp", + "enum-map", + "image", + "log", + "mime_guess2", + "profiling", + "resvg", +] + +[[package]] +name = "egui_glow" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b94ff67a1d18933fff2519f5f57c388f932c093036c381fb9ae2853b3e1e09" +dependencies = [ + "bytemuck", + "egui", + "glow", + "log", + "memoffset", + "profiling", + "wasm-bindgen", + "web-sys", + "winit", +] + +[[package]] +name = "ehttp" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a81c221a1e4dad06cb9c9deb19aea1193a5eea084e8cd42d869068132bf876" +dependencies = [ + "document-features", + "js-sys", + "ureq", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "emath" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e561352ae95c22ad179fb56c38d6e6eecd86cf4925cf5c70e738dd01df9b620" +dependencies = [ + "bytemuck", + "serde", +] + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enum-map" +version = "2.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" +dependencies = [ + "enum-map-derive", +] + +[[package]] +name = "enum-map-derive" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "enumn" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "epaint" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a909ce8cee63e8350fb0c251ad39277a5b24f19add60787e84a3b3ab3f2bd83a" +dependencies = [ + "ab_glyph", + "ahash", + "bytemuck", + "ecolor", + "emath", + "epaint_default_fonts", + "log", + "nohash-hasher", + "parking_lot", + "profiling", + "serde", +] + +[[package]] +name = "epaint_default_fonts" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad9649446c23368ae138716910e3e28143995691b598fbb9de16b42b0722cbcc" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "error-code" +version = "3.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" + +[[package]] +name = "euclid" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" +dependencies = [ + "num-traits", +] + +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fax" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab" +dependencies = [ + "fax_derive", +] + +[[package]] +name = "fax_derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" + +[[package]] +name = "flate2" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[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", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-macro", + "futures-task", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix 1.1.2", + "windows-link 0.2.1", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "gif" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f954a9e9159ec994f73a30a12b96a702dde78f5547bcb561174597924f7d4162" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[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 = "glow" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" +dependencies = [ + "bitflags 2.10.0", + "cfg_aliases", + "cgl", + "dispatch2", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "libloading", + "objc2 0.6.3", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "once_cell", + "raw-window-handle", + "wayland-sys", + "windows-sys 0.52.0", + "x11-dl", +] + +[[package]] +name = "glutin-winit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" +dependencies = [ + "cfg_aliases", + "glutin", + "raw-window-handle", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" +dependencies = [ + "gl_generator", + "windows-sys 0.52.0", +] + +[[package]] +name = "glutin_glx_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" +dependencies = [ + "gl_generator", + "x11-dl", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", + "zerocopy", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "foldhash 0.2.0", +] + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +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.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "image" +version = "0.25.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a" +dependencies = [ + "bytemuck", + "byteorder-lite", + "color_quant", + "gif", + "image-webp", + "moxcms", + "num-traits", + "png 0.18.0", + "tiff", +] + +[[package]] +name = "image-webp" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +dependencies = [ + "byteorder-lite", + "quick-error", +] + +[[package]] +name = "imagesize" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" + +[[package]] +name = "indenter" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" + +[[package]] +name = "indexmap" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", +] + +[[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 1.0.69", + "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.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "kurbo" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62026ae44756f8a599ba21140f350303d4f08dcdcc71b5ad9c9bb8128c13c62" +dependencies = [ + "arrayvec", + "euclid", + "smallvec", +] + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link 0.2.1", +] + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +dependencies = [ + "bitflags 2.10.0", + "libc", + "redox_syscall 0.5.18", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "memmap2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess2" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1706dc14a2e140dec0a7a07109d9a3d5890b81e85bd6c60b906b249a77adf0ca" +dependencies = [ + "mime", + "phf", + "phf_shared", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "moxcms" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80986bbbcf925ebd3be54c26613d861255284584501595cf418320c078945608" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "naga" +version = "27.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.10.0", + "cfg-if", + "cfg_aliases", + "codespan-reporting", + "half", + "hashbrown 0.16.1", + "hexf-parse", + "indexmap", + "libm", + "log", + "num-traits", + "once_cell", + "rustc-hash 1.1.0", + "thiserror 2.0.17", + "unicode-ident", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.10.0", + "jni-sys", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[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.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "nix" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags 2.10.0", + "cfg-if", + "cfg_aliases", + "libc", + "memoffset", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_enum" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[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.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.10.0", + "block2", + "libc", + "objc2 0.5.2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation 0.2.2", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.10.0", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2 0.5.2", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.10.0", + "dispatch2", + "objc2 0.6.3", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.10.0", + "dispatch2", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2 0.5.2", + "objc2-contacts", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.10.0", + "block2", + "dispatch", + "libc", + "objc2 0.5.2", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.10.0", + "objc2 0.6.3", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.10.0", + "objc2 0.6.3", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2 0.5.2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.10.0", + "block2", + "objc2 0.5.2", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "orbclient" +version = "0.3.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "247ad146e19b9437f8604c21f8652423595cf710ad108af40e77d3ae6e96b827" +dependencies = [ + "libredox", +] + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "owo-colors" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52" + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link 0.2.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", + "unicase", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", + "unicase", +] + +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "png" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" +dependencies = [ + "bitflags 2.10.0", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.2", + "windows-sys 0.61.2", +] + +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" + +[[package]] +name = "pxfm" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3502d6155304a4173a5f2c34b52b7ed0dd085890326cb50fd625fdf39e86b3b" +dependencies = [ + "num-traits", +] + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "quick-xml" +version = "0.37.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[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.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.10.0", +] + +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + +[[package]] +name = "resvg" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43" +dependencies = [ + "log", + "pico-args", + "rgb", + "svgtypes", + "tiny-skia", + "usvg", +] + +[[package]] +name = "rgb" +version = "0.8.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.16", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "ron" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db09040cc89e461f1a265139777a2bde7f8d8c67c4936f700c63ce3e2904d468" +dependencies = [ + "base64", + "bitflags 2.10.0", + "serde", + "serde_derive", + "unicode-ident", +] + +[[package]] +name = "roxmltree" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" + +[[package]] +name = "rsonpath-lib" +version = "0.9.4" +dependencies = [ + "cfg-if", + "log", + "memmap2", + "rsonpath-syntax", + "smallvec", + "static_assertions", + "thiserror 2.0.17", + "vector-map", +] + +[[package]] +name = "rsonpath-syntax" +version = "0.4.0" +dependencies = [ + "nom", + "thiserror 2.0.17", + "unicode-width", +] + +[[package]] +name = "rsonpath-website" +version = "0.1.0" +dependencies = [ + "color-eyre", + "console_error_panic_hook", + "eframe", + "egui", + "egui-async", + "egui_extras", + "eyre", + "js-sys", + "rsonpath-lib", + "rsonpath-syntax", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "web-time", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +dependencies = [ + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys 0.11.0", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" +dependencies = [ + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +dependencies = [ + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "simplecss" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" +dependencies = [ + "log", +] + +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.10.0", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.44", + "thiserror 1.0.69", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" +dependencies = [ + "bitflags 2.10.0", + "calloop 0.14.3", + "calloop-wayland-source 0.4.1", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 1.1.2", + "thiserror 2.0.17", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-experimental", + "wayland-protocols-misc", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-clipboard" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" +dependencies = [ + "libc", + "smithay-client-toolkit 0.20.0", + "wayland-backend", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +dependencies = [ + "float-cmp", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "svgtypes" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc" +dependencies = [ + "kurbo", + "siphasher", +] + +[[package]] +name = "syn" +version = "2.0.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tempfile" +version = "3.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +dependencies = [ + "fastrand", + "getrandom 0.3.4", + "once_cell", + "rustix 1.1.2", + "windows-sys 0.61.2", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +dependencies = [ + "thiserror-impl 2.0.17", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tiff" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af9605de7fee8d9551863fd692cce7637f548dbd9db9180fcc07ccc6d26c336f" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] + +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "png 0.17.16", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "pin-project-lite", +] + +[[package]] +name = "toml_datetime" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.23.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +dependencies = [ + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" +dependencies = [ + "once_cell", +] + +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + +[[package]] +name = "type-map" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" +dependencies = [ + "rustc-hash 2.1.1", +] + +[[package]] +name = "uds_windows" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +dependencies = [ + "memoffset", + "tempfile", + "winapi", +] + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "ureq" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" +dependencies = [ + "base64", + "flate2", + "log", + "once_cell", + "rustls", + "rustls-pki-types", + "url", + "webpki-roots 0.26.11", +] + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "usvg" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80be9b06fbae3b8b303400ab20778c80bbaf338f563afe567cf3c9eea17b47ef" +dependencies = [ + "base64", + "data-url", + "flate2", + "imagesize", + "kurbo", + "log", + "pico-args", + "roxmltree", + "simplecss", + "siphasher", + "strict-num", + "svgtypes", + "tiny-skia-path", + "xmlwriter", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "vector-map" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b34e878e32c750bb4253be124adb9da1dc93ca5d98c210787badf1e1ccdca7" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[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.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wayland-backend" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" +dependencies = [ + "cc", + "downcast-rs", + "rustix 1.1.2", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" +dependencies = [ + "bitflags 2.10.0", + "rustix 1.1.2", + "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.10.0", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447ccc440a881271b19e9989f75726d60faa09b95b0200a9b7eb5cc47c3eeb29" +dependencies = [ + "rustix 1.1.2", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-experimental" +version = "20250721.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-misc" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfe33d551eb8bffd03ff067a8b44bb963919157841a99957151299a6307d19c" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a07a14257c077ab3279987c4f8bb987851bf57081b93710381daea94f2c2c032" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd94963ed43cf9938a090ca4f7da58eb55325ec8200c3848963e98dc25b78ec" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" +dependencies = [ + "proc-macro2", + "quick-xml 0.37.5", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webbrowser" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f1243ef785213e3a32fa0396093424a3a6ea566f9948497e5a2309261a4c97" +dependencies = [ + "core-foundation 0.10.1", + "jni", + "log", + "ndk-context", + "objc2 0.6.3", + "objc2-foundation 0.3.2", + "url", + "web-sys", +] + +[[package]] +name = "webpki-roots" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.4", +] + +[[package]] +name = "webpki-roots" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "weezl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" + +[[package]] +name = "wgpu" +version = "27.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" +dependencies = [ + "arrayvec", + "bitflags 2.10.0", + "cfg-if", + "cfg_aliases", + "document-features", + "hashbrown 0.16.1", + "log", + "portable-atomic", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "27.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" +dependencies = [ + "arrayvec", + "bit-set", + "bit-vec", + "bitflags 2.10.0", + "bytemuck", + "cfg_aliases", + "document-features", + "hashbrown 0.16.1", + "indexmap", + "log", + "naga", + "once_cell", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "rustc-hash 1.1.0", + "smallvec", + "thiserror 2.0.17", + "wgpu-core-deps-windows-linux-android", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-hal" +version = "27.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" +dependencies = [ + "bitflags 2.10.0", + "cfg-if", + "cfg_aliases", + "libloading", + "log", + "naga", + "portable-atomic", + "portable-atomic-util", + "raw-window-handle", + "renderdoc-sys", + "thiserror 2.0.17", + "wgpu-types", +] + +[[package]] +name = "wgpu-types" +version = "27.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" +dependencies = [ + "bitflags 2.10.0", + "bytemuck", + "js-sys", + "log", + "thiserror 2.0.17", + "web-sys", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core", + "windows-link 0.1.3", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[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.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winit" +version = "0.30.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.10.0", + "block2", + "bytemuck", + "calloop 0.13.0", + "cfg_aliases", + "concurrent-queue", + "core-foundation 0.9.4", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "smithay-client-toolkit 0.19.2", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix 1.1.2", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + +[[package]] +name = "xcursor" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.10.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.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" + +[[package]] +name = "xmlwriter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zbus" +version = "5.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b622b18155f7a93d1cd2dc8c01d2d6a44e08fb9ebb7b3f9e6ed101488bad6c91" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "nix", + "ordered-stream", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus-lockstep" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29e96e38ded30eeab90b6ba88cb888d70aef4e7489b6cd212c5e5b5ec38045b6" +dependencies = [ + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus-lockstep-macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6821851fa840b708b4cbbaf6241868cabc85a2dc22f426361b0292bfc0b836" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "zbus-lockstep", + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cdb94821ca8a87ca9c298b5d1cbd80e2a8b67115d99f6e4551ac49e42b6a314" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" +dependencies = [ + "serde", + "static_assertions", + "winnow", + "zvariant", +] + +[[package]] +name = "zbus_xml" +version = "5.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589e9a02bfafb9754bb2340a9e3b38f389772684c63d9637e76b1870377bec29" +dependencies = [ + "quick-xml 0.36.2", + "serde", + "static_assertions", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zerocopy" +version = "0.8.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea879c944afe8a2b25fef16bb4ba234f47c694565e97383b36f3a878219065c" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf955aa904d6040f70dc8e9384444cb1030aed272ba3cb09bbc4ab9e7c1f34f5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[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.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713" +dependencies = [ + "zune-core", +] + +[[package]] +name = "zvariant" +version = "5.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2be61892e4f2b1772727be11630a62664a1826b62efa43a6fe7449521cb8744c" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da58575a1b2b20766513b1ec59d8e2e68db2745379f961f86650655e862d2006" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6949d142f89f6916deca2232cf26a8afacf2b9fdc35ce766105e104478be599" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn", + "winnow", +] diff --git a/web/rsonpath-website/Cargo.toml b/web/rsonpath-website/Cargo.toml new file mode 100644 index 00000000..da59277e --- /dev/null +++ b/web/rsonpath-website/Cargo.toml @@ -0,0 +1,63 @@ +[package] +name = "rsonpath-website" +version = "0.1.0" +authors = ["Georgios Chatzikyriakou", "Mateusz Gienieczko "] +#add readme +license = "MIT" +repository = "https://github.com/rsonquery/rsonpath" +homepage = "https://rsonquery.github.io/web" +edition = "2024" + +[dependencies] +color-eyre = { version = "0.6.5", default-features = false, features = ["track-caller"] } +eframe = { version = "0.33.2", default-features = false, features = [ + "accesskit", + "default_fonts", + "glow", + "persistence", + "wayland", + "x11", +] } +egui = "0.33.2" +egui-async = "0.2.5" +egui_extras = { version = "0.33.2", features = ["all_loaders", "svg"] } +eyre = "0.6.12" +js-sys = "0.3.83" +rsonpath = { path = "../../crates/rsonpath-lib", package = "rsonpath-lib" } +rsonpath-syntax = { path = "../../crates/rsonpath-syntax" } +wasm-bindgen = "0.2.106" +web-time = "1.1.0" + +console_error_panic_hook = "0.1.7" +wasm-bindgen-futures = "0.4.56" +web-sys = { version = "0.3.83", features = [ + "Blob", + "DedicatedWorkerGlobalScope", + "Document", + "DomException", + "Event", + "FileReader", + "HtmlInputElement", + "HtmlAnchorElement", + "MessageEvent", + "Node", + "ProgressEvent", + "Url", + "Window", + "Worker", +] } + +[lib] +path = "src/lib.rs" +crate-type = ["cdylib", "rlib"] + +[[bin]] +path = "src/eframe.rs" +name = "eframe" + +[[bin]] +path = "src/runner.rs" +name = "runner" + +[profile.release] +incremental = true diff --git a/web/rsonpath-website/Trunk.toml b/web/rsonpath-website/Trunk.toml new file mode 100644 index 00000000..47e2d9cf --- /dev/null +++ b/web/rsonpath-website/Trunk.toml @@ -0,0 +1,2 @@ +[build] +target = "index.html" \ No newline at end of file diff --git a/web/rsonpath-website/assets/rsonquery-rq-logo.svg b/web/rsonpath-website/assets/rsonquery-rq-logo.svg new file mode 100644 index 00000000..020e0cee --- /dev/null +++ b/web/rsonpath-website/assets/rsonquery-rq-logo.svg @@ -0,0 +1,82 @@ + + + + diff --git a/web/rsonpath-website/index.html b/web/rsonpath-website/index.html new file mode 100644 index 00000000..cd23e52c --- /dev/null +++ b/web/rsonpath-website/index.html @@ -0,0 +1,30 @@ + + + + + + RsonQuery Web + + + + + + + + + + \ No newline at end of file diff --git a/web/rsonpath-website/rust-toolchain.toml b/web/rsonpath-website/rust-toolchain.toml new file mode 100644 index 00000000..3c2cf442 --- /dev/null +++ b/web/rsonpath-website/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "nightly" # Required for wasm128 SIMD +components = [ "cargo", "rustfmt", "clippy" ] \ No newline at end of file diff --git a/web/rsonpath-website/rustfmt.toml b/web/rsonpath-website/rustfmt.toml new file mode 100644 index 00000000..95fefa43 --- /dev/null +++ b/web/rsonpath-website/rustfmt.toml @@ -0,0 +1,5 @@ +edition = "2021" +max_width = 120 +newline_style = "Unix" +use_field_init_shorthand = true +use_try_shorthand = true \ No newline at end of file diff --git a/web/rsonpath-website/src/constants.rs b/web/rsonpath-website/src/constants.rs new file mode 100644 index 00000000..5ab2f764 --- /dev/null +++ b/web/rsonpath-website/src/constants.rs @@ -0,0 +1,9 @@ +pub const CANVAS_ELEMENT_ID: &str = "rsonquery-web-canvas"; +pub const FILE_INPUT_ELEMENT_ID: &str = "file-input"; +pub const WORKER_BIN_NAME: &str = "runner"; +pub const FILE_PREVIEW_CHARS: usize = 64_000; +pub const MAX_OUTPUT_BYTES: usize = 10_000_000; +pub const FILE_MAX_BYTES: usize = 1_000_000_000; +pub const WARMUP_RUNS: usize = 2; +pub const FONT_SIZE_NORMAL: f32 = 15.0; +pub const RQ_COLOR: egui::Color32 = egui::Color32::from_rgb(227, 60, 38); diff --git a/web/rsonpath-website/src/eframe.rs b/web/rsonpath-website/src/eframe.rs new file mode 100644 index 00000000..d1e8dad6 --- /dev/null +++ b/web/rsonpath-website/src/eframe.rs @@ -0,0 +1,153 @@ +use rsonpath_website::constants; +use rsonpath_website::message::*; +use std::pin::Pin; +use std::sync::{ + Arc, + atomic::{AtomicI32, Ordering}, +}; +use std::task::{Context, Poll}; +use wasm_bindgen::prelude::*; +use web_sys::{Blob, BlobPropertyBag, MessageEvent, Url, Worker, console, js_sys::Array}; + +fn main() -> Result<(), JsValue> { + console_error_panic_hook::set_once(); + color_eyre::install().expect("color_eyre install"); + + let window = web_sys::window().expect("no global `window` exists"); + let document = window.document().expect("should have a document"); + let canvas = document + .get_element_by_id(constants::CANVAS_ELEMENT_ID) + .expect("canvas element not found, update CANVAS_ELEMENT_ID") + .dyn_into::()?; + + wasm_bindgen_futures::spawn_local(async move { + let runner = eframe::WebRunner::new(); + // The GUI must wait for the Runner to spawn, or else actions such as Run or Open File will not be handled. + console::log_1(&"⏳ Waiting for rsonpath worker to spawn...".into()); + let worker = create_worker().await.expect("Failed to create worker"); + console::log_1(&"Worker ready.".into()); + // Handle control to the Website struct. + worker.set_onmessage(None); + runner + .start( + canvas, + eframe::WebOptions::default(), + Box::new(|cc| Ok(Box::new(rsonpath_website::start(cc, worker)))), + ) + .await + .expect("Failed to start eframe WebRunner"); + }); + + Ok(()) +} + +fn create_worker() -> impl Future> { + // This is basically magic, modelled after trunk webworker example: + // https://github.com/trunk-rs/trunk/blob/f1ee3d4032cb939b8513d1d8fabfcb84ce46d811/examples/webworker/src/bin/app.rs#L5-L27 + let origin = web_sys::window() + .expect("window to be available") + .location() + .href() + .expect("location href to be available"); + + let script = Array::new(); + script.push( + &format!( + r#"importScripts("{origin}/{}.js");wasm_bindgen("{origin}/{}_bg.wasm");"#, + constants::WORKER_BIN_NAME, + constants::WORKER_BIN_NAME + ) + .into(), + ); + + let blob_property_bag = BlobPropertyBag::new(); + blob_property_bag.set_type("text/javascript"); + let blob = Blob::new_with_str_sequence_and_options(&script, &blob_property_bag).expect("blob to be created"); + + let url = Url::create_object_url_with_blob(&blob).expect("url to be created"); + + let worker = Worker::new(&url).expect("worker to be created"); + let worker_clone = worker.clone(); + // Here we handle control over to our custom Future that coordinates with the spawned worker. + CreateWorkerFuture::new(worker_clone) +} + +struct CreateWorkerFuture { + worker: Worker, + state: CreateWorkerFutureState, +} + +/// Internal state of the [`CreateWorkerFuture`]. +enum CreateWorkerFutureState { + /// Sentinel value, must not be used between polls. + None, + /// Future was created and not polled yet, setup of event handlers required. + Init, + /// Message channels were initialized, we are waiting for the worker to report back. + /// The inner value is the status code Arc with a value of -1 while waiting, set to the actual + /// status after the worker reports back. + Launched(Arc), +} + +impl CreateWorkerFuture { + pub fn new(worker: Worker) -> Self { + Self { + worker, + state: CreateWorkerFutureState::Init, + } + } +} + +impl Future for CreateWorkerFuture { + type Output = Result; + + fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + let mut state = CreateWorkerFutureState::None; + std::mem::swap(&mut self.state, &mut state); + let state = state; + let (state, response) = match state { + CreateWorkerFutureState::Init => { + // Set up the callback and the status code Arc to communicate the message back. + let status_code = Arc::new(AtomicI32::new(-1)); + let status_code_clone = status_code.clone(); + let waker_clone = cx.waker().clone(); + let onmessage = Closure::wrap(Box::new(move |msg: MessageEvent| { + assert_eq!(msg.ty(), MessageType::WorkerStarted, "worker reported invalid message"); + let msg = msg + .deserialize::() + .expect("correct WorkerStartedMessage"); + status_code_clone.store(msg.status(), Ordering::Release); + waker_clone.wake_by_ref(); + }) as Box); + self.worker.set_onmessage(Some(onmessage.as_ref().unchecked_ref())); + onmessage.forget(); + (CreateWorkerFutureState::Launched(status_code), Poll::Pending) + } + CreateWorkerFutureState::Launched(status_code_arc) => { + let status_code = status_code_arc.load(Ordering::Acquire); + if status_code == -1 { + // It's not the message handler that woke us up, we're not ready yet. + (CreateWorkerFutureState::Launched(status_code_arc), Poll::Pending) + } else if status_code == 0 { + // Successful start. + let worker = self.worker.clone(); + ( + CreateWorkerFutureState::Launched(status_code_arc), + Poll::Ready(Ok(worker)), + ) + } else { + // Some error occurred. + let error = format!("worker failed to create: status code {status_code}").into(); + ( + CreateWorkerFutureState::Launched(status_code_arc), + Poll::Ready(Err(error)), + ) + } + } + CreateWorkerFutureState::None => unreachable!("CreateWorkerFutureState::None cannot happen"), + }; + + self.state = state; + response + } +} diff --git a/web/rsonpath-website/src/engine_run.rs b/web/rsonpath-website/src/engine_run.rs new file mode 100644 index 00000000..d4adca49 --- /dev/null +++ b/web/rsonpath-website/src/engine_run.rs @@ -0,0 +1,193 @@ +use crate::message::{ + GenericMessage, MessageChannel, MessageType, RsonpathRuntime, RunRsonpathFailureMessage, RunRsonpathMessage, + RunRsonpathSuccessMessage, +}; +use egui_async::Bind; +use std::cell::RefCell; +use std::pin::Pin; +use std::rc::Rc; +use std::sync::Mutex; +use std::task::{Context, Poll}; +use wasm_bindgen::JsCast; +use wasm_bindgen::closure::Closure; +use web_sys::{MessageEvent, Worker}; + +#[derive(Clone)] +pub struct EngineRun(Rc>); + +struct EngineRunImpl { + engine_run_bind: Bind<(), String>, + state: EngineRunState, +} + +pub enum EngineRunState { + Idle, + Requested(EngineRunRequested), + InProgress(EngineRunInProgress), + Succeeded(EngineRunResult), + Failed(EngineRunFailure), + None, +} + +enum EngineRunFinished { + Success(RunRsonpathSuccessMessage), + Failure(RunRsonpathFailureMessage), +} + +pub struct EngineRunRequested { + msg: RunRsonpathMessage, +} + +pub struct EngineRunInProgress { + finished: Rc>>, +} + +pub struct EngineRunResult { + runtime: RsonpathRuntime, + results: String, +} + +pub struct EngineRunFailure { + error: String, +} + +impl EngineRunResult { + pub fn runtime(&self) -> &RsonpathRuntime { + &self.runtime + } + + pub fn results(&self) -> &str { + &self.results + } +} + +impl EngineRunFailure { + pub fn error(&self) -> &str { + &self.error + } +} + +impl EngineRun { + pub fn new() -> Self { + Self(Rc::new(Mutex::new(EngineRunImpl { + engine_run_bind: Bind::new(true), + state: EngineRunState::Idle, + }))) + } + + pub fn request_async_run(&self, msg: RunRsonpathMessage, gui_ctx: egui::Context, worker: Worker) { + let future = EngineRunFuture::start(msg, self.clone(), gui_ctx, worker); + self.0.lock().unwrap().engine_run_bind.request(future); + } + + pub fn with_state(&self, f: F) -> R + where + F: FnOnce(&EngineRunState) -> R, + { + let state = &self.0.lock().unwrap().state; + f(state) + } +} + +pub struct EngineRunFuture { + worker: Worker, + engine_run: EngineRun, + gui_ctx: egui::Context, +} + +impl EngineRunFuture { + fn start(msg: RunRsonpathMessage, engine_run: EngineRun, gui_ctx: egui::Context, worker: Worker) -> Self { + { + let mut inner = engine_run.0.lock().unwrap(); + inner.state = EngineRunState::Requested(EngineRunRequested { msg }); + } + + Self { + worker, + gui_ctx, + engine_run, + } + } +} + +impl Future for EngineRunFuture { + type Output = Result<(), String>; + + fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + use web_sys::console; + let mut engine_run = self.engine_run.0.lock().unwrap(); + let mut state = EngineRunState::None; + std::mem::swap(&mut engine_run.state, &mut state); + let state = state; + let (state, response) = match state { + EngineRunState::Idle => (EngineRunState::Idle, Poll::Ready(Ok(()))), + EngineRunState::Requested(request) => { + console::log_1(&"Requested, starting...".into()); + let finished = Rc::new(RefCell::new(None)); + let finished_clone = finished.clone(); + let waker = cx.waker().clone(); + let gui_ctx = self.gui_ctx.clone(); + let onmessage = Closure::wrap(Box::new(move |msg: MessageEvent| match msg.ty() { + MessageType::RunRsonpathSuccess => { + let msg = msg + .deserialize::() + .expect("RunRsonpathSuccessMessage to be correct"); + finished_clone.borrow_mut().replace(EngineRunFinished::Success(msg)); + waker.wake_by_ref(); + gui_ctx.request_repaint(); + } + MessageType::RunRsonpathFailure => { + let msg = msg + .deserialize::() + .expect("RunRsonpathFailureMessage to be correct"); + finished_clone.borrow_mut().replace(EngineRunFinished::Failure(msg)); + waker.wake_by_ref(); + gui_ctx.request_repaint(); + } + _ => (), + }) as Box); + self.worker.set_onmessage(Some(onmessage.as_ref().unchecked_ref())); + onmessage.forget(); + + self.worker + .send(request.msg) + .expect("RunRsonpathMessage sent to worker"); + + ( + EngineRunState::InProgress(EngineRunInProgress { finished }), + Poll::Pending, + ) + } + EngineRunState::InProgress(in_progress) => { + if let Some(finished) = in_progress.finished.take() { + console::log_1(&"We are done!".into()); + self.gui_ctx.request_repaint(); + match finished { + EngineRunFinished::Success(success) => ( + EngineRunState::Succeeded(EngineRunResult { + runtime: success.runtime().clone(), + results: success.into_results(), + }), + Poll::Ready(Ok(())), + ), + EngineRunFinished::Failure(failure) => ( + EngineRunState::Failed(EngineRunFailure { + error: failure.into_error(), + }), + Poll::Ready(Ok(())), + ), + } + } else { + console::log_1(&"We are not done.".into()); + (EngineRunState::InProgress(in_progress), Poll::Pending) + } + } + EngineRunState::Succeeded(loaded) => (EngineRunState::Succeeded(loaded), Poll::Ready(Ok(()))), + EngineRunState::Failed(loaded) => (EngineRunState::Failed(loaded), Poll::Ready(Ok(()))), + EngineRunState::None => unreachable!("EngineRunState::None cannot happen"), + }; + + engine_run.state = state; + response + } +} diff --git a/web/rsonpath-website/src/file_load.rs b/web/rsonpath-website/src/file_load.rs new file mode 100644 index 00000000..1d0f407f --- /dev/null +++ b/web/rsonpath-website/src/file_load.rs @@ -0,0 +1,248 @@ +use crate::message::*; +use crate::util::AtomicF32; +use egui_async::Bind; +use eyre::Result; +use std::cell::RefCell; +use std::pin::Pin; +use std::rc::Rc; +use std::sync::Mutex; +use std::sync::atomic::Ordering; +use std::task::Poll; +use wasm_bindgen::prelude::*; +use web_sys::{MessageEvent, Worker, window}; +use web_time::Duration; + +#[derive(Clone)] +pub struct FileLoad(Rc>); + +struct FileLoadImpl { + file_read_bind: Bind<(), String>, + state: FileLoadState, +} + +pub enum FileLoadState { + Idle, + Requested(FileLoadRequested), + InProgress(FileLoadInProgress), + Succeeded(FileLoaded), + Failed(FileLoadFailed), + None, +} + +pub struct FileLoadRequested { + file: web_sys::File, +} + +pub struct FileLoadInProgress { + file: web_sys::File, + progress: Rc, + finished: Rc>>, + start: f64, +} + +enum FileLoadFinished { + Success(LoadFileSuccessMessage), + Failure(LoadFileFailureMessage), +} + +pub struct FileLoaded { + file: web_sys::File, + preview: String, + elapsed: f64, +} + +pub struct FileLoadFailed { + file: web_sys::File, + error: String, + elapsed: f64, +} + +impl FileLoad { + pub fn new() -> Self { + Self(Rc::new(Mutex::new(FileLoadImpl { + file_read_bind: Bind::new(true), + state: FileLoadState::Idle, + }))) + } + + pub fn request_async_load(&self, file: web_sys::File, gui_ctx: egui::Context, worker: Worker) { + let future = FileLoadFuture::start(self.clone(), file, gui_ctx, worker); + self.0.lock().unwrap().file_read_bind.request(future); + } + + pub fn discard(&self, gui_ctx: &egui::Context, worker: &Worker) { + let mut lock = self.0.lock().unwrap(); + lock.state = FileLoadState::Idle; + lock.file_read_bind.clear(); + let msg = DiscardFileMessage::new(); + worker.send(msg).expect("send DiscardFileMessage to worker to succeed"); + gui_ctx.request_repaint(); + } + + pub fn with_state(&self, f: F) -> R + where + F: FnOnce(&FileLoadState) -> R, + { + let state = &self.0.lock().unwrap().state; + f(state) + } +} + +pub struct FileLoadFuture { + worker: Worker, + file_load: FileLoad, + gui_ctx: egui::Context, +} + +impl FileLoadFuture { + fn start(file_load: FileLoad, file: web_sys::File, gui_ctx: egui::Context, worker: Worker) -> Self { + { + let mut inner = file_load.0.lock().unwrap(); + inner.state = FileLoadState::Requested(FileLoadRequested { file }); + } + + Self { + worker, + gui_ctx, + file_load, + } + } +} + +impl FileLoadInProgress { + pub fn progress(&self) -> f32 { + self.progress.get(Ordering::Acquire) + } +} + +impl FileLoadFailed { + pub fn error(&self) -> &str { + &self.error + } + + pub fn elapsed(&self) -> Duration { + Duration::from_secs_f64(self.elapsed * 0.001) + } + + pub fn file(&self) -> &web_sys::File { + &self.file + } +} + +impl FileLoaded { + pub fn preview(&self) -> &str { + &self.preview + } + + pub fn elapsed(&self) -> Duration { + Duration::from_secs_f64(self.elapsed * 0.001) + } + + pub fn file(&self) -> &web_sys::File { + &self.file + } +} + +impl Future for FileLoadFuture { + type Output = Result<(), String>; + + fn poll(self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll { + use web_sys::console; + let mut file_load = self.file_load.0.lock().unwrap(); + let mut state = FileLoadState::None; + std::mem::swap(&mut file_load.state, &mut state); + let state = state; + let (state, response) = match state { + FileLoadState::Idle => (FileLoadState::Idle, Poll::Ready(Ok(()))), + FileLoadState::Requested(request) => { + console::log_1(&"Requested, starting...".into()); + let start = window().unwrap().performance().unwrap().now(); + let progress = Rc::new(AtomicF32::new(0.0)); + let finished = Rc::new(RefCell::new(None)); + let progress_clone = progress.clone(); + let finished_clone = finished.clone(); + let waker = cx.waker().clone(); + let gui_ctx = self.gui_ctx.clone(); + let onmessage = Closure::wrap(Box::new(move |msg: MessageEvent| match msg.ty() { + MessageType::LoadFileProgress => { + let msg = msg + .deserialize::() + .expect("LoadFileProgressMessage to be correct"); + progress_clone.store(msg.progress(), Ordering::Release); + gui_ctx.request_repaint(); + } + MessageType::LoadFileSuccess => { + let msg = msg + .deserialize::() + .expect("LoadFileFinishedMessage to be correct"); + finished_clone.borrow_mut().replace(FileLoadFinished::Success(msg)); + progress_clone.store(1.0, Ordering::Release); + waker.wake_by_ref(); + gui_ctx.request_repaint(); + } + MessageType::LoadFileFailure => { + let msg = msg + .deserialize::() + .expect("LoadFileFailureMessage to be correct"); + finished_clone.borrow_mut().replace(FileLoadFinished::Failure(msg)); + progress_clone.store(1.0, Ordering::Release); + waker.wake_by_ref(); + gui_ctx.request_repaint(); + } + _ => (), + }) as Box); + self.worker.set_onmessage(Some(onmessage.as_ref().unchecked_ref())); + onmessage.forget(); + + self.worker + .send(LoadFileMessage::new(request.file.clone())) + .expect("LoadFileMessage sent to worker"); + + ( + FileLoadState::InProgress(FileLoadInProgress { + file: request.file, + progress, + finished, + start, + }), + Poll::Pending, + ) + } + FileLoadState::InProgress(in_progress) => { + if let Some(finished) = in_progress.finished.take() { + console::log_1(&"We are done!".into()); + let now = window().unwrap().performance().unwrap().now(); + let elapsed = now - in_progress.start; + self.gui_ctx.request_repaint(); + match finished { + FileLoadFinished::Success(success) => ( + FileLoadState::Succeeded(FileLoaded { + file: in_progress.file, + preview: success.into_preview(), + elapsed, + }), + Poll::Ready(Ok(())), + ), + FileLoadFinished::Failure(failure) => ( + FileLoadState::Failed(FileLoadFailed { + file: in_progress.file, + error: failure.into_error(), + elapsed, + }), + Poll::Ready(Ok(())), + ), + } + } else { + console::log_1(&"We are not done.".into()); + (FileLoadState::InProgress(in_progress), Poll::Pending) + } + } + FileLoadState::Succeeded(loaded) => (FileLoadState::Succeeded(loaded), Poll::Ready(Ok(()))), + FileLoadState::Failed(loaded) => (FileLoadState::Failed(loaded), Poll::Ready(Ok(()))), + FileLoadState::None => unreachable!("FileLoadState::None cannot happen"), + }; + + file_load.state = state; + response + } +} diff --git a/web/rsonpath-website/src/lib.rs b/web/rsonpath-website/src/lib.rs new file mode 100644 index 00000000..f5b934a1 --- /dev/null +++ b/web/rsonpath-website/src/lib.rs @@ -0,0 +1,47 @@ +use crate::ui::WebsiteGui; +use std::any::TypeId; +use std::borrow::Cow; +use std::ops::Range; + +pub mod constants; +mod engine_run; +mod file_load; +pub mod message; +mod ui; +pub mod util; + +pub fn start(cc: &eframe::CreationContext, worker: web_sys::Worker) -> WebsiteGui { + WebsiteGui::new(cc, worker) +} + +pub(crate) struct ReadOnlyTextBuffer<'a>(Cow<'a, str>); + +impl<'a> ReadOnlyTextBuffer<'a> { + pub(crate) fn empty() -> Self { + Self(Cow::Borrowed("")) + } + + pub(crate) fn is_empty(&self) -> bool { + self.0.is_empty() + } +} + +impl<'a> egui::TextBuffer for ReadOnlyTextBuffer<'a> { + fn is_mutable(&self) -> bool { + false + } + + fn as_str(&self) -> &str { + self.0.as_ref() + } + + fn insert_text(&mut self, _text: &str, _char_index: usize) -> usize { + 0 + } + + fn delete_char_range(&mut self, _char_range: Range) {} + + fn type_id(&self) -> TypeId { + TypeId::of::>() + } +} diff --git a/web/rsonpath-website/src/message.rs b/web/rsonpath-website/src/message.rs new file mode 100644 index 00000000..72b5efee --- /dev/null +++ b/web/rsonpath-website/src/message.rs @@ -0,0 +1,729 @@ +use js_sys::Array; +use std::ops::{Add, AddAssign, Div}; +use std::time::Duration; +use wasm_bindgen::{JsCast, JsValue}; + +const WORKER_STARTED_CODE: f64 = 10.0; +const LOAD_FILE_CODE: f64 = 20.0; +const LOAD_FILE_PROGRESS_CODE: f64 = 21.0; +const LOAD_FILE_SUCCESS_CODE: f64 = 22.0; +const LOAD_FILE_FAILURE_CODE: f64 = 23.0; +const RUN_RSONPATH_CODE: f64 = 30.0; +const RUN_RSONPATH_SUCCESS_CODE: f64 = 31.0; +const RUN_RSONPATH_FAILURE_CODE: f64 = 32.0; +const DISCARD_FILE_CODE: f64 = 40.0; + +#[derive(Debug, Eq, PartialEq, Copy, Clone)] +pub enum MessageType { + WorkerStarted, + LoadFile, + LoadFileProgress, + LoadFileSuccess, + LoadFileFailure, + DiscardFile, + RunRsonpath, + RunRsonpathSuccess, + RunRsonpathFailure, + Unknown, +} + +fn code_to_type(code: f64) -> MessageType { + match code { + WORKER_STARTED_CODE => MessageType::WorkerStarted, + LOAD_FILE_CODE => MessageType::LoadFile, + LOAD_FILE_PROGRESS_CODE => MessageType::LoadFileProgress, + LOAD_FILE_SUCCESS_CODE => MessageType::LoadFileSuccess, + LOAD_FILE_FAILURE_CODE => MessageType::LoadFileFailure, + DISCARD_FILE_CODE => MessageType::DiscardFile, + RUN_RSONPATH_CODE => MessageType::RunRsonpath, + RUN_RSONPATH_SUCCESS_CODE => MessageType::RunRsonpathSuccess, + RUN_RSONPATH_FAILURE_CODE => MessageType::RunRsonpathFailure, + _ => MessageType::Unknown, + } +} + +pub trait Message: Sized { + fn ty() -> MessageType; + + fn serialize(self) -> JsValue; + + fn deserialize(value: JsValue) -> Result; +} + +pub trait MessageChannel { + fn send(&self, message: impl Message) -> Result<(), JsValue>; +} + +pub trait GenericMessage { + fn ty(&self) -> MessageType; + + fn deserialize(&self) -> Result; +} + +impl MessageChannel for web_sys::Worker { + fn send(&self, message: impl Message) -> Result<(), JsValue> { + let value = message.serialize(); + self.post_message(&value) + } +} + +impl MessageChannel for web_sys::DedicatedWorkerGlobalScope { + fn send(&self, message: impl Message) -> Result<(), JsValue> { + let value = message.serialize(); + self.post_message(&value) + } +} + +impl GenericMessage for web_sys::MessageEvent { + fn ty(&self) -> MessageType { + let data = Array::from(&self.data()); + if data.length() >= 1 + && let Some(code) = data.get(0).as_f64() + { + code_to_type(code) + } else { + MessageType::Unknown + } + } + + fn deserialize(&self) -> Result { + assert_eq!(T::ty(), self.ty(), "deserializing into invalid message type"); + T::deserialize(self.data()) + } +} + +pub struct WorkerStartedMessage { + status: i32, +} + +pub struct LoadFileMessage { + file: web_sys::File, +} + +pub struct LoadFileProgressMessage { + progress: f32, +} + +pub struct LoadFileSuccessMessage { + preview: String, +} + +pub struct LoadFileFailureMessage { + error: String, +} + +pub struct DiscardFileMessage {} + +pub struct RunRsonpathMessage { + query: String, + input: RunRsonpathInput, + result_mode: RunRsonpathMode, + repetitions: usize, +} + +pub enum RunRsonpathInput { + LoadedFile, + Inline(String), +} + +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub enum RunRsonpathMode { + Count, + Nodes, + Indices, +} + +pub struct RunRsonpathFailureMessage { + error: String, +} + +pub struct RunRsonpathSuccessMessage { + runtime: RsonpathRuntime, + results: String, +} + +#[derive(Clone)] +pub struct RsonpathRuntime { + avg_parse_time_ms: f64, + avg_compile_time_ms: f64, + avg_run_time_ms: f64, +} + +impl RsonpathRuntime { + pub fn new(avg_parse_time_ms: f64, avg_compile_time_ms: f64, avg_run_time_ms: f64) -> Self { + Self { + avg_parse_time_ms, + avg_compile_time_ms, + avg_run_time_ms, + } + } + + pub fn avg_parse_time(&self) -> Duration { + Duration::from_secs_f64(self.avg_parse_time_ms / 1000.0) + } + + pub fn avg_compile_time(&self) -> Duration { + Duration::from_secs_f64(self.avg_compile_time_ms / 1000.0) + } + + pub fn avg_run_time(&self) -> Duration { + Duration::from_secs_f64(self.avg_run_time_ms / 1000.0) + } +} + +impl Default for RsonpathRuntime { + fn default() -> Self { + Self::new(0.0, 0.0, 0.0) + } +} + +impl Add for RsonpathRuntime { + type Output = RsonpathRuntime; + + fn add(self, rhs: Self) -> Self::Output { + Self::new( + self.avg_parse_time_ms + rhs.avg_parse_time_ms, + self.avg_compile_time_ms + rhs.avg_compile_time_ms, + self.avg_run_time_ms + rhs.avg_run_time_ms, + ) + } +} + +impl AddAssign for RsonpathRuntime { + fn add_assign(&mut self, rhs: Self) { + self.avg_parse_time_ms += rhs.avg_parse_time_ms; + self.avg_compile_time_ms += rhs.avg_compile_time_ms; + self.avg_run_time_ms += rhs.avg_run_time_ms; + } +} + +impl Div for RsonpathRuntime { + type Output = RsonpathRuntime; + + fn div(self, rhs: usize) -> Self::Output { + let rhs = rhs as f64; + Self::new( + self.avg_parse_time_ms / rhs, + self.avg_compile_time_ms / rhs, + self.avg_run_time_ms / rhs, + ) + } +} + +impl WorkerStartedMessage { + pub fn new(status: i32) -> Self { + Self { status } + } + + pub fn status(&self) -> i32 { + self.status + } +} + +impl Message for WorkerStartedMessage { + fn ty() -> MessageType { + MessageType::WorkerStarted + } + + fn serialize(self) -> JsValue { + let response = Array::new(); + response.push(&WORKER_STARTED_CODE.into()); + response.push(&self.status.into()); + response.into() + } + + fn deserialize(value: JsValue) -> Result { + let data = Array::from(&value); + if data.length() != 2 { + Err(format!("malformed WorkerStartedMessage: array length {}", data.length()).into()) + } else { + let Some(status) = data.get(1).as_f64() else { + return Err("malformed WorkerStartedMessage: element is not a number" + .to_string() + .into()); + }; + Ok(Self { status: status as i32 }) + } + } +} + +impl LoadFileMessage { + pub fn new(file: web_sys::File) -> Self { + Self { file } + } + + pub fn file(&self) -> &web_sys::File { + &self.file + } +} + +impl Message for LoadFileMessage { + fn ty() -> MessageType { + MessageType::LoadFile + } + + fn serialize(self) -> JsValue { + let response = Array::new(); + response.push(&LOAD_FILE_CODE.into()); + response.push(&self.file.into()); + response.into() + } + + fn deserialize(value: JsValue) -> Result { + let data = Array::from(&value); + if data.length() != 2 { + Err(format!("malformed LoadFileMessage: array length {}", data.length()).into()) + } else { + match data.get(1).dyn_into::() { + Ok(file) => Ok(Self { file }), + Err(_err) => Err("malformed LoadFileMessage: element is not a File".to_string().into()), + } + } + } +} + +impl LoadFileProgressMessage { + pub fn new(progress: f32) -> Self { + Self { progress } + } + + pub fn progress(&self) -> f32 { + self.progress + } +} + +impl Message for LoadFileProgressMessage { + fn ty() -> MessageType { + MessageType::LoadFileProgress + } + + fn serialize(self) -> JsValue { + let response = Array::new(); + response.push(&LOAD_FILE_PROGRESS_CODE.into()); + response.push(&self.progress.into()); + response.into() + } + + fn deserialize(value: JsValue) -> Result { + let data = Array::from(&value); + if data.length() != 2 { + Err(format!("malformed LoadFileProgressMessage: array length {}", data.length()).into()) + } else { + let Some(progress) = data.get(1).as_f64() else { + return Err("malformed LoadFileProgressMessage: element is not a number" + .to_string() + .into()); + }; + Ok(Self { + progress: progress as f32, + }) + } + } +} + +impl LoadFileSuccessMessage { + pub fn new(preview: String) -> Self { + Self { preview } + } + + pub fn preview(&self) -> &str { + &self.preview + } + + pub fn into_preview(self) -> String { + self.preview + } +} + +impl Message for LoadFileSuccessMessage { + fn ty() -> MessageType { + MessageType::LoadFileSuccess + } + + fn serialize(self) -> JsValue { + let response = Array::new(); + response.push(&LOAD_FILE_SUCCESS_CODE.into()); + response.push(&self.preview.into()); + response.into() + } + + fn deserialize(value: JsValue) -> Result { + let data = Array::from(&value); + if data.length() != 2 { + Err(format!("malformed LoadFileSuccessMessage: array length {}", data.length()).into()) + } else { + let Some(preview) = data.get(1).as_string() else { + return Err("malformed LoadFileSuccessMessage: element is not a string" + .to_string() + .into()); + }; + Ok(Self { preview }) + } + } +} + +impl LoadFileFailureMessage { + pub fn new(error: String) -> Self { + Self { error } + } + + pub fn error(&self) -> &str { + &self.error + } + + pub fn into_error(self) -> String { + self.error + } +} + +impl Message for LoadFileFailureMessage { + fn ty() -> MessageType { + MessageType::LoadFileFailure + } + + fn serialize(self) -> JsValue { + let response = Array::new(); + response.push(&LOAD_FILE_FAILURE_CODE.into()); + response.push(&self.error.into()); + response.into() + } + + fn deserialize(value: JsValue) -> Result { + let data = Array::from(&value); + if data.length() != 2 { + Err(format!("malformed LoadFileFailureMessage: array length {}", data.length()).into()) + } else { + let Some(error) = data.get(1).as_string() else { + return Err("malformed LoadFileFailureMessage: element is not a string" + .to_string() + .into()); + }; + Ok(Self { error }) + } + } +} + +impl Default for DiscardFileMessage { + fn default() -> Self { + Self::new() + } +} + +impl DiscardFileMessage { + pub fn new() -> Self { + Self {} + } +} + +impl Message for DiscardFileMessage { + fn ty() -> MessageType { + MessageType::DiscardFile + } + + fn serialize(self) -> JsValue { + let response = Array::new(); + response.push(&DISCARD_FILE_CODE.into()); + response.into() + } + + fn deserialize(value: JsValue) -> Result { + let data = Array::from(&value); + if data.length() != 1 { + Err(format!("malformed DiscardFileMessage: array length {}", data.length()).into()) + } else { + Ok(Self {}) + } + } +} + +pub struct RunRsonpathMessageBuilder { + query: String, + input: RunRsonpathInput, + result_mode: RunRsonpathMode, + repetitions: usize, +} + +impl RunRsonpathMessageBuilder { + pub fn new_inline(query: String, input: String) -> Self { + Self { + query, + input: RunRsonpathInput::Inline(input), + result_mode: RunRsonpathMode::Nodes, + repetitions: 1, + } + } + + pub fn new_file(query: String) -> Self { + Self { + query, + input: RunRsonpathInput::LoadedFile, + result_mode: RunRsonpathMode::Nodes, + repetitions: 1, + } + } + + pub fn benchmark(&mut self, repetitions: usize) -> &mut Self { + self.repetitions = repetitions; + self + } + + pub fn result_mode(&mut self, mode: RunRsonpathMode) -> &mut Self { + self.result_mode = mode; + self + } + + pub fn into_message(self) -> RunRsonpathMessage { + RunRsonpathMessage { + query: self.query, + input: self.input, + result_mode: self.result_mode, + repetitions: self.repetitions, + } + } +} + +impl From for RunRsonpathMessage { + fn from(value: RunRsonpathMessageBuilder) -> Self { + value.into_message() + } +} + +impl RunRsonpathMessage { + const INLINE_INPUT_CODE: f64 = 1.0; + const FILE_INPUT_CODE: f64 = 2.0; + const RESULT_MODE_COUNT_CODE: f64 = 1.0; + const RESULT_MODE_NODES_CODE: f64 = 2.0; + const RESULT_MODE_INDICES_CODE: f64 = 3.0; + + pub fn new_inline(query: String, input: String, result_mode: RunRsonpathMode) -> Self { + Self { + query, + input: RunRsonpathInput::Inline(input), + result_mode, + repetitions: 1, + } + } + + pub fn new_file(query: String, result_mode: RunRsonpathMode) -> Self { + Self { + query, + input: RunRsonpathInput::LoadedFile, + result_mode, + repetitions: 1, + } + } + + pub fn query(&self) -> &str { + &self.query + } + + pub fn input(&self) -> &RunRsonpathInput { + &self.input + } + + pub fn result_mode(&self) -> RunRsonpathMode { + self.result_mode + } + + pub fn repetitions(&self) -> usize { + self.repetitions + } + + pub fn is_benchmark_run(&self) -> bool { + self.repetitions > 1 + } +} + +impl Message for RunRsonpathMessage { + fn ty() -> MessageType { + MessageType::RunRsonpath + } + + fn serialize(self) -> JsValue { + let response = Array::new(); + response.push(&RUN_RSONPATH_CODE.into()); + response.push(&self.query.into()); + match self.input { + RunRsonpathInput::LoadedFile => { + response.push(&Self::FILE_INPUT_CODE.into()); + response.push(&JsValue::UNDEFINED); + } + RunRsonpathInput::Inline(input) => { + response.push(&Self::INLINE_INPUT_CODE.into()); + response.push(&input.into()); + } + }; + match self.result_mode { + RunRsonpathMode::Count => response.push(&Self::RESULT_MODE_COUNT_CODE.into()), + RunRsonpathMode::Nodes => response.push(&Self::RESULT_MODE_NODES_CODE.into()), + RunRsonpathMode::Indices => response.push(&Self::RESULT_MODE_INDICES_CODE.into()), + }; + response.push(&self.repetitions.into()); + response.into() + } + + fn deserialize(value: JsValue) -> Result { + let data = Array::from(&value); + if data.length() != 6 { + Err(format!("malformed RunRsonpathMessage: array length {}", data.length()).into()) + } else { + let Some(query) = data.get(1).as_string() else { + return Err("malformed RunRsonpathMessage: element 1 is not a string" + .to_string() + .into()); + }; + let Some(input_code) = data.get(2).as_f64() else { + return Err("malformed RunRsonpathMessage: element 2 is not a number" + .to_string() + .into()); + }; + let input = match input_code { + Self::INLINE_INPUT_CODE => { + let Some(inline_input) = data.get(3).as_string() else { + return Err("malformed RunRsonpathMessage: element 3 is not a string" + .to_string() + .into()); + }; + RunRsonpathInput::Inline(inline_input) + } + Self::FILE_INPUT_CODE => RunRsonpathInput::LoadedFile, + _ => return Err("malformed RunRsonpathMessage: unknown input code".into()), + }; + let Some(result_code) = data.get(4).as_f64() else { + return Err("malformed RunRsonpathMessage: element 4 is not a number" + .to_string() + .into()); + }; + let result_mode = match result_code { + Self::RESULT_MODE_COUNT_CODE => RunRsonpathMode::Count, + Self::RESULT_MODE_NODES_CODE => RunRsonpathMode::Nodes, + Self::RESULT_MODE_INDICES_CODE => RunRsonpathMode::Indices, + _ => { + return Err("malformed RunRsonpathMessage: unknown result code".to_string().into()); + } + }; + let Some(repetitions) = data.get(5).as_f64() else { + return Err("malformed RunRsonpathMessage: element 4 is not a number" + .to_string() + .into()); + }; + Ok(Self { + query, + input, + result_mode, + repetitions: repetitions as usize, + }) + } + } +} + +impl RunRsonpathSuccessMessage { + pub fn new(runtime: RsonpathRuntime, results: String) -> Self { + Self { runtime, results } + } + + pub fn runtime(&self) -> &RsonpathRuntime { + &self.runtime + } + + pub fn results(&self) -> &str { + &self.results + } + + pub fn into_results(self) -> String { + self.results + } +} + +impl Message for RunRsonpathSuccessMessage { + fn ty() -> MessageType { + MessageType::RunRsonpathSuccess + } + + fn serialize(self) -> JsValue { + let response = Array::new(); + response.push(&RUN_RSONPATH_SUCCESS_CODE.into()); + response.push(&self.results.into()); + response.push(&self.runtime.avg_parse_time_ms.into()); + response.push(&self.runtime.avg_compile_time_ms.into()); + response.push(&self.runtime.avg_run_time_ms.into()); + response.into() + } + + fn deserialize(value: JsValue) -> Result { + let data = Array::from(&value); + if data.length() != 5 { + Err(format!("malformed RunRsonpathSuccessMessage: array length {}", data.length()).into()) + } else { + let Some(results) = data.get(1).as_string() else { + return Err("malformed RunRsonpathSuccessMessage: element 1 is not a string" + .to_string() + .into()); + }; + let Some(avg_parse_time_ms) = data.get(2).as_f64() else { + return Err("malformed RunRsonpathMessage: element 2 is not a number" + .to_string() + .into()); + }; + let Some(avg_compile_time_ms) = data.get(3).as_f64() else { + return Err("malformed RunRsonpathMessage: element 3 is not a number" + .to_string() + .into()); + }; + let Some(avg_run_time_ms) = data.get(4).as_f64() else { + return Err("malformed RunRsonpathMessage: element 4 is not a number" + .to_string() + .into()); + }; + Ok(Self { + results, + runtime: RsonpathRuntime { + avg_parse_time_ms, + avg_compile_time_ms, + avg_run_time_ms, + }, + }) + } + } +} + +impl RunRsonpathFailureMessage { + pub fn new(error: String) -> Self { + Self { error } + } + + pub fn error(&self) -> &str { + &self.error + } + + pub fn into_error(self) -> String { + self.error + } +} + +impl Message for RunRsonpathFailureMessage { + fn ty() -> MessageType { + MessageType::RunRsonpathFailure + } + + fn serialize(self) -> JsValue { + let response = Array::new(); + response.push(&RUN_RSONPATH_FAILURE_CODE.into()); + response.push(&self.error.into()); + response.into() + } + + fn deserialize(value: JsValue) -> Result { + let data = Array::from(&value); + if data.length() != 2 { + Err(format!("malformed LoadFileFailureMessage: array length {}", data.length()).into()) + } else { + let Some(error) = data.get(1).as_string() else { + return Err("malformed LoadFileFailureMessage: element is not a string" + .to_string() + .into()); + }; + Ok(Self { error }) + } + } +} diff --git a/web/rsonpath-website/src/package.json b/web/rsonpath-website/src/package.json new file mode 100644 index 00000000..c45c711e --- /dev/null +++ b/web/rsonpath-website/src/package.json @@ -0,0 +1,14 @@ +{ + "name": "src", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/GeoChatzik/rsonpath.git" + }, + "private": true +} diff --git a/web/rsonpath-website/src/runner.rs b/web/rsonpath-website/src/runner.rs new file mode 100644 index 00000000..77a9e232 --- /dev/null +++ b/web/rsonpath-website/src/runner.rs @@ -0,0 +1,253 @@ +use rsonpath::automaton::Automaton; +use rsonpath::engine::{Compiler, Engine, RsonpathEngine}; +use rsonpath::input::BorrowedBytes; +use rsonpath::result::MatchWriter; +use rsonpath_syntax::{JsonPathQuery, ParserBuilder}; +use rsonpath_website::constants; +use rsonpath_website::message::*; +use rsonpath_website::util::{DisplaySize, error_string}; +use std::io::Write; +use std::rc::Rc; +use std::sync::Mutex; +use wasm_bindgen::prelude::*; +use web_sys::{DedicatedWorkerGlobalScope, FileReader, MessageEvent, console}; +use web_time::Instant; + +#[derive(Clone)] +struct Runner(Rc); + +struct RunnerImpl { + scope: DedicatedWorkerGlobalScope, + input: Mutex, +} + +enum RunnerInput { + None, + Loading, + Loaded(String), +} + +fn main() { + console_error_panic_hook::set_once(); + console::log_1(&"worker starting".into()); + + let scope = DedicatedWorkerGlobalScope::from(JsValue::from(js_sys::global())); + + Runner::init(scope.clone()); + + let msg = WorkerStartedMessage::new(0); + scope.send(msg).expect("posting ready message succeeds"); +} + +impl Runner { + fn init(scope: DedicatedWorkerGlobalScope) { + let this = Self(Rc::new(RunnerImpl { + scope: scope.clone(), + input: Mutex::new(RunnerInput::None), + })); + + let handler = Closure::wrap(Box::new(move |msg: MessageEvent| { + this.handle(msg); + }) as Box); + scope.set_onmessage(Some(handler.as_ref().unchecked_ref())); + handler.forget(); + } + + fn handle(&self, event: MessageEvent) { + match event.ty() { + MessageType::LoadFile => { + let msg = event + .deserialize::() + .expect("LoadFileMessage to be correct"); + if let Err(err) = self.handle_load_file(msg) { + self.0 + .scope + .send(LoadFileFailureMessage::new(error_string(err))) + .expect("posting response to LoadFile succeeds") + } + } + MessageType::LoadFileProgress => console::warn_1(&"Runner cannot handle LoadFileProgress".into()), + MessageType::LoadFileSuccess => console::warn_1(&"Runner cannot handle LoadFileSuccess".into()), + MessageType::LoadFileFailure => console::warn_1(&"Runner cannot handle LoadFileFailure".into()), + MessageType::DiscardFile => { + let _ = event + .deserialize::() + .expect("DiscardFileMessage to be correct"); + self.discard_file(); + } + MessageType::RunRsonpath => { + let msg = event + .deserialize::() + .expect("RunRsonpathMessage to be correct"); + if let Err(err) = self.handle_run(msg) { + self.0 + .scope + .send(RunRsonpathFailureMessage::new(error_string(err))) + .expect("posting response to RunRsonpath succeeds") + } + } + MessageType::RunRsonpathSuccess => console::warn_1(&"Runner cannot handle RunRsonpathSuccess".into()), + MessageType::RunRsonpathFailure => console::warn_1(&"Runner cannot handle RunRsonpathFailure".into()), + MessageType::WorkerStarted => console::warn_1(&"Runner cannot handle WorkerStarted".into()), + MessageType::Unknown => console::warn_1(&"Runner received unknown message".into()), + } + } + + fn handle_load_file(&self, msg: LoadFileMessage) -> Result<(), JsValue> { + console::log_1(&"Runner handling LoadFile event...".into()); + { + let mut state = self.0.input.lock().unwrap(); + + match &*state { + RunnerInput::Loading => return Err("Runner received LoadFile event while already loading".into()), + RunnerInput::None | RunnerInput::Loaded(_) => { + *state = RunnerInput::Loading; + } + }; + } + if msg.file().size() > constants::FILE_MAX_BYTES as f64 { + return Err(format!( + "The file is too large; max size is {} due to browser limitations.", + DisplaySize(constants::FILE_MAX_BYTES as f64) + ) + .into()); + } + let reader = FileReader::new()?; + match reader.read_as_text(msg.file()) { + Ok(_) => { + let runner = self.0.clone(); + let reader_clone = reader.clone(); + let onloadend_cb = Closure::wrap(Box::new(move |_event: web_sys::Event| { + assert_eq!(reader_clone.ready_state(), FileReader::DONE); + if let Some(err) = reader_clone.error() { + runner + .scope + .send(LoadFileFailureMessage::new(err.message())) + .expect("posting LoadFileFailure message succeeds") + } else { + let text_value = reader_clone.result().expect("result should be Ok when Error is None"); + let text = text_value.as_string().expect("text value should be String"); + let mut preview = String::with_capacity(constants::FILE_PREVIEW_CHARS + 3); + preview.extend(text.chars().take(constants::FILE_PREVIEW_CHARS)); + preview += "..."; + *runner.input.lock().unwrap() = RunnerInput::Loaded(text); + runner + .scope + .send(LoadFileSuccessMessage::new(preview)) + .expect("posting LoadFileSuccess message succeeds"); + } + }) as Box); + let runner = self.0.clone(); + let onprogress = Closure::wrap(Box::new(move |event: web_sys::Event| { + let event = event.dyn_ref::().unwrap(); + let progress = (event.loaded() / event.total()) as f32; + runner + .scope + .send(LoadFileProgressMessage::new(progress)) + .expect("posting LoadFileProgress message succeeds"); + }) as Box); + reader.set_onloadend(Some(onloadend_cb.as_ref().unchecked_ref())); + reader.set_onprogress(Some(onprogress.as_ref().unchecked_ref())); + onloadend_cb.forget(); + onprogress.forget(); + Ok(()) + } + Err(err) => { + console::error_1(&"LoadFile: immediate error.".into()); + Err(err) + } + } + } + + fn discard_file(&self) { + console::log_1(&"Runner handling DiscardFile event...".into()); + let mut input = self.0.input.lock().unwrap(); + *input = RunnerInput::None; + } + + fn handle_run(&self, msg: RunRsonpathMessage) -> Result<(), JsValue> { + console::log_1(&"Runner handling RunRsonpath event...".into()); + let input_lock = self.0.input.lock().unwrap(); + let input = match msg.input() { + RunRsonpathInput::LoadedFile => match &*input_lock { + RunnerInput::None | RunnerInput::Loading => { + return Err("LoadedFile run requested but no file is loaded".into()); + } + RunnerInput::Loaded(json) => BorrowedBytes::new(json.as_bytes()), + }, + RunRsonpathInput::Inline(json) => BorrowedBytes::new(json.as_bytes()), + }; + + let msg = if !msg.is_benchmark_run() { + let (results, stats) = run_once(&msg, &input)?; + RunRsonpathSuccessMessage::new(stats, results) + } else { + let (results, _) = run_once(&msg, &input)?; + for _ in 1..constants::WARMUP_RUNS { + let _ = run_once(&msg, &input)?; + } + let mut acc_stats = RsonpathRuntime::default(); + for _ in 0..msg.repetitions() { + let (_, stats) = run_once(&msg, &input)?; + acc_stats += stats; + } + RunRsonpathSuccessMessage::new(acc_stats / msg.repetitions(), results) + }; + + self.0.scope.send(msg)?; + console::log_1(&"Message sent.".into()); + + return Ok(()); + + fn run_once(msg: &RunRsonpathMessage, input: &BorrowedBytes) -> Result<(String, RsonpathRuntime), JsValue> { + let parse_start = Instant::now(); + let query = parse_query(msg.query())?; + let parse_time = parse_start.elapsed(); + console::log_1(&"Parsed!".into()); + + let compile_start = Instant::now(); + let automaton = compile_query(&query)?; + let compile_time = compile_start.elapsed(); + console::log_1(&"Compiled!".into()); + + let mut out = Vec::new(); + + let engine = RsonpathEngine::from_compiled_query(automaton); + + let start = Instant::now(); + match msg.result_mode() { + RunRsonpathMode::Count => engine.count(input).map(|res| write!(&mut out, "{res}").unwrap()), + RunRsonpathMode::Indices => { + let mut sink = MatchWriter::from(&mut out); + engine.indices(input, &mut sink) + } + RunRsonpathMode::Nodes => { + let mut sink = MatchWriter::from(&mut out); + engine.matches(input, &mut sink) + } + } + .map_err(|err| err.to_string())?; + let run_time = start.elapsed(); + console::log_2(&"Finished in".into(), &run_time.as_secs_f64().into()); + + let results = String::from_utf8(out).expect(""); + let stats = RsonpathRuntime::new( + parse_time.as_secs_f64() * 1000.0, + compile_time.as_secs_f64() * 1000.0, + run_time.as_secs_f64() * 1000.0, + ); + Ok((results, stats)) + } + + fn parse_query(query_string: &str) -> Result { + let mut parser_builder = ParserBuilder::default(); + parser_builder.allow_surrounding_whitespace(true); + let parser: rsonpath_syntax::Parser = parser_builder.into(); + parser.parse(query_string).map_err(|err| err.to_string()) + } + + fn compile_query(query: &JsonPathQuery) -> Result { + Automaton::new(query).map_err(|err| err.to_string()) + } + } +} diff --git a/web/rsonpath-website/src/ui.rs b/web/rsonpath-website/src/ui.rs new file mode 100644 index 00000000..bdfbcbd5 --- /dev/null +++ b/web/rsonpath-website/src/ui.rs @@ -0,0 +1,679 @@ +use crate::ReadOnlyTextBuffer; +use crate::constants; +use crate::engine_run::{EngineRun, EngineRunState}; +use crate::file_load::FileLoad; +use crate::file_load::FileLoadState; +use crate::message::{RunRsonpathMessageBuilder, RunRsonpathMode}; +use crate::util::DisplaySize; +use eframe::Frame; +use eframe::emath::Align; +use eframe::epaint::Color32; +use eframe::epaint::text::TextWrapMode; +use egui::{ + Button, ComboBox, Layout, ProgressBar, RichText, ScrollArea, Separator, Spinner, TextEdit, TextStyle, + TopBottomPanel, Vec2, +}; +use egui_async::EguiAsyncPlugin; +use std::any::TypeId; +use std::borrow::Cow; +use std::cell::RefCell; +use std::ops::Range; +use std::rc::Rc; +use wasm_bindgen::prelude::*; +use web_sys::{HtmlInputElement, Worker, window}; + +#[derive(Clone)] +pub struct WebsiteGui(Rc>); + +pub struct WebsiteImpl { + json_input: String, + query_input: String, + console_output: Console, + is_dragging_file: bool, + toggle_dark_mode_on: bool, + toggle_console_on: bool, + result_mode: RunRsonpathMode, + benchmark_repetitions: usize, + runner: Worker, + file_load: FileLoad, + file_input_element: HtmlInputElement, + engine_run: EngineRun, +} + +struct Console { + buffer: String, +} + +impl Console { + pub fn new() -> Self { + Self { buffer: String::new() } + } + + pub fn log(&mut self, message: &str) { + self.buffer.push_str(message); + self.buffer.push('\n'); + } + + pub fn warn(&mut self, message: &str) { + self.buffer.push_str("WARNING: "); + self.buffer.push_str(message); + self.buffer.push('\n'); + } + + pub fn error(&mut self, message: &str) { + self.buffer.push_str("ERROR: "); + self.buffer.push_str(message); + self.buffer.push('\n'); + } + + pub fn clear(&mut self) { + self.buffer.clear() + } +} + +impl egui::TextBuffer for Console { + fn is_mutable(&self) -> bool { + false + } + + fn as_str(&self) -> &str { + self.buffer.as_str() + } + + fn insert_text(&mut self, _text: &str, _char_index: usize) -> usize { + 0 + } + + fn delete_char_range(&mut self, _char_range: Range) {} + + fn type_id(&self) -> TypeId { + TypeId::of::() + } +} + +//File select for web version +#[cfg(target_arch = "wasm32")] +impl WebsiteGui { + pub fn new(cc: &eframe::CreationContext, worker: Worker) -> Self { + let document = window() + .expect("window to be present") + .document() + .expect("document to be present"); + let file_input = document + .get_element_by_id(constants::FILE_INPUT_ELEMENT_ID) + .expect("file-input element not found, update FILE_INPUT_ELEMENT_ID") + .dyn_into::() + .unwrap(); + + let inner = Rc::new(RefCell::new(WebsiteImpl { + json_input: String::new(), + query_input: String::new(), + console_output: Console::new(), + is_dragging_file: false, + toggle_dark_mode_on: true, + toggle_console_on: true, + result_mode: RunRsonpathMode::Nodes, + benchmark_repetitions: 1, + runner: worker, + file_input_element: file_input, + file_load: FileLoad::new(), + engine_run: EngineRun::new(), + })); + + let inner_clone = inner.clone(); + let runner_clone = inner.borrow().runner.clone(); + let egui_ctx = cc.egui_ctx.clone(); + let onchange = Closure::wrap(Box::new(move |_: web_sys::Event| { + let file = inner_clone.borrow().file_input_element.files().unwrap().get(0).unwrap(); + inner_clone + .borrow() + .file_load + .request_async_load(file, egui_ctx.clone(), runner_clone.clone()); + }) as Box); + inner + .borrow() + .file_input_element + .set_onchange(Some(onchange.as_ref().unchecked_ref())); + onchange.forget(); + + let canvas = document + .get_element_by_id(constants::CANVAS_ELEMENT_ID) + .expect("canvas element not found, update CANVAS_ELEMENT_ID") + .dyn_into::() + .expect("canvas to be a Canvas"); + let egui_ctx = cc.egui_ctx.clone(); + let ondragover = Closure::wrap(Box::new(move |e: web_sys::Event| { + e.prevent_default(); + egui_ctx.request_repaint(); + }) as Box); + canvas.set_ondragover(Some(ondragover.as_ref().unchecked_ref())); + ondragover.forget(); + let inner_clone = inner.clone(); + let runner_clone = inner.borrow().runner.clone(); + let egui_ctx = cc.egui_ctx.clone(); + let ondrop = Closure::wrap(Box::new(move |e: web_sys::DragEvent| { + e.prevent_default(); + let file = e.data_transfer().unwrap().files().unwrap().get(0).unwrap(); + inner_clone + .borrow() + .file_load + .request_async_load(file, egui_ctx.clone(), runner_clone.clone()); + }) as Box); + canvas.set_ondrop(Some(ondrop.as_ref().unchecked_ref())); + ondrop.forget(); + + Self(inner) + } +} + +impl eframe::App for WebsiteGui { + fn update(&mut self, ctx: &egui::Context, frame: &mut Frame) { + self.0.borrow_mut().update(ctx, frame) + } +} + +impl eframe::App for WebsiteImpl { + fn update(&mut self, ctx: &egui::Context, _frame: &mut Frame) { + self.install_plugins(ctx); + self.set_style(ctx); + self.console_output.clear(); + + self.show_menu_bar(ctx); + self.show_central_panel(ctx); + + self.handle_file_drag(ctx); + } +} + +impl WebsiteImpl { + fn install_plugins(&self, ctx: &egui::Context) { + egui_extras::install_image_loaders(ctx); + ctx.plugin_or_default::(); + } + + fn set_style(&self, ctx: &egui::Context) { + ctx.set_style({ + let mut style = (*ctx.style()).clone(); + style.spacing.button_padding = egui::vec2(12.0, 8.0); + style.text_styles = [ + ( + egui::TextStyle::Button, + egui::FontId::new(constants::FONT_SIZE_NORMAL, egui::FontFamily::Proportional), + ), + ( + egui::TextStyle::Body, + egui::FontId::new(constants::FONT_SIZE_NORMAL, egui::FontFamily::Proportional), + ), + ( + egui::TextStyle::Monospace, + egui::FontId::new(constants::FONT_SIZE_NORMAL, egui::FontFamily::Monospace), + ), + ] + .into(); + style + }); + + if self.toggle_dark_mode_on { + ctx.set_visuals(egui::Visuals::dark()); + } else { + ctx.set_visuals(egui::Visuals::light()); + } + } + + fn highlight_color(&self) -> Color32 { + if self.toggle_dark_mode_on { + Color32::WHITE + } else { + Color32::DARK_GRAY + } + } + + fn text_on_highlight_color(&self) -> Color32 { + if self.toggle_dark_mode_on { + Color32::DARK_GRAY + } else { + Color32::WHITE + } + } + + fn show_menu_bar(&mut self, ctx: &egui::Context) { + let highlight_color = self.highlight_color(); + let text_on_highlight_color = self.text_on_highlight_color(); + TopBottomPanel::top("menu bar").show(ctx, |ui| { + ui.horizontal_wrapped(|ui| { + // rq logo + let logo_src = egui::include_image!("../assets/rsonquery-rq-logo.svg"); + let logo_image = egui::Image::new(logo_src) + .max_height(100.0) + .fit_to_exact_size(Vec2::new(200.0, 40.0)); + ui.add(logo_image); + + // File menu button + ui.menu_button("File", |ui| { + //Wipes all text windows to allow user to start anew + if ui.button("New").clicked() { + self.json_input.clear(); + self.query_input.clear(); + + ui.close(); + } + + //Opens JSON file from computer + if ui.button("Open...").clicked() { + self.open_file(); + ui.close(); + } + + ui.separator(); + + //Exports input text into a JSON file + if ui.button("Export to JSON").clicked() { + export_to_json(&self.json_input); + ui.close(); + } + }); + + // File load status. + let mut discard_button = None; + self.file_load.with_state(|state| match state { + // When in progress, display progress bar and spinner. + FileLoadState::InProgress(in_progress) => { + let progress = in_progress.progress(); + let percentage = (progress * 100.0) as u32; + let percentage_text = RichText::new(format!("{percentage}%")).color(text_on_highlight_color); + let progress_bar = ProgressBar::new(progress) + .text(percentage_text) + .fill(highlight_color) + .desired_height(30.0) + .desired_width(400.0) + .corner_radius(0.0); + let spinner = Spinner::new().color(highlight_color).size(30.0); + ui.add(progress_bar); + ui.add(spinner); + } + // When loaded, display file name, size, and discard button. + FileLoadState::Succeeded(success) => { + self.json_input = success.preview().to_string(); + self.console_output + .log(&format!("Loading file succeeded in {:?}", success.elapsed())); + + egui::Frame::NONE + .fill(highlight_color) + .inner_margin(Vec2::new(10.0, 0.0)) + .outer_margin(Vec2::new(0.0, 4.0)) + .show(ui, |ui| { + ui.add( + egui::Label::new( + RichText::new(success.file().name().to_string()).color(text_on_highlight_color), + ) + .wrap_mode(TextWrapMode::Truncate), + ); + ui.add(egui::Label::new( + RichText::new(format!("({})", DisplaySize(success.file().size()))) + .color(text_on_highlight_color), + )); + discard_button = Some(ui.button("❌").on_hover_text("Discard file.")); + }); + } + FileLoadState::Failed(failure) => { + self.console_output + .error(&format!("Loading file failed: {}", failure.error())); + } + FileLoadState::Idle | FileLoadState::Requested(_) => (), + FileLoadState::None => unreachable!("FileLoadState::None must not happen"), + }); + + if discard_button.is_some_and(|r| r.clicked()) { + self.file_load.discard(ctx, &self.runner); + self.json_input.clear(); + } + + // The buttons to the right: console and dark mode. + ui.with_layout(Layout::right_to_left(Align::Center), |ui| { + // Export output button + self.engine_run.with_state(|state| { + if let EngineRunState::Succeeded(success) = state { + // Save results to the computer. + if ui.button("Download results").clicked() { + export_to_json(success.results()); + } + } + }); + + //Console toggle checkbox + let toggle_console_text = RichText::new("Toggle Console") + .color(ui.visuals().text_color()) + .size(constants::FONT_SIZE_NORMAL) + .strong(); + + ui.checkbox(&mut self.toggle_console_on, toggle_console_text); + + ui.add_space(10.0); + + //Dark mode checkbox + let toggle_console_text = RichText::new("Toggle Dark Mode") + .color(ui.visuals().text_color()) + .size(constants::FONT_SIZE_NORMAL) + .strong(); + + ui.checkbox(&mut self.toggle_dark_mode_on, toggle_console_text) + }); + }) + }); + } + + fn show_central_panel(&mut self, ctx: &egui::Context) { + egui::CentralPanel::default().show(ctx, |ui| { + ScrollArea::both().auto_shrink([false; 2]).show(ui, |ui| { + let screen_width = ctx.content_rect().width(); + let screen_height = ctx.content_rect().height(); + + ui.with_layout(Layout::left_to_right(Align::Center), |ui| { + ui.vertical(|ui| { + let hint_text = RichText::new("Enter the JSON here...") + .size(constants::FONT_SIZE_NORMAL) + .color(ui.visuals().weak_text_color()) + .strong(); + + let left_side_width = screen_width * 0.5; + + let json_box_height = screen_height * 0.620; + + //Json input window + ScrollArea::vertical() + .id_salt("Json input window") + .max_height(json_box_height) + .show(ui, |ui| { + self.file_load.with_state(|state| match state { + FileLoadState::Requested(_) + | FileLoadState::Succeeded(_) + | FileLoadState::InProgress(_) => { + ui.add_enabled_ui(false, |ui| { + ui.add_sized( + [left_side_width, json_box_height], + TextEdit::multiline(&mut self.json_input) + .hint_text(hint_text) + .interactive(false), + ); + }); + } + FileLoadState::Failed(_) | FileLoadState::Idle | FileLoadState::None => { + ui.add_sized( + [left_side_width, json_box_height], + TextEdit::multiline(&mut self.json_input).hint_text(hint_text), + ); + } + }); + }); + + ui.add_space(15.0); + + // Query input + arguments + ui.horizontal(|ui| { + ui.vertical(|ui| { + let query_label = RichText::new("Enter your query here...") + .size(constants::FONT_SIZE_NORMAL) + .color(ui.visuals().weak_text_color()) + .strong(); + + //Query input + ScrollArea::vertical() + .id_salt("query_input_scroll") + .max_height(ui.available_height()) + .show(ui, |ui| { + ui.add_sized( + [left_side_width * 0.75, ui.available_height()], + TextEdit::multiline(&mut self.query_input) + .hint_text(query_label) + .desired_rows(1), + ); + }); + }); + + ui.add_space(10.0); + + ui.vertical(|ui| { + ui.add_space(10.0); + + ui.horizontal(|ui| { + ui.vertical(|ui| { + ComboBox::from_label("Result Mode") + .selected_text(format!("{:?}", self.result_mode)) + .show_ui(ui, |ui| { + ui.selectable_value( + &mut self.result_mode, + RunRsonpathMode::Nodes, + "Nodes", + ); + ui.selectable_value( + &mut self.result_mode, + RunRsonpathMode::Count, + "Count", + ); + ui.selectable_value( + &mut self.result_mode, + RunRsonpathMode::Indices, + "Indices", + ); + }); + }); + }); + + ui.add_space(10.0); + + //Repeat query x times + ui.add( + egui::DragValue::new(&mut self.benchmark_repetitions) + .speed(1) + .range(1..=10000) + .prefix("Repetitions: "), + ); + }); + }); + + ui.add_space(20.0); + + let runnable = self.engine_run.with_state(|state| { + matches!( + state, + EngineRunState::Idle | EngineRunState::Succeeded(_) | EngineRunState::Failed(_) + ) + }); + let is_file_loading = self.file_load.with_state(|state| { + matches!(state, FileLoadState::Requested(_) | FileLoadState::InProgress(_)) + }); + + let button = if !runnable { + let button_text = RichText::new("Running...").size(20.0).color(Color32::WHITE); + Button::new(button_text).fill(Color32::GRAY) + } else if is_file_loading { + let button_text = RichText::new("Loading...").size(20.0).color(Color32::WHITE); + Button::new(button_text).fill(Color32::GRAY) + } else { + let button_text = RichText::new("Run Query").size(20.0).color(Color32::WHITE).strong(); + Button::new(button_text).fill(constants::RQ_COLOR) + }; + + let response = ui.add_enabled_ui(runnable, |ui| { + ui.add_sized([left_side_width, screen_height * 0.144], button) + }); + + if response.inner.clicked() { + assert!(runnable); + let file_is_loaded = self + .file_load + .with_state(|state| matches!(state, FileLoadState::Succeeded(_))); + let mut msg = if file_is_loaded { + RunRsonpathMessageBuilder::new_file(self.query_input.clone()) + } else { + RunRsonpathMessageBuilder::new_inline(self.query_input.clone(), self.json_input.clone()) + }; + if self.benchmark_repetitions > 1 { + msg.benchmark(self.benchmark_repetitions); + } + msg.result_mode(self.result_mode); + self.engine_run + .request_async_run(msg.into(), ctx.clone(), self.runner.clone()); + } + }); + ui.add(Separator::default().vertical()); + + self.engine_run.with_state(|state| { + let mut out_buffer = ReadOnlyTextBuffer::empty(); + match state { + EngineRunState::Idle | EngineRunState::InProgress(_) | EngineRunState::Requested(_) => {} + EngineRunState::Succeeded(success) => { + out_buffer = if success.results().len() > constants::MAX_OUTPUT_BYTES { + ReadOnlyTextBuffer(Cow::Owned(format!( + "", + DisplaySize(success.results().len() as f64) + ))) + } else { + ReadOnlyTextBuffer(Cow::Borrowed(success.results())) + }; + if out_buffer.is_empty() { + self.console_output.warn("Result set is empty"); + } + let mut message = "Runtime stats".to_string(); + if self.benchmark_repetitions > 1 { + message += &format!(" (averaged over {} runs)", self.benchmark_repetitions); + } + message += "\n\n"; + message += &format!( + "\t- Parse time: {:?}\n\t- Compile time: {:?}\n\t- Run time: {:?}", + success.runtime().avg_parse_time(), + success.runtime().avg_compile_time(), + success.runtime().avg_run_time(), + ); + self.console_output.log(&message); + } + EngineRunState::Failed(failure) => { + self.console_output.error(failure.error()); + } + EngineRunState::None => unreachable!("EngineRunState::None cannot happen"), + } + + ui.vertical(|ui| { + //Output window + let output_window_height = if self.toggle_console_on { + screen_height * 0.70 + } else { + screen_height + }; + let output_window_width = screen_width * 0.48; + + let query_output_hint_text = RichText::new("The result of your query will appear here...") + .size(constants::FONT_SIZE_NORMAL) + .color(ui.visuals().weak_text_color()) + .strong(); + + ui.label("Output"); + ScrollArea::vertical() + .id_salt("Query output window") + .max_height(output_window_height) + .show(ui, |ui| { + ui.add_sized( + [output_window_width, output_window_height], + TextEdit::multiline(&mut out_buffer) + .desired_rows(5) + .interactive(true) + .hint_text(query_output_hint_text), + ); + }); + + //Console window + if self.toggle_console_on { + ui.add_space(15.0); + ui.separator(); + + let console_output_hint_text = RichText::new("Diagnostics will appear here...") + .size(constants::FONT_SIZE_NORMAL) + .color(ui.visuals().weak_text_color()) + .strong(); + + ui.label("Console"); + ScrollArea::vertical() + .id_salt("Console output window") + .max_height(output_window_height) + .show(ui, |ui| { + ui.add_sized( + [output_window_width, screen_height * 0.20], + TextEdit::multiline(&mut self.console_output) + .font(TextStyle::Monospace) + .interactive(true) + .hint_text(console_output_hint_text), + ); + }); + } + }); + }); + }) + }); + }); + } + + fn handle_file_drag(&mut self, ctx: &egui::Context) { + //Checks if any files are dragged over and if yes, darkens the screen and displays a piece of text to confirm something happened + let input = ctx.input(|i| i.clone()); + self.is_dragging_file = !input.raw.hovered_files.is_empty(); + + if self.is_dragging_file { + use egui::{Align2, Color32}; + + let screen_rect = ctx.content_rect(); + let painter = ctx.layer_painter(egui::LayerId::new( + egui::Order::Foreground, + egui::Id::new("drag_overlay"), + )); + painter.rect_filled(screen_rect, 0.0, Color32::from_black_alpha(180)); + + painter.text( + screen_rect.center(), + Align2::CENTER_CENTER, + "📂 Drop your file here", + egui::FontId::proportional(32.0), + Color32::WHITE, + ); + } + } + + fn open_file(&self) { + self.file_input_element.click(); + } +} + +fn export_to_json(json_input: &str) { + use wasm_bindgen::JsCast; + use web_sys::{Blob, BlobPropertyBag, HtmlAnchorElement, Url}; + + let window = window().unwrap(); + let document = window.document().unwrap(); + let body = document.body().unwrap(); + + // Create JSON blob + let array = js_sys::Array::new(); + array.push(&JsValue::from_str(json_input)); + + let bag = BlobPropertyBag::new(); + bag.set_type("application/json"); + + let blob = Blob::new_with_str_sequence_and_options(&array, &bag).expect("Failed to create Blob"); + + let url = Url::create_object_url_with_blob(&blob).expect("Failed to create URL"); + + // Create invisible link + let link = document + .create_element("a") + .unwrap() + .dyn_into::() + .unwrap(); + link.set_href(&url); + link.set_download("data.json"); + link.style().set_property("display", "none").unwrap(); + + // Append link to DOM *before* clicking + body.append_child(&link).unwrap(); + link.click(); + body.remove_child(&link).unwrap(); // Clean up + Url::revoke_object_url(&url).unwrap(); // Free memory +} diff --git a/web/rsonpath-website/src/util.rs b/web/rsonpath-website/src/util.rs new file mode 100644 index 00000000..3cde108a --- /dev/null +++ b/web/rsonpath-website/src/util.rs @@ -0,0 +1,49 @@ +use std::fmt::{Display, Formatter}; +use std::sync::atomic::{AtomicU32, Ordering}; +use wasm_bindgen::JsValue; + +/// Thin wrapper over [`AtomicU32`] for [`f32`] values. +pub(crate) struct AtomicF32(AtomicU32); + +impl AtomicF32 { + pub const fn new(v: f32) -> Self { + AtomicF32(AtomicU32::new(v.to_bits())) + } + + pub fn get(&self, ordering: Ordering) -> f32 { + f32::from_bits(self.0.load(ordering)) + } + + pub fn store(&self, v: f32, ordering: Ordering) { + self.0.store(v.to_bits(), ordering); + } +} + +pub fn error_string(err: JsValue) -> String { + return try_to_string(&err).unwrap_or_else(|| format!("{err:?}")); + + fn try_to_string(err: &JsValue) -> Option { + err.as_string().or_else(|| { + let Ok(val) = js_sys::JSON::stringify(err) else { + return None; + }; + val.as_string() + }) + } +} + +pub struct DisplaySize(pub f64); + +impl Display for DisplaySize { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + if self.0 < 1_000.0 { + write!(f, "{} B", self.0) + } else if self.0 < 1_000_000.0 { + write!(f, "{:.2} KB", self.0 / 1_000.0) + } else if self.0 < 1_000_000_000.0 { + write!(f, "{:.2} MB", self.0 / 1_000_000.0) + } else { + write!(f, "{:.2} GB", self.0 / 1_000_000_000.0) + } + } +}