Draft iced_devtools subcrate structure

This commit is contained in:
Héctor Ramón Jiménez 2025-04-05 19:27:15 +02:00
parent 3f67044977
commit a719b0596c
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
5 changed files with 201 additions and 2 deletions

View file

@ -169,7 +169,13 @@ impl<P: Program> Application<P> {
where
Self: 'static,
{
Ok(shell::run(self.raw, self.settings, Some(self.window))?)
#[cfg(feature = "debug")]
let program = iced_devtools::attach(self.raw);
#[cfg(not(feature = "debug"))]
let program = self.raw;
Ok(shell::run(program, self.settings, Some(self.window))?)
}
/// Sets the [`Settings`] that will be used to run the [`Application`].