Deprecate LetNodes in favor of new scope API (#1814)

* WIP

* Start deprecating let nodes

* Replace WasmEditorApi network imports with new Scope input

* Add missing unwrap

* Add #[serde(default)] to scope_injections

* Restructure WasmEditorApi definition to be available as a TaggedValue

* Fix text node

* Use stable toolchain in nix shell again

* Code review

* FIx text node and remove all remaining warnings

* Require executor input to be 'static

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Dennis Kobert
2024-07-10 14:18:21 +02:00
committed by GitHub
co-authored by Keavon Chambers
parent a17ed68008
commit 3657b37574
55 changed files with 774 additions and 980 deletions
+4 -1
View File
@@ -51,7 +51,10 @@ impl core::fmt::Debug for ImaginatePersistentData {
impl Default for ImaginatePersistentData {
fn default() -> Self {
let mut status = ImaginateServerStatus::default();
#[cfg(not(miri))]
let client = new_client().map_err(|err| status = ImaginateServerStatus::Failed(err.to_string())).ok();
#[cfg(miri)]
let client = None;
let ImaginatePreferences { host_name } = Default::default();
Self {
pending_server_check: None,
@@ -263,7 +266,7 @@ struct ImaginateCommonImageRequest<'a> {
#[allow(clippy::too_many_arguments)]
pub async fn imaginate<'a, P: Pixel>(
image: Image<P>,
editor_api: impl Future<Output = WasmEditorApi<'a>>,
editor_api: impl Future<Output = &'a WasmEditorApi>,
controller: ImaginateController,
seed: impl Future<Output = f64>,
res: impl Future<Output = Option<DVec2>>,