From cd9338d9a0cdb1d9c3389d095e5d481477ea484e Mon Sep 17 00:00:00 2001 From: Leon Matthes Date: Thu, 27 Mar 2025 09:05:56 +0100 Subject: [PATCH 01/19] WIP: Add Span-Inspector --- Cargo.toml | 2 +- examples/span-inspector/Cargo.toml | 21 +++++ examples/span-inspector/build.rs | 25 ++++++ examples/span-inspector/qml/main.qml | 36 ++++++++ examples/span-inspector/src/inspector.rs | 105 +++++++++++++++++++++++ examples/span-inspector/src/main.rs | 38 ++++++++ 6 files changed, 226 insertions(+), 1 deletion(-) create mode 100644 examples/span-inspector/Cargo.toml create mode 100644 examples/span-inspector/build.rs create mode 100644 examples/span-inspector/qml/main.qml create mode 100644 examples/span-inspector/src/inspector.rs create mode 100644 examples/span-inspector/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index fcf5f4750..591837168 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ members = [ "tests/basic_cxx_only/rust", "tests/basic_cxx_qt/rust", - "tests/qt_types_standalone/rust", + "tests/qt_types_standalone/rust", "examples/span-inspector", ] resolver = "2" diff --git a/examples/span-inspector/Cargo.toml b/examples/span-inspector/Cargo.toml new file mode 100644 index 000000000..2d959a95b --- /dev/null +++ b/examples/span-inspector/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "span-inspector" +edition.workspace = true +license.workspace = true +repository.workspace = true +version.workspace = true +rust-version.workspace = true + +[dependencies] +cxx.workspace = true +cxx-qt.workspace = true +cxx-qt-lib = { workspace = true, features = ["full"] } +proc-macro2.workspace = true +prettyplease = "0.2" +syn.workspace=true + +[build-dependencies] +cxx-qt-build = { workspace = true, features = [ "link_qt_object_files" ] } + +[lints] +workspace = true diff --git a/examples/span-inspector/build.rs b/examples/span-inspector/build.rs new file mode 100644 index 000000000..ad615bf5d --- /dev/null +++ b/examples/span-inspector/build.rs @@ -0,0 +1,25 @@ +// SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company +// SPDX-FileContributor: Leon Matthes +// +// SPDX-License-Identifier: MIT OR Apache-2.0 + +use cxx_qt_build::{CxxQtBuilder, QmlModule}; + +fn main() { + let qml_module: QmlModule<'static, &str, &str> = QmlModule { + uri: "com.kdab.cxx_qt.demo", + rust_files: &["src/inspector.rs"], + qml_files: &["qml/main.qml"], + ..Default::default() + }; + CxxQtBuilder::new() + // Link Qt's Network library + // - Qt Core is always linked + // - Qt Gui is linked by enabling the qt_gui Cargo feature of cxx-qt-lib. + // - Qt Qml is linked by enabling the qt_qml Cargo feature of cxx-qt-lib. + // - Qt Qml requires linking Qt Network on macOS + .qt_module("Network") + .qt_module("Quick") + .qml_module(qml_module) + .build(); +} diff --git a/examples/span-inspector/qml/main.qml b/examples/span-inspector/qml/main.qml new file mode 100644 index 000000000..0a665adfc --- /dev/null +++ b/examples/span-inspector/qml/main.qml @@ -0,0 +1,36 @@ +// SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company +// SPDX-FileContributor: Leon Matthes +// +// SPDX-License-Identifier: MIT OR Apache-2.0 + +import QtQuick +import QtQuick.Controls +import QtQuick.Window +import QtQuick.Layouts + +import com.kdab.cxx_qt.demo 1.0 + +ApplicationWindow { + height: 480 + title: qsTr("Hello World") + visible: true + width: 640 + color: palette.window + + SpanInspector { + id: inspector + } + + SplitView { + anchors.fill: parent + TextEdit { + SplitView.preferredWidth: parent.width / 2 + Component.onCompleted: inspector.input = textDocument + } + TextEdit { + SplitView.preferredWidth: parent.width / 2 + text: "Hello World" + Component.onCompleted: inspector.output = textDocument + } + } +} diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs new file mode 100644 index 000000000..55ec25898 --- /dev/null +++ b/examples/span-inspector/src/inspector.rs @@ -0,0 +1,105 @@ +// SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company +// SPDX-FileContributor: Leon Matthes +// +// SPDX-License-Identifier: MIT OR Apache-2.0 + +#[cxx_qt::bridge] +mod qobject { + unsafe extern "C++" { + include!("cxx-qt-lib/qstring.h"); + type QString = cxx_qt_lib::QString; + } + unsafe extern "C++Qt" { + include!(); + #[qobject] + type QTextDocument; + + #[cxx_name = "toPlainText"] + fn to_plain_text(self: &QTextDocument) -> QString; + + #[cxx_name = "setPlainText"] + fn set_plain_text(self: Pin<&mut QTextDocument>, content: &QString); + + #[qsignal] + #[cxx_name = "contentsChanged"] + fn contents_changed(self: Pin<&mut QTextDocument>); + } + + unsafe extern "C++Qt" { + include!(); + #[qobject] + type QQuickTextDocument; + + #[cxx_name = "textDocument"] + fn text_document(self: &QQuickTextDocument) -> *mut QTextDocument; + } + + extern "RustQt" { + #[qobject] + #[qml_element] + #[qproperty(*mut QQuickTextDocument, input, READ, NOTIFY, WRITE=set_input)] + #[qproperty(*mut QQuickTextDocument, output)] + type SpanInspector = super::SpanInspectorRust; + + unsafe fn set_input(self: Pin<&mut SpanInspector>, input: *mut QQuickTextDocument); + } + + impl UniquePtr {} + impl cxx_qt::Threading for SpanInspector {} +} + +use cxx_qt::{CxxQtType, Threading}; +use qobject::{QQuickTextDocument, QString, QTextDocument}; +use std::{pin::Pin, ptr}; + +pub struct SpanInspectorRust { + input: *mut QQuickTextDocument, + output: *mut QQuickTextDocument, +} + +impl Default for SpanInspectorRust { + fn default() -> Self { + Self { + input: ptr::null_mut(), + output: ptr::null_mut(), + } + } +} + +impl qobject::SpanInspector { + unsafe fn output_document(&self) -> Pin<&mut QTextDocument> { + if self.output == ptr::null_mut() { + panic!("Output document must be set!"); + } + let output = unsafe { &*self.output }; + unsafe { Pin::new_unchecked(&mut *output.text_document()) } + } + + fn set_input(mut self: Pin<&mut Self>, input: *mut QQuickTextDocument) { + self.as_mut().rust_mut().input = input; + self.as_mut().input_changed(); + + let input = unsafe { Pin::new_unchecked(&mut *input) }; + let document = unsafe { Pin::new_unchecked(&mut *input.text_document()) }; + let qt_thread = self.qt_thread(); + document + .on_contents_changed(move |document| { + let qt_thread = qt_thread.clone(); + let text = document.to_plain_text().to_string(); + std::thread::spawn(move || { + let Ok(file) = + syn::parse_file(&text).map_err(|err| eprintln!("Parsing error: {err}")) + else { + return; + }; + let output = QString::from(prettyplease::unparse(&file)); + qt_thread + .queue(move |this| { + unsafe { this.output_document() }.set_plain_text(&output) + }) + .ok(); + }); + }) + .release(); + } +} diff --git a/examples/span-inspector/src/main.rs b/examples/span-inspector/src/main.rs new file mode 100644 index 000000000..ca0ff8657 --- /dev/null +++ b/examples/span-inspector/src/main.rs @@ -0,0 +1,38 @@ +// SPDX-FileCopyrightText: 2022 Klarälvdalens Datakonsult AB, a KDAB Group company +// SPDX-FileContributor: Be Wilson +// SPDX-FileContributor: Andrew Hayzen +// SPDX-FileContributor: Gerhard de Clercq +// +// SPDX-License-Identifier: MIT OR Apache-2.0 + +/// A module for our Rust defined QObject +pub mod inspector; + +use cxx_qt::Upcast; +use cxx_qt_lib::{QGuiApplication, QQmlApplicationEngine, QUrl}; + +fn main() { + // Create the application and engine + let mut app = QGuiApplication::new(); + let mut engine = QQmlApplicationEngine::new(); + + // Load the QML path into the engine + if let Some(engine) = engine.as_mut() { + engine.load(&QUrl::from("qrc:/qt/qml/com/kdab/cxx_qt/demo/qml/main.qml")); + } + + if let Some(engine) = engine.as_mut() { + // Listen to a signal from the QML Engine + engine + .upcast_pin() + .on_quit(|_| { + println!("QML Quit!"); + }) + .release(); + } + + // Start the app + if let Some(app) = app.as_mut() { + app.exec(); + } +} From 413c8264ab6b9749227862f3763a718a6dc10283 Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Tue, 15 Apr 2025 12:41:36 +0200 Subject: [PATCH 02/19] added expansion of input-code --- examples/span-inspector/Cargo.toml | 4 ++- examples/span-inspector/src/inspector.rs | 33 ++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/examples/span-inspector/Cargo.toml b/examples/span-inspector/Cargo.toml index 2d959a95b..0c42b49dd 100644 --- a/examples/span-inspector/Cargo.toml +++ b/examples/span-inspector/Cargo.toml @@ -10,8 +10,10 @@ rust-version.workspace = true cxx.workspace = true cxx-qt.workspace = true cxx-qt-lib = { workspace = true, features = ["full"] } +cxx-qt-macro = { workspace = true } +cxx-qt-gen = { workspace = true } proc-macro2.workspace = true -prettyplease = "0.2" +prettyplease = { version = "0.2", features = ["verbatim"] } syn.workspace=true [build-dependencies] diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index 55ec25898..a18b22136 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -3,6 +3,11 @@ // // SPDX-License-Identifier: MIT OR Apache-2.0 +use cxx_qt_gen::{write_rust, Parser}; +use proc_macro2::TokenStream; +use std::str::FromStr; +use syn::{parse2, ItemMod}; + #[cxx_qt::bridge] mod qobject { unsafe extern "C++" { @@ -87,8 +92,8 @@ impl qobject::SpanInspector { let qt_thread = qt_thread.clone(); let text = document.to_plain_text().to_string(); std::thread::spawn(move || { - let Ok(file) = - syn::parse_file(&text).map_err(|err| eprintln!("Parsing error: {err}")) + let Ok(file) = syn::parse_file(Self::expand(&text).as_str()) + .map_err(|err| eprintln!("Parsing error: {err}")) else { return; }; @@ -102,4 +107,28 @@ impl qobject::SpanInspector { }) .release(); } + + // Expand this code as #[cxxqt_qt::bridge] would do + fn expand(input: &str) -> String { + println!("{}", &input); + let stream: TokenStream = TokenStream::from_str(input).unwrap(); + + let mut module: ItemMod = parse2(stream).expect("could not generate ItemMod"); + + let args = TokenStream::default(); + let args_input = format!("#[cxx_qt::bridge({args})] mod dummy;"); + let attrs = syn::parse_str::(&args_input).unwrap().attrs; + module.attrs = attrs.into_iter().chain(module.attrs).collect(); + + format!("{}", Self::extract_and_generate(module)) + } + + // Take the module and C++ namespace and generate the rust code + fn extract_and_generate(module: ItemMod) -> TokenStream { + Parser::from(module) + .and_then(|parser| cxx_qt_gen::GeneratedRustBlocks::from(&parser)) + .map(|generated_rust| write_rust(&generated_rust, None)) + .unwrap_or_else(|err| err.to_compile_error()) + .into() + } } From 00455e412f9d71b5f1768041d7456d46fdda9105 Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Thu, 24 Apr 2025 16:09:50 +0200 Subject: [PATCH 03/19] added span highlighting --- examples/span-inspector/src/inspector.rs | 83 ++++++++++++++++++++---- 1 file changed, 71 insertions(+), 12 deletions(-) diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index a18b22136..e16508052 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -4,8 +4,8 @@ // SPDX-License-Identifier: MIT OR Apache-2.0 use cxx_qt_gen::{write_rust, Parser}; -use proc_macro2::TokenStream; -use std::str::FromStr; +use proc_macro2::{Span, TokenStream, TokenTree}; +use std::{str::FromStr, usize}; use syn::{parse2, ItemMod}; #[cxx_qt::bridge] @@ -25,6 +25,9 @@ mod qobject { #[cxx_name = "setPlainText"] fn set_plain_text(self: Pin<&mut QTextDocument>, content: &QString); + #[cxx_name = "setHtml"] + fn set_html(self: Pin<&mut QTextDocument>, content: &QString); + #[qsignal] #[cxx_name = "contentsChanged"] fn contents_changed(self: Pin<&mut QTextDocument>); @@ -92,15 +95,16 @@ impl qobject::SpanInspector { let qt_thread = qt_thread.clone(); let text = document.to_plain_text().to_string(); std::thread::spawn(move || { - let Ok(file) = syn::parse_file(Self::expand(&text).as_str()) + let (expanded, span_data) = Self::expand(&text); + let Ok(file) = syn::parse_file(expanded.as_str()) .map_err(|err| eprintln!("Parsing error: {err}")) else { return; }; - let output = QString::from(prettyplease::unparse(&file)); + let output = QString::from(Self::build_html(prettyplease::unparse(&file), span_data)); qt_thread .queue(move |this| { - unsafe { this.output_document() }.set_plain_text(&output) + unsafe { this.output_document() }.set_html(&QString::from(output)) }) .ok(); }); @@ -108,19 +112,23 @@ impl qobject::SpanInspector { .release(); } - // Expand this code as #[cxxqt_qt::bridge] would do - fn expand(input: &str) -> String { - println!("{}", &input); - let stream: TokenStream = TokenStream::from_str(input).unwrap(); - - let mut module: ItemMod = parse2(stream).expect("could not generate ItemMod"); + // Expand input code as #[cxxqt_qt::bridge] would do + fn expand(input: &str) -> (String, Vec){ + let target: usize = 1; + let input_stream: TokenStream = TokenStream::from_str(input).unwrap(); + + let mut module: ItemMod = parse2(input_stream.clone()).expect("could not generate ItemMod"); let args = TokenStream::default(); let args_input = format!("#[cxx_qt::bridge({args})] mod dummy;"); let attrs = syn::parse_str::(&args_input).unwrap().attrs; module.attrs = attrs.into_iter().chain(module.attrs).collect(); - format!("{}", Self::extract_and_generate(module)) + let output_stream = Self::extract_and_generate(module); + let target_span : Span = input_stream.into_iter().nth(target).map(|token| token.span()).unwrap(); + let span_data = Self::get_span_data(output_stream.clone(), target_span); + + (format!("{}", output_stream), span_data) } // Take the module and C++ namespace and generate the rust code @@ -131,4 +139,55 @@ impl qobject::SpanInspector { .unwrap_or_else(|err| err.to_compile_error()) .into() } + + fn build_html(input: String, span_data: Vec) -> String{ + + fn highlight(token_stream: TokenStream, mut text: String, span_data: &Vec, mut token_position: usize) -> (String, usize) { + let token_vec: Vec = token_stream.into_iter().collect(); + for token in token_vec.into_iter().rev() { + match &token { + TokenTree::Group(group) => { + (text, token_position) = highlight(group.stream(), text, span_data, token_position); + }, + _ => { + token_position = token_position - 1; + if *span_data.get(token_position).unwrap() { + text.replace_range(token.span().byte_range(), format!("{}", token).as_str()); + } + }, + } + } + return (text, token_position); + } + + let token_stream: TokenStream = TokenStream::from_str(input.as_str()).unwrap(); + let (highlighted_string, _) = highlight(token_stream, input, &span_data, span_data.len()); + let style: String = String::from(" + + "); + format!("{}
{}
", style, highlighted_string) + } + + + fn get_span_data(token_stream: TokenStream, target_span: Span) -> Vec { + let mut vec: Vec = vec![]; + for token in token_stream { + match token { + TokenTree::Group(group) => { + vec.extend(Self::get_span_data(group.stream(), target_span)); + } + _ => { + vec.push(target_span.byte_range().eq(token.span().byte_range())); + } + } + } + println!("{:?}", vec); + vec + } } From f412e4cc7536b9f089ce6642fa72339bfa689b8f Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Thu, 15 May 2025 17:13:34 +0200 Subject: [PATCH 04/19] Add highlighting at cursor position This highlights all output tokens that share the same span as the text cursor is hovering over. --- examples/span-inspector/qml/main.qml | 9 +++++- examples/span-inspector/src/inspector.rs | 37 ++++++++++++++++++++---- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/examples/span-inspector/qml/main.qml b/examples/span-inspector/qml/main.qml index 0a665adfc..fdd9723d7 100644 --- a/examples/span-inspector/qml/main.qml +++ b/examples/span-inspector/qml/main.qml @@ -25,7 +25,14 @@ ApplicationWindow { anchors.fill: parent TextEdit { SplitView.preferredWidth: parent.width / 2 - Component.onCompleted: inspector.input = textDocument + Component.onCompleted: { + inspector.input = textDocument + inspector.updateCursorPosition(cursorPosition) + } + + onCursorPositionChanged: { + inspector.updateCursorPosition(cursorPosition) + } } TextEdit { SplitView.preferredWidth: parent.width / 2 diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index e16508052..a9998eef5 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -5,7 +5,7 @@ use cxx_qt_gen::{write_rust, Parser}; use proc_macro2::{Span, TokenStream, TokenTree}; -use std::{str::FromStr, usize}; +use std::{str::FromStr, sync::{Arc, Mutex}, usize}; use syn::{parse2, ItemMod}; #[cxx_qt::bridge] @@ -50,6 +50,10 @@ mod qobject { type SpanInspector = super::SpanInspectorRust; unsafe fn set_input(self: Pin<&mut SpanInspector>, input: *mut QQuickTextDocument); + + #[qinvokable] + #[cxx_name = "updateCursorPosition"] + fn update_cursor_position(self: Pin<&mut SpanInspector>, pos: i32); } impl UniquePtr {} @@ -61,6 +65,7 @@ use qobject::{QQuickTextDocument, QString, QTextDocument}; use std::{pin::Pin, ptr}; pub struct SpanInspectorRust { + cursor_position: Arc>, input: *mut QQuickTextDocument, output: *mut QQuickTextDocument, } @@ -68,6 +73,7 @@ pub struct SpanInspectorRust { impl Default for SpanInspectorRust { fn default() -> Self { Self { + cursor_position: Arc::new(Mutex::new(3)), input: ptr::null_mut(), output: ptr::null_mut(), } @@ -90,18 +96,26 @@ impl qobject::SpanInspector { let input = unsafe { Pin::new_unchecked(&mut *input) }; let document = unsafe { Pin::new_unchecked(&mut *input.text_document()) }; let qt_thread = self.qt_thread(); + let cursor_position = self.cursor_position.clone(); document .on_contents_changed(move |document| { let qt_thread = qt_thread.clone(); let text = document.to_plain_text().to_string(); + println!("{}", text); + let cursor_position = cursor_position.clone(); std::thread::spawn(move || { - let (expanded, span_data) = Self::expand(&text); + let cursor_position = match cursor_position.lock() { + Ok(mutex) => mutex, + Err(poison_error) => poison_error.into_inner() + }; + let (expanded, span_data) = Self::expand(&text, *cursor_position as usize); let Ok(file) = syn::parse_file(expanded.as_str()) .map_err(|err| eprintln!("Parsing error: {err}")) else { return; }; let output = QString::from(Self::build_html(prettyplease::unparse(&file), span_data)); + println!("thomas: {}", *cursor_position); qt_thread .queue(move |this| { unsafe { this.output_document() }.set_html(&QString::from(output)) @@ -112,9 +126,16 @@ impl qobject::SpanInspector { .release(); } + fn update_cursor_position(self: Pin<&mut Self>, pos: i32){ + let mut cursor_position = match self.cursor_position.lock() { + Ok(mutex) => mutex, + Err(poison_error) => poison_error.into_inner() + }; + *cursor_position = pos; + } + // Expand input code as #[cxxqt_qt::bridge] would do - fn expand(input: &str) -> (String, Vec){ - let target: usize = 1; + fn expand(input: &str, cursor_position: usize) -> (String, Vec){ let input_stream: TokenStream = TokenStream::from_str(input).unwrap(); let mut module: ItemMod = parse2(input_stream.clone()).expect("could not generate ItemMod"); @@ -125,7 +146,10 @@ impl qobject::SpanInspector { module.attrs = attrs.into_iter().chain(module.attrs).collect(); let output_stream = Self::extract_and_generate(module); - let target_span : Span = input_stream.into_iter().nth(target).map(|token| token.span()).unwrap(); + let target_span= input_stream.into_iter().find( |token| { + let range = token.span().byte_range(); + range.start <= cursor_position && range.end >= cursor_position + }).map(|token| token.span()).unwrap(); let span_data = Self::get_span_data(output_stream.clone(), target_span); (format!("{}", output_stream), span_data) @@ -141,7 +165,6 @@ impl qobject::SpanInspector { } fn build_html(input: String, span_data: Vec) -> String{ - fn highlight(token_stream: TokenStream, mut text: String, span_data: &Vec, mut token_position: usize) -> (String, usize) { let token_vec: Vec = token_stream.into_iter().collect(); for token in token_vec.into_iter().rev() { @@ -151,6 +174,7 @@ impl qobject::SpanInspector { }, _ => { token_position = token_position - 1; + println!("debug: token: {} , token_position: {} , is_highlighted: {}", token, token_position, *span_data.get(token_position).unwrap()); if *span_data.get(token_position).unwrap() { text.replace_range(token.span().byte_range(), format!("{}", token).as_str()); } @@ -183,6 +207,7 @@ impl qobject::SpanInspector { vec.extend(Self::get_span_data(group.stream(), target_span)); } _ => { + println!("vergleich: {} ,input: {:?} , output: {:?} , token: {} ", target_span.byte_range().eq(token.span().byte_range()), target_span.byte_range(), token.span().byte_range(), token); vec.push(target_span.byte_range().eq(token.span().byte_range())); } } From 386c5fb9e4a596e68622c85adcbd28db1c728adb Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Tue, 20 May 2025 14:45:45 +0200 Subject: [PATCH 05/19] Improved errorhandling: show expansion errors in textfield Expansion erros are now shown directly in the output textfield. --- examples/span-inspector/qml/main.qml | 4 +- examples/span-inspector/src/inspector.rs | 48 ++++++++++++++++-------- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/examples/span-inspector/qml/main.qml b/examples/span-inspector/qml/main.qml index fdd9723d7..bd80340f2 100644 --- a/examples/span-inspector/qml/main.qml +++ b/examples/span-inspector/qml/main.qml @@ -12,7 +12,7 @@ import com.kdab.cxx_qt.demo 1.0 ApplicationWindow { height: 480 - title: qsTr("Hello World") + title: qsTr("Span Inspector") visible: true width: 640 color: palette.window @@ -37,6 +37,8 @@ ApplicationWindow { TextEdit { SplitView.preferredWidth: parent.width / 2 text: "Hello World" + readOnly: true; + wrapMode: TextEdit.wrap; Component.onCompleted: inspector.output = textDocument } } diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index a9998eef5..7e98ca3a9 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -6,7 +6,7 @@ use cxx_qt_gen::{write_rust, Parser}; use proc_macro2::{Span, TokenStream, TokenTree}; use std::{str::FromStr, sync::{Arc, Mutex}, usize}; -use syn::{parse2, ItemMod}; +use syn::{parse2, token::Mut, ItemMod}; #[cxx_qt::bridge] mod qobject { @@ -68,6 +68,7 @@ pub struct SpanInspectorRust { cursor_position: Arc>, input: *mut QQuickTextDocument, output: *mut QQuickTextDocument, + rust_output: Arc>, } impl Default for SpanInspectorRust { @@ -76,6 +77,7 @@ impl Default for SpanInspectorRust { cursor_position: Arc::new(Mutex::new(3)), input: ptr::null_mut(), output: ptr::null_mut(), + rust_output: Arc::new(Mutex::new(String::new())), } } } @@ -101,21 +103,25 @@ impl qobject::SpanInspector { .on_contents_changed(move |document| { let qt_thread = qt_thread.clone(); let text = document.to_plain_text().to_string(); - println!("{}", text); let cursor_position = cursor_position.clone(); std::thread::spawn(move || { let cursor_position = match cursor_position.lock() { Ok(mutex) => mutex, Err(poison_error) => poison_error.into_inner() }; - let (expanded, span_data) = Self::expand(&text, *cursor_position as usize); - let Ok(file) = syn::parse_file(expanded.as_str()) - .map_err(|err| eprintln!("Parsing error: {err}")) - else { - return; + let output = match Self::expand(&text, *cursor_position as usize){ + Ok((expanded, span_data)) => { + let Ok(file) = syn::parse_file(expanded.as_str()) + .map_err(|err| eprintln!("Parsing error: {err}")) + else { + return; + }; + Self::build_html(prettyplease::unparse(&file), span_data) + }, + Err(error) => { + Self::build_error_html(error) + } }; - let output = QString::from(Self::build_html(prettyplease::unparse(&file), span_data)); - println!("thomas: {}", *cursor_position); qt_thread .queue(move |this| { unsafe { this.output_document() }.set_html(&QString::from(output)) @@ -135,14 +141,14 @@ impl qobject::SpanInspector { } // Expand input code as #[cxxqt_qt::bridge] would do - fn expand(input: &str, cursor_position: usize) -> (String, Vec){ - let input_stream: TokenStream = TokenStream::from_str(input).unwrap(); + fn expand(input: &str, cursor_position: usize) -> Result<(String, Vec), String> { + let input_stream: TokenStream = TokenStream::from_str(input).map_err(|e|e.to_string())?; - let mut module: ItemMod = parse2(input_stream.clone()).expect("could not generate ItemMod"); + let mut module: ItemMod = parse2(input_stream.clone()).map_err(|e| e.to_string())?; let args = TokenStream::default(); let args_input = format!("#[cxx_qt::bridge({args})] mod dummy;"); - let attrs = syn::parse_str::(&args_input).unwrap().attrs; + let attrs = syn::parse_str::(&args_input).map_err(|e| e.to_string())?.attrs; module.attrs = attrs.into_iter().chain(module.attrs).collect(); let output_stream = Self::extract_and_generate(module); @@ -152,7 +158,7 @@ impl qobject::SpanInspector { }).map(|token| token.span()).unwrap(); let span_data = Self::get_span_data(output_stream.clone(), target_span); - (format!("{}", output_stream), span_data) + Ok((format!("{}", output_stream), span_data)) } // Take the module and C++ namespace and generate the rust code @@ -164,6 +170,18 @@ impl qobject::SpanInspector { .into() } + fn build_error_html(input: String) -> String{ + let style = String::from(" + + "); + format!("{}

{}

", style, input) + } + fn build_html(input: String, span_data: Vec) -> String{ fn highlight(token_stream: TokenStream, mut text: String, span_data: &Vec, mut token_position: usize) -> (String, usize) { let token_vec: Vec = token_stream.into_iter().collect(); @@ -186,7 +204,7 @@ impl qobject::SpanInspector { let token_stream: TokenStream = TokenStream::from_str(input.as_str()).unwrap(); let (highlighted_string, _) = highlight(token_stream, input, &span_data, span_data.len()); - let style: String = String::from(" + let style = String::from(" "); - format!("{}
{}
", style, highlighted_string) + + match span_data{ + Some(span_data) => { + let token_stream: TokenStream = TokenStream::from_str(input.as_str()).unwrap(); + let (highlighted_string, _) = highlight(token_stream, input, &span_data, span_data.len()); + println!("{}", highlighted_string); + format!("{}
{}
", style, highlighted_string) + }, + None => format!("{}
{}
", style, input) + } } @@ -225,8 +263,10 @@ impl qobject::SpanInspector { vec.extend(Self::get_span_data(group.stream(), target_span)); } _ => { - println!("vergleich: {} ,input: {:?} , output: {:?} , token: {} ", target_span.byte_range().eq(token.span().byte_range()), target_span.byte_range(), token.span().byte_range(), token); - vec.push(target_span.byte_range().eq(token.span().byte_range())); + println!("vergleich: {} ,target_span: {:?} , output_span: {:?} , token: {} ", target_span.byte_range().eq(token.span().byte_range()), target_span.byte_range(), token.span().byte_range(), token); + if !token.to_string().eq(",") { + vec.push(target_span.byte_range().eq(token.span().byte_range())); + } } } } From 89e81259d6f58375f0e9997fad0a9bbfa85459c2 Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Thu, 5 Jun 2025 16:15:14 +0200 Subject: [PATCH 07/19] Sanitize expanded code in build_html - Prevents issues with special characters like '<' and '>' breaking the output HTML --- examples/span-inspector/src/inspector.rs | 89 +++++++++++------------- 1 file changed, 42 insertions(+), 47 deletions(-) diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index a933d3fd1..4320de51c 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -146,26 +146,11 @@ impl qobject::SpanInspector { module.attrs = attrs.into_iter().chain(module.attrs).collect(); let output_stream = Self::extract_and_generate(module); - /*let target_span= input_stream.into_iter().find( |token| { - let range = token.span().byte_range(); - range.start <= cursor_position && range.end >= cursor_position - }).map(|token| token.span()).unwrap(); - - let target_token= input_stream.into_iter().find( |token| { - let range = token.span().byte_range(); - range.start <= cursor_position && range.end >= cursor_position - }).map(|token| token).unwrap(); - println!("target_span: {:?}", target_token);*/ let target_span: Option = Self::flatten_tokenstream(input_stream).into_iter().find( |token| { let range = token.span().byte_range(); range.start <= cursor_position && range.end >= cursor_position - }).map(|token| Some(token.span())).unwrap_or_else(||{None}); - - /*let span_data = match target_span{ - Some(target_span) => Some(Self::get_span_data(output_stream.clone(), target_span)), - None => None - };*/ + }).map(|token| token.span()); let span_data = target_span.map(|span| Self::get_span_data(output_stream.clone(), span)); @@ -209,30 +194,33 @@ impl qobject::SpanInspector { output } - fn build_html(input: String, span_data: Option>) -> String{ - fn highlight(token_stream: TokenStream, mut text: String, span_data: &Vec, mut token_position: usize) -> (String, usize) { - let token_vec: Vec = token_stream.into_iter().collect(); - for token in token_vec.into_iter().rev() { - match &token { - TokenTree::Group(group) => { - (text, token_position) = highlight(group.stream(), text, span_data, token_position); - }, - _ => { - if !token.to_string().eq(",") { - token_position = token_position - 1; - } - println!("debug: token: {} , token_position: {} , is_highlighted: {}", token, token_position, *span_data.get(token_position).unwrap()); - if *span_data.get(token_position).unwrap() { - text.replace_range(token.span().byte_range(), format!("{}", token).as_str()); - } - }, + fn build_html(input: String, span_data: Option>) -> String{ + let flat_tokenstream = Self::flatten_tokenstream(TokenStream::from_str(input.as_str()).unwrap()); + let mut highlighted_string = input.clone(); + + match span_data { + Some(span_data) => { + let mut token_position = span_data.len(); + for token in flat_tokenstream.into_iter().rev() { + // prettyplease may insert extra "," tokens. + // This `if` statement simply ignores them. + if !token.to_string().eq(",") { + token_position = token_position - 1; + } + if *span_data.get(token_position).unwrap() { + highlighted_string.replace_range(token.span().byte_range(), format!("{}", Self::sanitize(&token.to_string())).as_str()); + } else { + highlighted_string.replace_range(token.span().byte_range(), Self::sanitize(&token.to_string()).as_str()); + } + } + }, + None => { + for token in flat_tokenstream.into_iter().rev() { + highlighted_string.replace_range(token.span().byte_range(), Self::sanitize(&token.to_string()).as_str()); } } - (text, token_position) - } - - println!("pretty please: {}", input); - + } + let style = String::from(" "); - match span_data{ - Some(span_data) => { - let token_stream: TokenStream = TokenStream::from_str(input.as_str()).unwrap(); - let (highlighted_string, _) = highlight(token_stream, input, &span_data, span_data.len()); - println!("{}", highlighted_string); - format!("{}
{}
", style, highlighted_string) - }, - None => format!("{}
{}
", style, input) - } + println!("{}", highlighted_string); + format!("{}
{}
", style, highlighted_string) + } + + fn sanitize(input: &String) -> String { + input.chars().map(|char| + match char { + '>' => ">".to_string(), + '<' => "<".to_string(), + '&' => "&".to_string(), + '"' => """.to_string(), + _ => char.to_string(), + } + ).collect() } @@ -264,6 +257,8 @@ impl qobject::SpanInspector { } _ => { println!("vergleich: {} ,target_span: {:?} , output_span: {:?} , token: {} ", target_span.byte_range().eq(token.span().byte_range()), target_span.byte_range(), token.span().byte_range(), token); + // prettyplease may insert extra "," tokens. + // This `if` statement simply ignores them. if !token.to_string().eq(",") { vec.push(target_span.byte_range().eq(token.span().byte_range())); } From 1e54b35d340e02ef9ba6077f4abd5387edca63f3 Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Thu, 5 Jun 2025 16:53:05 +0200 Subject: [PATCH 08/19] refactor: replaced get_span_data() with map --- examples/span-inspector/src/inspector.rs | 32 +++++++----------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index 4320de51c..3d40f16b5 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -152,7 +152,15 @@ impl qobject::SpanInspector { range.start <= cursor_position && range.end >= cursor_position }).map(|token| token.span()); - let span_data = target_span.map(|span| Self::get_span_data(output_stream.clone(), span)); + let span_data: Option> = target_span.map(|target_span| + Self::flatten_tokenstream(output_stream.clone()) + .into_iter() + // prettyplease may insert extra "," tokens. + // This filter simply ignores them. + .filter(|token| token.to_string() != ",") + .map(|token| target_span.byte_range().eq(token.span().byte_range())) + .collect() + ); println!("expanded; {}", output_stream); Ok((format!("{}", output_stream), span_data)) @@ -246,26 +254,4 @@ impl qobject::SpanInspector { } ).collect() } - - - fn get_span_data(token_stream: TokenStream, target_span: Span) -> Vec { - let mut vec: Vec = vec![]; - for token in token_stream { - match token { - TokenTree::Group(group) => { - vec.extend(Self::get_span_data(group.stream(), target_span)); - } - _ => { - println!("vergleich: {} ,target_span: {:?} , output_span: {:?} , token: {} ", target_span.byte_range().eq(token.span().byte_range()), target_span.byte_range(), token.span().byte_range(), token); - // prettyplease may insert extra "," tokens. - // This `if` statement simply ignores them. - if !token.to_string().eq(",") { - vec.push(target_span.byte_range().eq(token.span().byte_range())); - } - } - } - } - println!("{:?}", vec); - vec - } } From 4b4a197b3cc6854655ffce68fa8fd7275923870e Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Tue, 10 Jun 2025 11:14:00 +0200 Subject: [PATCH 09/19] add loading indicator to span inspector --- examples/span-inspector/qml/main.qml | 4 ++-- examples/span-inspector/src/inspector.rs | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/examples/span-inspector/qml/main.qml b/examples/span-inspector/qml/main.qml index bd80340f2..0feb55b12 100644 --- a/examples/span-inspector/qml/main.qml +++ b/examples/span-inspector/qml/main.qml @@ -27,11 +27,11 @@ ApplicationWindow { SplitView.preferredWidth: parent.width / 2 Component.onCompleted: { inspector.input = textDocument - inspector.updateCursorPosition(cursorPosition) + inspector.rebuildOutput(cursorPosition) } onCursorPositionChanged: { - inspector.updateCursorPosition(cursorPosition) + inspector.rebuildOutput(cursorPosition) } } TextEdit { diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index 3d40f16b5..a004ef0c1 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -53,8 +53,8 @@ mod qobject { unsafe fn set_input(self: Pin<&mut SpanInspector>, input: *mut QQuickTextDocument); #[qinvokable] - #[cxx_name = "updateCursorPosition"] - fn update_cursor_position(self: Pin<&mut SpanInspector>, pos: i32); + #[cxx_name = "rebuildOutput"] + fn rebuild_output(self: Pin<&mut SpanInspector>, pos: i32); } impl UniquePtr {} @@ -95,7 +95,7 @@ impl qobject::SpanInspector { self.as_mut().input_changed(); } - fn update_cursor_position(self: Pin<&mut Self>, pos: i32){ + fn rebuild_output(self: Pin<&mut Self>, pos: i32){ let mut cursor_position = match self.cursor_position.lock() { Ok(mutex) => mutex, Err(poison_error) => poison_error.into_inner() @@ -105,6 +105,11 @@ impl qobject::SpanInspector { let input = unsafe { Pin::new_unchecked(&mut *self.input) }; let cursor_position = self.cursor_position.clone(); let qt_thread = self.qt_thread(); + qt_thread.queue(|this|{ + unsafe { this.output_document() }.set_html(&QString::from(String::from("expanding..."))) + }) + .ok(); + let text = unsafe { Pin::new_unchecked(&mut *input.text_document()) }.to_plain_text().to_string(); std::thread::spawn(move || { @@ -162,7 +167,6 @@ impl qobject::SpanInspector { .collect() ); - println!("expanded; {}", output_stream); Ok((format!("{}", output_stream), span_data)) } @@ -239,7 +243,6 @@ impl qobject::SpanInspector { "); - println!("{}", highlighted_string); format!("{}
{}
", style, highlighted_string) } From fd1c551d3b20b68f1523293dc8b07c2dcab1d98e Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Thu, 12 Jun 2025 13:26:43 +0200 Subject: [PATCH 10/19] Add "{" and "}" to parsing filter These tokens are now ignored during parsing because prettyplease inserts them automatically in certain situations. --- examples/span-inspector/src/inspector.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index a004ef0c1..f5ce975e7 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -160,9 +160,12 @@ impl qobject::SpanInspector { let span_data: Option> = target_span.map(|target_span| Self::flatten_tokenstream(output_stream.clone()) .into_iter() - // prettyplease may insert extra "," tokens. + // prettyplease may insert extra tokens. // This filter simply ignores them. - .filter(|token| token.to_string() != ",") + .filter(|token| { + let string = token.to_string(); + !matches!(string.as_str(), "," | "}" | "{") + }) .map(|token| target_span.byte_range().eq(token.span().byte_range())) .collect() ); @@ -214,9 +217,10 @@ impl qobject::SpanInspector { Some(span_data) => { let mut token_position = span_data.len(); for token in flat_tokenstream.into_iter().rev() { - // prettyplease may insert extra "," tokens. + // prettyplease may insert extra tokens. // This `if` statement simply ignores them. - if !token.to_string().eq(",") { + let token_string = token.to_string(); + if !matches!(token_string.as_str(), "," | "{" | "}") { token_position = token_position - 1; } if *span_data.get(token_position).unwrap() { From 8b86bb5de8665ba7588d82b6968b069525c7ccbb Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Thu, 19 Jun 2025 13:54:51 +0200 Subject: [PATCH 11/19] span-inspector: make output scrollable, improve theme support, fix refresh bug - Make output text area scrollable - Adjust text color to match the theme - Fix edge case where text change did not trigger refresh if cursor position stayed the same --- examples/span-inspector/qml/main.qml | 44 ++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/examples/span-inspector/qml/main.qml b/examples/span-inspector/qml/main.qml index 0feb55b12..201f711b4 100644 --- a/examples/span-inspector/qml/main.qml +++ b/examples/span-inspector/qml/main.qml @@ -11,11 +11,13 @@ import QtQuick.Layouts import com.kdab.cxx_qt.demo 1.0 ApplicationWindow { + id: appWindow + color: palette.window + property color textColor: color.lightness < 128 * "black" , "white" height: 480 title: qsTr("Span Inspector") visible: true width: 640 - color: palette.window SpanInspector { id: inspector @@ -23,23 +25,39 @@ ApplicationWindow { SplitView { anchors.fill: parent - TextEdit { + Item { SplitView.preferredWidth: parent.width / 2 - Component.onCompleted: { - inspector.input = textDocument - inspector.rebuildOutput(cursorPosition) - } + TextArea { + SplitView.preferredWidth: parent.width / 2 + wrapMode: TextArea.Wrap + id: inputEdit + anchors.fill: parent + clip: true + color: appWindow.textColor + Component.onCompleted: { + inspector.input = textDocument + inspector.rebuildOutput(cursorPosition) + } - onCursorPositionChanged: { - inspector.rebuildOutput(cursorPosition) + onCursorPositionChanged: { + inspector.rebuildOutput(cursorPosition) + } + + onTextChanged: { + inspector.rebuildOutput(cursorPosition) + } } } - TextEdit { + + ScrollView { SplitView.preferredWidth: parent.width / 2 - text: "Hello World" - readOnly: true; - wrapMode: TextEdit.wrap; - Component.onCompleted: inspector.output = textDocument + TextEdit { + clip: true + color: appWindow.textColor + text: "Hello World" + readOnly: true; + Component.onCompleted: inspector.output = textDocument + } } } } From eb779ba8048f4c5f50a63266663687cf52564f84 Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Tue, 24 Jun 2025 13:29:01 +0200 Subject: [PATCH 12/19] span_inspector: add indication for synthesized tokens --- examples/span-inspector/src/inspector.rs | 77 ++++++++++++------------ 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index f5ce975e7..3c868e67e 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -140,7 +140,7 @@ impl qobject::SpanInspector { } // Expand input code as #[cxxqt_qt::bridge] would do - fn expand(input: &str, cursor_position: usize) -> Result<(String, Option>), String> { + fn expand(input: &str, cursor_position: usize) -> Result<(String, Vec<(bool, bool)>), String> { let input_stream: TokenStream = TokenStream::from_str(input).map_err(|e|e.to_string())?; let mut module: ItemMod = parse2(input_stream.clone()).map_err(|e| e.to_string())?; @@ -157,19 +157,24 @@ impl qobject::SpanInspector { range.start <= cursor_position && range.end >= cursor_position }).map(|token| token.span()); - let span_data: Option> = target_span.map(|target_span| - Self::flatten_tokenstream(output_stream.clone()) - .into_iter() - // prettyplease may insert extra tokens. - // This filter simply ignores them. - .filter(|token| { - let string = token.to_string(); - !matches!(string.as_str(), "," | "}" | "{") - }) - .map(|token| target_span.byte_range().eq(token.span().byte_range())) - .collect() - ); - + let span_data: Vec<(bool, bool)> = Self::flatten_tokenstream(output_stream.clone()) + .into_iter() + // prettyplease may insert extra tokens. + // This filter simply ignores them. + .filter(|token| { + let string = token.to_string(); + !matches!(string.as_str(), "," | "}" | "{") + }) + .map(|token| + ( + target_span + .map(|s| s.byte_range().eq(token.span().byte_range())) + .unwrap_or_else(|| false), + token.span().byte_range().start == 0 + ) + ) + .collect(); + Ok((format!("{}", output_stream), span_data)) } @@ -209,33 +214,26 @@ impl qobject::SpanInspector { output } - fn build_html(input: String, span_data: Option>) -> String{ + fn build_html(input: String, span_data: Vec<(bool, bool)>) -> String{ let flat_tokenstream = Self::flatten_tokenstream(TokenStream::from_str(input.as_str()).unwrap()); let mut highlighted_string = input.clone(); - match span_data { - Some(span_data) => { - let mut token_position = span_data.len(); - for token in flat_tokenstream.into_iter().rev() { - // prettyplease may insert extra tokens. - // This `if` statement simply ignores them. - let token_string = token.to_string(); - if !matches!(token_string.as_str(), "," | "{" | "}") { - token_position = token_position - 1; - } - if *span_data.get(token_position).unwrap() { - highlighted_string.replace_range(token.span().byte_range(), format!("{}", Self::sanitize(&token.to_string())).as_str()); - } else { - highlighted_string.replace_range(token.span().byte_range(), Self::sanitize(&token.to_string()).as_str()); - } - } - }, - None => { - for token in flat_tokenstream.into_iter().rev() { - highlighted_string.replace_range(token.span().byte_range(), Self::sanitize(&token.to_string()).as_str()); - } + let mut token_position = span_data.len(); + for token in flat_tokenstream.into_iter().rev() { + // prettyplease may insert extra tokens. + // This `if` statement simply ignores them. + let token_string = token.to_string(); + if !matches!(token_string.as_str(), "," | "{" | "}") { + token_position = token_position - 1; } - } + if span_data.get(token_position).unwrap().0 { + highlighted_string.replace_range(token.span().byte_range(), format!("{}", Self::sanitize(&token.to_string())).as_str()); + } else if span_data.get(token_position).unwrap().1 { + highlighted_string.replace_range(token.span().byte_range(), format!("{}", Self::sanitize(&token.to_string())).as_str()); + } else { + highlighted_string.replace_range(token.span().byte_range(), Self::sanitize(&token.to_string()).as_str()); + } + } let style = String::from(" "); From 027ec189d8dc500de352c61f9e2c1756dc3e924d Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Tue, 24 Jun 2025 13:50:03 +0200 Subject: [PATCH 13/19] chore: add license headers and fix rustfmt formatting --- examples/span-inspector/Cargo.toml | 6 ++ examples/span-inspector/src/inspector.rs | 131 +++++++++++++++-------- 2 files changed, 92 insertions(+), 45 deletions(-) diff --git a/examples/span-inspector/Cargo.toml b/examples/span-inspector/Cargo.toml index 0c42b49dd..170092544 100644 --- a/examples/span-inspector/Cargo.toml +++ b/examples/span-inspector/Cargo.toml @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2022 Klarälvdalens Datakonsult AB, a KDAB Group company +# SPDX-FileContributor: Leon Matthes +# SPDX-FileContributor: Quentin Weber +# +# SPDX-License-Identifier: MIT OR Apache-2.0 + [package] name = "span-inspector" edition.workspace = true diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index 3c868e67e..9a364fc2b 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -1,11 +1,16 @@ // SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company // SPDX-FileContributor: Leon Matthes +// SPDX-FileContributor: Quentin Weber // // SPDX-License-Identifier: MIT OR Apache-2.0 use cxx_qt_gen::{write_rust, Parser}; use proc_macro2::{Span, TokenStream, TokenTree}; -use std::{str::FromStr, sync::{Arc, Mutex}, usize}; +use std::{ + str::FromStr, + sync::{Arc, Mutex}, + usize, +}; use syn::{parse2, ItemMod}; #[cxx_qt::bridge] @@ -95,30 +100,34 @@ impl qobject::SpanInspector { self.as_mut().input_changed(); } - fn rebuild_output(self: Pin<&mut Self>, pos: i32){ + fn rebuild_output(self: Pin<&mut Self>, pos: i32) { let mut cursor_position = match self.cursor_position.lock() { Ok(mutex) => mutex, - Err(poison_error) => poison_error.into_inner() + Err(poison_error) => poison_error.into_inner(), }; *cursor_position = pos; let input = unsafe { Pin::new_unchecked(&mut *self.input) }; let cursor_position = self.cursor_position.clone(); let qt_thread = self.qt_thread(); - qt_thread.queue(|this|{ - unsafe { this.output_document() }.set_html(&QString::from(String::from("expanding..."))) - }) - .ok(); + qt_thread + .queue(|this| { + unsafe { this.output_document() } + .set_html(&QString::from(String::from("expanding..."))) + }) + .ok(); - let text = unsafe { Pin::new_unchecked(&mut *input.text_document()) }.to_plain_text().to_string(); + let text = unsafe { Pin::new_unchecked(&mut *input.text_document()) } + .to_plain_text() + .to_string(); std::thread::spawn(move || { let cursor_position = match cursor_position.lock() { Ok(mutex) => mutex, - Err(poison_error) => poison_error.into_inner() + Err(poison_error) => poison_error.into_inner(), }; - let output = match Self::expand(&text, *cursor_position as usize){ + let output = match Self::expand(&text, *cursor_position as usize) { Ok((expanded, span_data)) => { let Ok(file) = syn::parse_file(expanded.as_str()) .map_err(|err| eprintln!("Parsing error: {err}")) @@ -126,10 +135,8 @@ impl qobject::SpanInspector { return; }; Self::build_html(prettyplease::unparse(&file), span_data) - }, - Err(error) => { - Self::build_error_html(error) } + Err(error) => Self::build_error_html(error), }; qt_thread .queue(move |this| { @@ -141,21 +148,26 @@ impl qobject::SpanInspector { // Expand input code as #[cxxqt_qt::bridge] would do fn expand(input: &str, cursor_position: usize) -> Result<(String, Vec<(bool, bool)>), String> { - let input_stream: TokenStream = TokenStream::from_str(input).map_err(|e|e.to_string())?; - + let input_stream: TokenStream = TokenStream::from_str(input).map_err(|e| e.to_string())?; + let mut module: ItemMod = parse2(input_stream.clone()).map_err(|e| e.to_string())?; let args = TokenStream::default(); let args_input = format!("#[cxx_qt::bridge({args})] mod dummy;"); - let attrs = syn::parse_str::(&args_input).map_err(|e| e.to_string())?.attrs; + let attrs = syn::parse_str::(&args_input) + .map_err(|e| e.to_string())? + .attrs; module.attrs = attrs.into_iter().chain(module.attrs).collect(); let output_stream = Self::extract_and_generate(module); - - let target_span: Option = Self::flatten_tokenstream(input_stream).into_iter().find( |token| { - let range = token.span().byte_range(); - range.start <= cursor_position && range.end >= cursor_position - }).map(|token| token.span()); + + let target_span: Option = Self::flatten_tokenstream(input_stream) + .into_iter() + .find(|token| { + let range = token.span().byte_range(); + range.start <= cursor_position && range.end >= cursor_position + }) + .map(|token| token.span()); let span_data: Vec<(bool, bool)> = Self::flatten_tokenstream(output_stream.clone()) .into_iter() @@ -164,15 +176,15 @@ impl qobject::SpanInspector { .filter(|token| { let string = token.to_string(); !matches!(string.as_str(), "," | "}" | "{") - }) - .map(|token| + }) + .map(|token| { ( target_span .map(|s| s.byte_range().eq(token.span().byte_range())) .unwrap_or_else(|| false), - token.span().byte_range().start == 0 + token.span().byte_range().start == 0, ) - ) + }) .collect(); Ok((format!("{}", output_stream), span_data)) @@ -187,16 +199,21 @@ impl qobject::SpanInspector { .into() } - fn build_error_html(input: String) -> String{ - let style = String::from(" + fn build_error_html(input: String) -> String { + let style = String::from( + " - "); - format!("{}

{}

", style, input) + ", + ); + format!( + "{}

{}

", + style, input + ) } fn flatten_tokenstream(stream: TokenStream) -> Vec { @@ -214,28 +231,47 @@ impl qobject::SpanInspector { output } - fn build_html(input: String, span_data: Vec<(bool, bool)>) -> String{ - let flat_tokenstream = Self::flatten_tokenstream(TokenStream::from_str(input.as_str()).unwrap()); + fn build_html(input: String, span_data: Vec<(bool, bool)>) -> String { + let flat_tokenstream = + Self::flatten_tokenstream(TokenStream::from_str(input.as_str()).unwrap()); let mut highlighted_string = input.clone(); - + let mut token_position = span_data.len(); for token in flat_tokenstream.into_iter().rev() { // prettyplease may insert extra tokens. // This `if` statement simply ignores them. let token_string = token.to_string(); - if !matches!(token_string.as_str(), "," | "{" | "}") { + if !matches!(token_string.as_str(), "," | "{" | "}") { token_position = token_position - 1; } if span_data.get(token_position).unwrap().0 { - highlighted_string.replace_range(token.span().byte_range(), format!("{}", Self::sanitize(&token.to_string())).as_str()); + highlighted_string.replace_range( + token.span().byte_range(), + format!( + "{}", + Self::sanitize(&token.to_string()) + ) + .as_str(), + ); } else if span_data.get(token_position).unwrap().1 { - highlighted_string.replace_range(token.span().byte_range(), format!("{}", Self::sanitize(&token.to_string())).as_str()); + highlighted_string.replace_range( + token.span().byte_range(), + format!( + "{}", + Self::sanitize(&token.to_string()) + ) + .as_str(), + ); } else { - highlighted_string.replace_range(token.span().byte_range(), Self::sanitize(&token.to_string()).as_str()); - } + highlighted_string.replace_range( + token.span().byte_range(), + Self::sanitize(&token.to_string()).as_str(), + ); + } } - - let style = String::from(" + + let style = String::from( + " - "); + ", + ); - format!("{}
{}
", style, highlighted_string) + format!( + "{}
{}
", + style, highlighted_string + ) } fn sanitize(input: &String) -> String { - input.chars().map(|char| - match char { + input + .chars() + .map(|char| match char { '>' => ">".to_string(), '<' => "<".to_string(), '&' => "&".to_string(), '"' => """.to_string(), _ => char.to_string(), - } - ).collect() + }) + .collect() } } From 3e1cd66ec530889da229ce930e4d17617809055e Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Tue, 24 Jun 2025 14:18:46 +0200 Subject: [PATCH 14/19] fix: update Cargo.lock to fix test failure with --locked - Before tests were failing due to an outdated Cargo.lock --- Cargo.lock | 623 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 401 insertions(+), 222 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cabcb5719..b297ac339 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "async-channel" @@ -48,14 +48,15 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa" dependencies = [ "async-task", "concurrent-queue", "fastrand", "futures-lite", + "pin-project-lite", "slab", ] @@ -76,9 +77,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" +checksum = "1237c0ae75a0f3765f58910ff9cdd0a12eeb39ab2f4c7de23262f337f0aacbb3" dependencies = [ "async-lock", "cfg-if", @@ -90,7 +91,7 @@ dependencies = [ "rustix", "slab", "tracing", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -106,9 +107,9 @@ dependencies = [ [[package]] name = "async-std" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" +checksum = "730294c1c08c2e0f85759590518f6333f0d5a0a766a27d519c1b244c3dfd8a24" dependencies = [ "async-channel 1.9.0", "async-global-executor", @@ -144,9 +145,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "basic_cxx_only" @@ -170,9 +171,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.8.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "blocking" @@ -189,15 +190,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" [[package]] name = "bytemuck" -version = "1.21.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" [[package]] name = "byteorder" @@ -213,15 +214,15 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.14" +version = "1.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9" +checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" dependencies = [ "jobserver", "libc", @@ -230,22 +231,22 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "chrono" -version = "0.4.39" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets", + "windows-link", ] [[package]] @@ -259,18 +260,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.29" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acebd8ad879283633b343856142139f2da2317c96b05b4dd6181c61e2480184" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.29" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ba32cbda51c7e1dfd49acc1457ba1a7dec5b64fe360e828acb13ca8dc9c2f9" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" dependencies = [ "anstyle", "clap_lex", @@ -279,9 +280,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "codespan-reporting" @@ -290,7 +291,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ "termcolor", - "unicode-width", + "unicode-width 0.1.14", +] + +[[package]] +name = "codespan-reporting" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" +dependencies = [ + "serde", + "termcolor", + "unicode-width 0.2.1", ] [[package]] @@ -331,9 +343,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "cxx" -version = "1.0.146" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de88e785b0a1ce3f28af40f289e5f368a23528562db4c6837036d2dff9a5cbf" +checksum = "a71ea7f29c73f7ffa64c50b83c9fe4d3a6d4be89a86b009eb80d5a6d3429d741" dependencies = [ "cc", "cxxbridge-cmd", @@ -345,11 +357,11 @@ dependencies = [ [[package]] name = "cxx-gen" -version = "0.7.140" +version = "0.7.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3474c45958d2260d293bf2e1b5dd10a1a8369007a1146b1322fc4de789445b1c" +checksum = "68318fef0ae96135291398a97ef84763d1be248bef10a9140e1a728b44e24627" dependencies = [ - "codespan-reporting", + "codespan-reporting 0.12.0", "proc-macro2", "quote", "syn", @@ -382,7 +394,7 @@ name = "cxx-qt-build" version = "0.7.1" dependencies = [ "cc", - "codespan-reporting", + "codespan-reporting 0.11.1", "cxx-gen", "cxx-qt-gen", "proc-macro2", @@ -418,7 +430,7 @@ dependencies = [ "cxx-qt-build", "http", "image 0.24.9", - "image 0.25.5", + "image 0.25.6", "qt-build-utils", "rgb", "serde", @@ -478,12 +490,12 @@ dependencies = [ [[package]] name = "cxxbridge-cmd" -version = "1.0.146" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a20529e8e70e5b11bb265ca926758ff22dac41008b94e831d043b8fef66d672" +checksum = "4f44296c8693e9ea226a48f6a122727f77aa9e9e338380cb021accaeeb7ee279" dependencies = [ "clap", - "codespan-reporting", + "codespan-reporting 0.12.0", "proc-macro2", "quote", "syn", @@ -491,15 +503,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.146" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d85a5be275867aefa8fd18790d8f6c03915eb79619672d6b4b7d0fca5ecfa37" +checksum = "c42f69c181c176981ae44ba9876e2ea41ce8e574c296b38d06925ce9214fb8e4" [[package]] name = "cxxbridge-macro" -version = "1.0.146" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d0f54b137299572d42ef838ad7beeff8eea80eced305a30431756c7f6bf20f" +checksum = "8faff5d4467e0709448187df29ccbf3b0982cc426ee444a193f87b11afb565a8" dependencies = [ "proc-macro2", "quote", @@ -509,9 +521,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", ] @@ -535,18 +547,18 @@ dependencies = [ [[package]] name = "either" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.60.2", ] [[package]] @@ -568,9 +580,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ "event-listener 5.4.0", "pin-project-lite", @@ -590,9 +602,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "form_urlencoded" @@ -711,6 +723,18 @@ dependencies = [ "slab", ] +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi", +] + [[package]] name = "gloo-timers" version = "0.3.0" @@ -725,15 +749,15 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.4.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "http" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", @@ -742,14 +766,15 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.61" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -765,21 +790,22 @@ dependencies = [ [[package]] name = "icu_collections" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ "displaydoc", + "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] -name = "icu_locid" -version = "1.5.0" +name = "icu_locale_core" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" dependencies = [ "displaydoc", "litemap", @@ -788,31 +814,11 @@ dependencies = [ "zerovec", ] -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - [[package]] name = "icu_normalizer" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" dependencies = [ "displaydoc", "icu_collections", @@ -820,67 +826,54 @@ dependencies = [ "icu_properties", "icu_provider", "smallvec", - "utf16_iter", - "utf8_iter", - "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" -version = "1.5.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" dependencies = [ "displaydoc", "icu_collections", - "icu_locid_transform", + "icu_locale_core", "icu_properties_data", "icu_provider", - "tinystr", + "potential_utf", + "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "1.5.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" [[package]] name = "icu_provider" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" dependencies = [ "displaydoc", - "icu_locid", - "icu_provider_macros", + "icu_locale_core", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", + "zerotrie", "zerovec", ] -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "idna" version = "1.0.3" @@ -894,9 +887,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -916,9 +909,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.5" +version = "0.25.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" +checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" dependencies = [ "bytemuck", "byteorder-lite", @@ -927,9 +920,9 @@ dependencies = [ [[package]] name = "indoc" -version = "2.0.5" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" +checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" [[package]] name = "itertools" @@ -942,16 +935,17 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ + "getrandom", "libc", ] @@ -976,45 +970,45 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.169" +version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "link-cplusplus" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" +checksum = "4a6f6da007f968f9def0d65a05b187e2960183de70c160204ecfccf0ee330212" dependencies = [ "cc", ] [[package]] name = "linux-raw-sys" -version = "0.4.15" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "log" -version = "0.4.25" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" dependencies = [ "value-bag", ] [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "minimal-lexical" @@ -1049,9 +1043,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.3" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "parking" @@ -1090,9 +1084,9 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.4" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" +checksum = "b53a684391ad002dd6a596ceb6c74fd004fdce75f4be2e3f615068abbea5fd50" dependencies = [ "cfg-if", "concurrent-queue", @@ -1100,7 +1094,16 @@ dependencies = [ "pin-project-lite", "rustix", "tracing", - "windows-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", ] [[package]] @@ -1119,11 +1122,21 @@ dependencies = [ "yansi", ] +[[package]] +name = "prettyplease" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro2" -version = "1.0.93" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -1195,13 +1208,19 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 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 = "rgb" version = "0.8.50" @@ -1213,43 +1232,43 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.44" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "rustversion" -version = "1.0.19" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" [[package]] name = "ryu" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "serde" -version = "1.0.217" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", @@ -1258,9 +1277,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.138" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", @@ -1276,18 +1295,30 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "span-inspector" +version = "0.7.1" +dependencies = [ + "cxx", + "cxx-qt", + "cxx-qt-build", + "cxx-qt-gen", + "cxx-qt-lib", + "cxx-qt-macro", + "prettyplease", + "proc-macro2", + "syn", +] [[package]] name = "stable_deref_trait" @@ -1329,9 +1360,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.98" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -1340,9 +1371,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", @@ -1380,9 +1411,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.37" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "num-conv", @@ -1393,15 +1424,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "tinystr" -version = "0.7.6" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ "displaydoc", "zerovec", @@ -1419,15 +1450,15 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" [[package]] name = "unicode-ident" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-segmentation" @@ -1441,6 +1472,12 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +[[package]] +name = "unicode-width" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" + [[package]] name = "url" version = "2.5.4" @@ -1452,12 +1489,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -1466,18 +1497,20 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.13.1" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" +checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ + "js-sys", "serde", + "wasm-bindgen", ] [[package]] name = "value-bag" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" +checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" [[package]] name = "version_check" @@ -1495,6 +1528,15 @@ dependencies = [ "nom", ] +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -1582,16 +1624,66 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "windows-core" -version = "0.52.0" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +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-result" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-targets", + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", ] [[package]] @@ -1600,7 +1692,16 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "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.2", ] [[package]] @@ -1609,14 +1710,30 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] [[package]] @@ -1625,42 +1742,84 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -1668,16 +1827,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "write16" -version = "1.0.0" +name = "windows_x86_64_msvc" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] [[package]] name = "writeable" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "yansi" @@ -1687,9 +1855,9 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yoke" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ "serde", "stable_deref_trait", @@ -1699,9 +1867,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", @@ -1711,18 +1879,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", @@ -1730,11 +1898,22 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + [[package]] name = "zerovec" -version = "0.10.4" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" dependencies = [ "yoke", "zerofrom", @@ -1743,9 +1922,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", From 382d5b0137f58b656c073c67824c8909b283f619 Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Tue, 24 Jun 2025 14:46:30 +0200 Subject: [PATCH 15/19] fix: update Cargo.lock to fix test failure with --locked - Tests were failing due to an outdated Cargo.lock --- Cargo.lock | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 60bbd2644..9bcf2a285 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,9 +25,9 @@ checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anyhow" -version = "1.0.97" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "async-channel" @@ -549,12 +549,6 @@ dependencies = [ "syn", ] -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - [[package]] name = "errno" version = "0.3.13" @@ -1293,7 +1287,7 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "span-inspector" -version = "0.7.1" +version = "0.7.2" dependencies = [ "cxx", "cxx-qt", @@ -1498,22 +1492,6 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "versions" -version = "6.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25d498b63d1fdb376b4250f39ab3a5ee8d103957346abacd911e2d8b612c139" -dependencies = [ - "itertools", - "nom", -] - [[package]] name = "wasi" version = "0.14.2+wasi-0.2.4" From 61f40bda2407da8ae976c3f882a0bd0ff418c32a Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Thu, 26 Jun 2025 09:42:17 +0200 Subject: [PATCH 16/19] fix: cargo test for span-inspector --- examples/span-inspector/src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/span-inspector/src/main.rs b/examples/span-inspector/src/main.rs index ca0ff8657..e007c4090 100644 --- a/examples/span-inspector/src/main.rs +++ b/examples/span-inspector/src/main.rs @@ -8,8 +8,9 @@ /// A module for our Rust defined QObject pub mod inspector; -use cxx_qt::Upcast; -use cxx_qt_lib::{QGuiApplication, QQmlApplicationEngine, QUrl}; +use cxx_qt::casting::Upcast; +use cxx_qt_lib::{QGuiApplication, QQmlApplicationEngine, QQmlEngine, QUrl}; +use std::pin::Pin; fn main() { // Create the application and engine @@ -22,9 +23,9 @@ fn main() { } if let Some(engine) = engine.as_mut() { + let engine: Pin<&mut QQmlEngine> = engine.upcast_pin(); // Listen to a signal from the QML Engine engine - .upcast_pin() .on_quit(|_| { println!("QML Quit!"); }) From 1f9acfd8fbfa449b4281487c6fcc2ad0303afdd8 Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Thu, 26 Jun 2025 11:50:33 +0200 Subject: [PATCH 17/19] chore(clippy): apply Clippy suggestions to improve code quality --- examples/span-inspector/src/inspector.rs | 31 +++++++++--------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/examples/span-inspector/src/inspector.rs b/examples/span-inspector/src/inspector.rs index 9a364fc2b..acb2dd825 100644 --- a/examples/span-inspector/src/inspector.rs +++ b/examples/span-inspector/src/inspector.rs @@ -9,7 +9,6 @@ use proc_macro2::{Span, TokenStream, TokenTree}; use std::{ str::FromStr, sync::{Arc, Mutex}, - usize, }; use syn::{parse2, ItemMod}; @@ -88,7 +87,7 @@ impl Default for SpanInspectorRust { impl qobject::SpanInspector { unsafe fn output_document(&self) -> Pin<&mut QTextDocument> { - if self.output == ptr::null_mut() { + if self.output.is_null() { panic!("Output document must be set!"); } let output = unsafe { &*self.output }; @@ -134,9 +133,9 @@ impl qobject::SpanInspector { else { return; }; - Self::build_html(prettyplease::unparse(&file), span_data) + Self::build_html(&prettyplease::unparse(&file), span_data) } - Err(error) => Self::build_error_html(error), + Err(error) => Self::build_error_html(&error), }; qt_thread .queue(move |this| { @@ -196,10 +195,9 @@ impl qobject::SpanInspector { .and_then(|parser| cxx_qt_gen::GeneratedRustBlocks::from(&parser)) .map(|generated_rust| write_rust(&generated_rust, None)) .unwrap_or_else(|err| err.to_compile_error()) - .into() } - fn build_error_html(input: String) -> String { + fn build_error_html(input: &str) -> String { let style = String::from( " ", ); - format!( - "{}

{}

", - style, input - ) + format!("{style}

{input}

") } fn flatten_tokenstream(stream: TokenStream) -> Vec { @@ -231,10 +226,9 @@ impl qobject::SpanInspector { output } - fn build_html(input: String, span_data: Vec<(bool, bool)>) -> String { - let flat_tokenstream = - Self::flatten_tokenstream(TokenStream::from_str(input.as_str()).unwrap()); - let mut highlighted_string = input.clone(); + fn build_html(input: &str, span_data: Vec<(bool, bool)>) -> String { + let flat_tokenstream = Self::flatten_tokenstream(TokenStream::from_str(input).unwrap()); + let mut highlighted_string = input.to_string(); let mut token_position = span_data.len(); for token in flat_tokenstream.into_iter().rev() { @@ -242,7 +236,7 @@ impl qobject::SpanInspector { // This `if` statement simply ignores them. let token_string = token.to_string(); if !matches!(token_string.as_str(), "," | "{" | "}") { - token_position = token_position - 1; + token_position -= 1; } if span_data.get(token_position).unwrap().0 { highlighted_string.replace_range( @@ -287,13 +281,10 @@ impl qobject::SpanInspector { ", ); - format!( - "{}
{}
", - style, highlighted_string - ) + format!("{style}
{highlighted_string}
") } - fn sanitize(input: &String) -> String { + fn sanitize(input: &str) -> String { input .chars() .map(|char| match char { From c9e54220cb38201d5577e752ea573a329df7b9ea Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Tue, 1 Jul 2025 12:12:43 +0200 Subject: [PATCH 18/19] fix: update Cargo.lock --- Cargo.lock | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9bcf2a285..48199098f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -196,9 +196,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.18.1" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytemuck" @@ -349,9 +349,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "cxx" -version = "1.0.158" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a71ea7f29c73f7ffa64c50b83c9fe4d3a6d4be89a86b009eb80d5a6d3429d741" +checksum = "be1149bab7a5580cb267215751389597c021bfad13c0bb00c54e19559333764c" dependencies = [ "cc", "cxxbridge-cmd", @@ -363,11 +363,12 @@ dependencies = [ [[package]] name = "cxx-gen" -version = "0.7.158" +version = "0.7.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68318fef0ae96135291398a97ef84763d1be248bef10a9140e1a728b44e24627" +checksum = "9eccc696d335634310275d37bd6885bfcd51107133205484d9024a64a76dc83c" dependencies = [ "codespan-reporting 0.12.0", + "indexmap", "proc-macro2", "quote", "syn", @@ -494,12 +495,13 @@ dependencies = [ [[package]] name = "cxxbridge-cmd" -version = "1.0.158" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f44296c8693e9ea226a48f6a122727f77aa9e9e338380cb021accaeeb7ee279" +checksum = "c36ac1f9a72064b1f41fd7b49a4c1b3bf33b9ccb1274874dda6d264f57c55964" dependencies = [ "clap", "codespan-reporting 0.12.0", + "indexmap", "proc-macro2", "quote", "syn", @@ -507,16 +509,17 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.158" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f69c181c176981ae44ba9876e2ea41ce8e574c296b38d06925ce9214fb8e4" +checksum = "170c6ff5d009663866857a91ebee55b98ea4d4b34e7d7aba6dc4a4c95cc7b748" [[package]] name = "cxxbridge-macro" -version = "1.0.158" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8faff5d4467e0709448187df29ccbf3b0982cc426ee444a193f87b11afb565a8" +checksum = "4984a142211026786011a7e79fa22faa1eca1e9cbf0e60bffecfd57fd3db88f1" dependencies = [ + "indexmap", "proc-macro2", "quote", "rustversion", @@ -549,6 +552,12 @@ dependencies = [ "syn", ] +[[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.13" @@ -745,6 +754,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" + [[package]] name = "hermit-abi" version = "0.5.2" @@ -916,6 +931,16 @@ dependencies = [ "num-traits", ] +[[package]] +name = "indexmap" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +dependencies = [ + "equivalent", + "hashbrown", +] + [[package]] name = "indoc" version = "2.0.6" From 791cb56a367e020e190f241b57fed34226a03d5c Mon Sep 17 00:00:00 2001 From: Quentin Weber Date: Tue, 1 Jul 2025 13:00:50 +0200 Subject: [PATCH 19/19] fix: update Cargo.lock --- Cargo.lock | 627 +++++++++++++++++++---------------------------------- 1 file changed, 224 insertions(+), 403 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 48199098f..9cf792907 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,15 +19,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.11" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "async-channel" @@ -54,15 +54,14 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ "async-task", "concurrent-queue", "fastrand", "futures-lite", - "pin-project-lite", "slab", ] @@ -83,9 +82,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.4.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1237c0ae75a0f3765f58910ff9cdd0a12eeb39ab2f4c7de23262f337f0aacbb3" +checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" dependencies = [ "async-lock", "cfg-if", @@ -97,7 +96,7 @@ dependencies = [ "rustix", "slab", "tracing", - "windows-sys 0.59.0", + "windows-sys", ] [[package]] @@ -113,9 +112,9 @@ dependencies = [ [[package]] name = "async-std" -version = "1.13.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730294c1c08c2e0f85759590518f6333f0d5a0a766a27d519c1b244c3dfd8a24" +checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" dependencies = [ "async-channel 1.9.0", "async-global-executor", @@ -151,9 +150,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "basic_cxx_only" @@ -177,9 +176,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.9.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "blocking" @@ -196,15 +195,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "bytemuck" -version = "1.23.1" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" [[package]] name = "byteorder" @@ -220,15 +219,15 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.10.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "cc" -version = "1.2.27" +version = "1.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" +checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9" dependencies = [ "jobserver", "libc", @@ -237,22 +236,22 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-link", + "windows-targets", ] [[package]] @@ -266,18 +265,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.40" +version = "4.5.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" +checksum = "8acebd8ad879283633b343856142139f2da2317c96b05b4dd6181c61e2480184" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.40" +version = "4.5.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" +checksum = "f6ba32cbda51c7e1dfd49acc1457ba1a7dec5b64fe360e828acb13ca8dc9c2f9" dependencies = [ "anstyle", "clap_lex", @@ -286,9 +285,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.5" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "codespan-reporting" @@ -297,18 +296,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ "termcolor", - "unicode-width 0.1.14", -] - -[[package]] -name = "codespan-reporting" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" -dependencies = [ - "serde", - "termcolor", - "unicode-width 0.2.1", + "unicode-width", ] [[package]] @@ -349,9 +337,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "cxx" -version = "1.0.160" +version = "1.0.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be1149bab7a5580cb267215751389597c021bfad13c0bb00c54e19559333764c" +checksum = "1de88e785b0a1ce3f28af40f289e5f368a23528562db4c6837036d2dff9a5cbf" dependencies = [ "cc", "cxxbridge-cmd", @@ -363,12 +351,11 @@ dependencies = [ [[package]] name = "cxx-gen" -version = "0.7.160" +version = "0.7.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eccc696d335634310275d37bd6885bfcd51107133205484d9024a64a76dc83c" +checksum = "3474c45958d2260d293bf2e1b5dd10a1a8369007a1146b1322fc4de789445b1c" dependencies = [ - "codespan-reporting 0.12.0", - "indexmap", + "codespan-reporting", "proc-macro2", "quote", "syn", @@ -401,7 +388,7 @@ name = "cxx-qt-build" version = "0.7.2" dependencies = [ "cc", - "codespan-reporting 0.11.1", + "codespan-reporting", "cxx-gen", "cxx-qt-gen", "proc-macro2", @@ -437,7 +424,7 @@ dependencies = [ "cxx-qt-build", "http", "image 0.24.9", - "image 0.25.6", + "image 0.25.5", "qt-build-utils", "rgb", "serde", @@ -495,13 +482,12 @@ dependencies = [ [[package]] name = "cxxbridge-cmd" -version = "1.0.160" +version = "1.0.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c36ac1f9a72064b1f41fd7b49a4c1b3bf33b9ccb1274874dda6d264f57c55964" +checksum = "2a20529e8e70e5b11bb265ca926758ff22dac41008b94e831d043b8fef66d672" dependencies = [ "clap", - "codespan-reporting 0.12.0", - "indexmap", + "codespan-reporting", "proc-macro2", "quote", "syn", @@ -509,17 +495,16 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.160" +version = "1.0.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170c6ff5d009663866857a91ebee55b98ea4d4b34e7d7aba6dc4a4c95cc7b748" +checksum = "9d85a5be275867aefa8fd18790d8f6c03915eb79619672d6b4b7d0fca5ecfa37" [[package]] name = "cxxbridge-macro" -version = "1.0.160" +version = "1.0.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4984a142211026786011a7e79fa22faa1eca1e9cbf0e60bffecfd57fd3db88f1" +checksum = "d0d0f54b137299572d42ef838ad7beeff8eea80eced305a30431756c7f6bf20f" dependencies = [ - "indexmap", "proc-macro2", "quote", "rustversion", @@ -528,9 +513,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.0" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", ] @@ -552,20 +537,14 @@ dependencies = [ "syn", ] -[[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.13" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys", ] [[package]] @@ -587,9 +566,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" dependencies = [ "event-listener 5.4.0", "pin-project-lite", @@ -609,9 +588,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "form_urlencoded" @@ -730,18 +709,6 @@ dependencies = [ "slab", ] -[[package]] -name = "getrandom" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasi", -] - [[package]] name = "gloo-timers" version = "0.3.0" @@ -754,23 +721,17 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "hashbrown" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" - [[package]] name = "hermit-abi" -version = "0.5.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "http" -version = "1.3.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -779,15 +740,14 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", - "log", "wasm-bindgen", "windows-core", ] @@ -803,22 +763,21 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.0.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ "displaydoc", - "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] -name = "icu_locale_core" -version = "2.0.0" +name = "icu_locid" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ "displaydoc", "litemap", @@ -827,11 +786,31 @@ dependencies = [ "zerovec", ] +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + [[package]] name = "icu_normalizer" -version = "2.0.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ "displaydoc", "icu_collections", @@ -839,54 +818,67 @@ dependencies = [ "icu_properties", "icu_provider", "smallvec", + "utf16_iter", + "utf8_iter", + "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" -version = "2.0.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" [[package]] name = "icu_properties" -version = "2.0.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ "displaydoc", "icu_collections", - "icu_locale_core", + "icu_locid_transform", "icu_properties_data", "icu_provider", - "potential_utf", - "zerotrie", + "tinystr", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.0.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" [[package]] name = "icu_provider" -version = "2.0.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" dependencies = [ "displaydoc", - "icu_locale_core", + "icu_locid", + "icu_provider_macros", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", - "zerotrie", "zerovec", ] +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "idna" version = "1.0.3" @@ -900,9 +892,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ "icu_normalizer", "icu_properties", @@ -922,44 +914,33 @@ dependencies = [ [[package]] name = "image" -version = "0.25.6" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" dependencies = [ "bytemuck", "byteorder-lite", "num-traits", ] -[[package]] -name = "indexmap" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" -dependencies = [ - "equivalent", - "hashbrown", -] - [[package]] name = "indoc" -version = "2.0.6" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ - "getrandom", "libc", ] @@ -984,45 +965,45 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.174" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "link-cplusplus" -version = "1.0.10" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6f6da007f968f9def0d65a05b187e2960183de70c160204ecfccf0ee330212" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" dependencies = [ "cc", ] [[package]] name = "linux-raw-sys" -version = "0.9.4" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" -version = "0.8.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "log" -version = "0.4.27" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" dependencies = [ "value-bag", ] [[package]] name = "memchr" -version = "2.7.5" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "num-conv" @@ -1041,9 +1022,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "parking" @@ -1082,9 +1063,9 @@ dependencies = [ [[package]] name = "polling" -version = "3.8.0" +version = "3.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b53a684391ad002dd6a596ceb6c74fd004fdce75f4be2e3f615068abbea5fd50" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", @@ -1092,16 +1073,7 @@ dependencies = [ "pin-project-lite", "rustix", "tracing", - "windows-sys 0.59.0", -] - -[[package]] -name = "potential_utf" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" -dependencies = [ - "zerovec", + "windows-sys", ] [[package]] @@ -1122,9 +1094,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.35" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" +checksum = "6837b9e10d61f45f987d50808f83d1ee3d206c66acf650c3e4ae2e1f6ddedf55" dependencies = [ "proc-macro2", "syn", @@ -1132,9 +1104,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -1207,19 +1179,13 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.40" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" 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 = "rgb" version = "0.8.50" @@ -1231,28 +1197,28 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys", ] [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "semver" @@ -1262,18 +1228,18 @@ checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -1282,9 +1248,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -1300,15 +1266,18 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "slab" -version = "0.4.10" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] [[package]] name = "smallvec" -version = "1.15.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "span-inspector" @@ -1365,9 +1334,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.104" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -1376,9 +1345,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", @@ -1416,9 +1385,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.41" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "num-conv", @@ -1429,15 +1398,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "tinystr" -version = "0.8.1" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", "zerovec", @@ -1455,15 +1424,15 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "unicode-segmentation" @@ -1477,12 +1446,6 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" -[[package]] -name = "unicode-width" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" - [[package]] name = "url" version = "2.5.4" @@ -1494,6 +1457,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf8_iter" version = "1.0.4" @@ -1502,29 +1471,18 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.17.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" +checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" dependencies = [ - "js-sys", "serde", - "wasm-bindgen", ] [[package]] name = "value-bag" -version = "1.11.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" - -[[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] +checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" [[package]] name = "wasm-bindgen" @@ -1613,66 +1571,16 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys", ] [[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", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.59.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-link" -version = "0.1.3" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link", + "windows-targets", ] [[package]] @@ -1681,16 +1589,7 @@ 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.2", + "windows-targets", ] [[package]] @@ -1699,30 +1598,14 @@ 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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -1731,84 +1614,42 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -1816,25 +1657,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "write16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags", -] +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" [[package]] name = "writeable" -version = "0.6.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "yansi" @@ -1844,9 +1676,9 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yoke" -version = "0.8.0" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", @@ -1856,9 +1688,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.0" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", @@ -1868,18 +1700,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", @@ -1887,22 +1719,11 @@ dependencies = [ "synstructure", ] -[[package]] -name = "zerotrie" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - [[package]] name = "zerovec" -version = "0.11.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ "yoke", "zerofrom", @@ -1911,9 +1732,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote",