cranpose 0.19.0

Build desktop, mobile and web apps with composable Rust functions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
#![deny(missing_docs)]
#![doc = include_str!("../README.md")]

extern crate self as cranpose;

#[cfg(feature = "image-loading")]
mod async_image;
#[cfg(feature = "localization")]
mod system_languages;
#[cfg(feature = "localization")]
pub use system_languages::{
    ProvideApplicationLocalization, local_system_languages, system_languages,
};

#[cfg(any(test, all(feature = "android", target_os = "android")))]
pub mod android;
/// An in-process Cranpose component driven by its native host.
#[cfg(all(feature = "renderer-wgpu", not(target_arch = "wasm32")))]
pub mod embedded_view;
#[cfg(all(feature = "renderer-wgpu", not(target_arch = "wasm32")))]
pub use cranpose_app_shell::TouchRouter;
#[cfg(feature = "renderer-wgpu")]
mod external_frames;
#[cfg(feature = "renderer-wgpu")]
pub use external_frames::{ExternalFrames, FrameTexture, FrameWriter};
#[cfg(feature = "renderer-wgpu")]
mod gpu_context;
#[cfg(feature = "renderer-wgpu")]
pub use gpu_context::{GpuContext, GpuRequirements, gpu_context};
#[cfg(all(
    feature = "renderer-wgpu",
    any(
        feature = "desktop-shell",
        all(feature = "android", target_os = "android"),
        all(feature = "ios", target_os = "ios"),
        all(feature = "web", target_arch = "wasm32")
    )
))]
mod gpu_loss;
#[cfg(feature = "renderer-wgpu")]
mod guest_view;
#[cfg(feature = "renderer-wgpu")]
pub use guest_view::{GuestView, GuestViewError};
#[cfg(all(feature = "renderer-wgpu", not(target_arch = "wasm32")))]
mod frame_readback;
/// Native views mounted in a Cranpose layout by an application-owned host.
pub mod native_view;
#[cfg(all(feature = "renderer-wgpu", not(target_arch = "wasm32")))]
mod offscreen_instance;
mod scoped_weak_stack;
#[cfg(all(feature = "android", feature = "renderer-wgpu", target_os = "android"))]
pub use android::file_picker::open_content_uri;
#[cfg(any(
    test,
    all(feature = "desktop-shell", feature = "renderer-wgpu"),
    all(feature = "android", feature = "renderer-wgpu", target_os = "android"),
    all(feature = "ios", feature = "renderer-wgpu", target_os = "ios"),
    all(feature = "web", feature = "renderer-wgpu", target_arch = "wasm32")
))]
mod accessibility;
#[cfg(any(
    test,
    all(feature = "android", feature = "renderer-wgpu", target_os = "android"),
    all(feature = "desktop-shell", feature = "renderer-wgpu"),
    all(feature = "ios", feature = "renderer-wgpu", target_os = "ios"),
    all(feature = "web", feature = "renderer-wgpu", target_arch = "wasm32")
))]
mod accessibility_publish_policy;
mod android_entry;
#[cfg_attr(
    not(all(feature = "android", feature = "renderer-wgpu", target_os = "android")),
    expect(dead_code, reason = "only the Android backend hosts windows")
)]
#[cfg_attr(
    not(all(feature = "android", feature = "renderer-wgpu", target_os = "android")),
    expect(
        unreachable_pub,
        reason = "only an Android build with the wgpu renderer exports the host window"
    )
)]
mod android_host_window;
mod android_input;
#[cfg(all(feature = "renderer-wgpu", target_os = "android"))]
mod android_symbols;
mod app_launcher;
#[cfg(feature = "framebuffer")]
pub mod framebuffer;
#[cfg(feature = "preview")]
pub mod preview;
#[cfg(feature = "watchos")]
pub mod watchos;
#[cfg(feature = "preview")]
pub use cranpose_macros::preview;
#[cfg(feature = "embed")]
pub mod inspection;
#[cfg(feature = "renderer-wgpu")]
pub use cranpose_app_shell::inspector::{
    InspectorAction, InspectorControl, InspectorMode, InspectorNode, InspectorState,
};
mod host_environment;
#[cfg(all(feature = "ios", target_os = "ios"))]
pub mod ios;
mod native_window;
mod thread_state;
mod window_local;
#[cfg(all(
    feature = "native-windows",
    feature = "renderer-wgpu",
    not(target_arch = "wasm32")
))]
mod window_node;
/// Android activity state passed to the [`android_main!`] entry point.
#[cfg(all(feature = "android", target_os = "android"))]
pub use android_activity::AndroidApp;
#[cfg(all(feature = "android", feature = "renderer-wgpu", target_os = "android"))]
pub use android_host_window::{
    AndroidHostWindowPositionError, AndroidHostWindowSizeError, AndroidHostWindowSizeStatus,
    AndroidHostWindowState, rememberAndroidHostWindowState,
};
#[cfg(all(
    feature = "renderer-wgpu",
    any(feature = "desktop-shell", all(feature = "ios", target_os = "ios"))
))]
pub use app_launcher::LaunchError;
pub use app_launcher::{
    AndroidGpuBackend, AndroidOverlayWindowOptions, AppFonts, AppLauncher, AppSettings,
    CustomCursorSize, DefaultFont, LauncherFonts,
};
#[cfg(feature = "localized-arabic")]
pub use cranpose_fonts::ARABIC as ARABIC_FONT_PACK;
#[cfg(feature = "localized-cjk")]
pub use cranpose_fonts::CJK as CJK_FONT_PACK;
#[cfg(feature = "localized-devanagari")]
pub use cranpose_fonts::DEVANAGARI as DEVANAGARI_FONT_PACK;
#[cfg(any(
    feature = "localized-arabic",
    feature = "localized-devanagari",
    feature = "localized-cjk"
))]
pub use cranpose_fonts::FontPack;
pub use cranpose_render_common::font_source::{
    ANDROID_SYSTEM_FONT_DIR, DEFAULT_SYSTEM_FAMILY_WEIGHTS, FontLoadError, FontRegistry,
};
#[cfg(feature = "installed-fonts")]
pub use cranpose_render_common::installed_fonts::{install_font_bytes, install_font_file};
/// Shared font data accepted by [`AppLauncher::with_font_face_bytes`].
pub use cranpose_text::FontBytes;
pub use host_environment::{host_density, system_font_directory};
/// The JNI types the [`android_main!`] exports name.
#[cfg(all(feature = "android", target_os = "android"))]
#[doc(hidden)]
pub use jni as __android_jni;
pub use native_window::{
    WindowConfig, WindowFocus, WindowModifierExt, WindowResizeDirection, WindowState,
    rememberWindowState, rememberWindowStateAt,
};
pub use window_local::LocalWindowState;
/// Includes the app capability declaration from the build script.
///
/// Defines `pub const CAPABILITIES: cranpose::capabilities::Capabilities` from
/// the file produced by `cranpose::capabilities::Declaration::emit`:
///
/// ```ignore
/// cranpose::app_capabilities!();
///
/// cranpose::android_main! {
///     launcher: cranpose::AppLauncher::new().with_capabilities(&CAPABILITIES),
///     content: my_app::Root,
/// }
/// ```
#[macro_export]
macro_rules! app_capabilities {
    () => {
        #[doc(hidden)]
        mod cranpose_declared_capabilities {
            use $crate::capabilities as cranpose_capabilities;

            include!(concat!(env!("OUT_DIR"), "/cranpose_capabilities.rs"));
        }
        pub use cranpose_declared_capabilities::CAPABILITIES;
    };
}

macro_rules! renderer_wgpu_platform_modules {
    ($($name:ident),+ $(,)?) => {
        $(
            #[cfg(all(
                feature = "renderer-wgpu",
                any(
                    feature = "desktop-shell",
                    all(feature = "android", target_os = "android"),
                    all(feature = "ios", target_os = "ios"),
                    all(feature = "web", target_arch = "wasm32")
                )
            ))]
            mod $name;
        )+
    };
}

renderer_wgpu_platform_modules!(present_mode, surface_format, wgpu_surface);

#[cfg(feature = "audio")]
pub use cranpose_audio::{AudioEngine, install as install_audio};
/// Declare app services, permissions and required hardware in the build script.
/// [`app_capabilities!`](crate::app_capabilities) includes the generated values.
pub use cranpose_capabilities as capabilities;
mod composition_api {
    pub use cranpose_core::{
        BlockingError, BlockingExecutor, BlockingExecutorConfig, BlockingTask, CollectEvents,
        ComputedState, CoroutineScope, DisposableEffect, DisposableEffectResult,
        DisposableEffectScope, EventStream, LaunchedEffect, LaunchedEffectAsync,
        LaunchedEffectScope, MovableContent, MutableState, SnapshotStateList, SnapshotStateMap,
        State, TaskHandle, collectAsState, computedStateOf, delay, derivedStateOf, forget_movable,
        interval, key, launchBlocking, movable, movableContentOf, mutableStateList,
        mutableStateListOf, mutableStateMap, mutableStateMapOf, mutableStateOf,
        mutableStateOfNeverEqual, produceState, remember, rememberCoroutineScope,
        rememberEventStream, rememberKeyed, rememberMovableContentOf, rememberMutableStateOf,
        rememberMutableStateOfNeverEqual, rememberUpdatedState, withBlocking,
    };
}
#[cfg(feature = "image-loading")]
pub use async_image::AsyncImage;
pub use composition_api::*;
/// Glass controls, themes and motion for Cranpose apps.
/// Import common components with `use cranpose::liquid::prelude::*;`.
pub use cranpose_liquid as liquid;
#[cfg(feature = "media-backend")]
pub use cranpose_media::{SoftwareMediaPlayer, path_from_uri, uri_for_path};
/// Whether the host's current application theme is dark.
pub use cranpose_services::isSystemInDarkTheme;
pub use cranpose_services::*;
pub use cranpose_ui::*;

static KEEP_SCREEN_ON_EFFECTS: std::sync::atomic::AtomicUsize =
    std::sync::atomic::AtomicUsize::new(0);

/// Keeps the platform display awake while this call remains in composition and
/// `enabled` is true. Multiple active callers are reference-counted.
#[expect(non_snake_case, reason = "names follow Compose's casing")]
#[track_caller]
pub fn KeepScreenOn(enabled: bool) {
    cranpose_core::__disposable_effect_impl(
        caller_location_key().scoped(cranpose_core::location_key!()),
        enabled,
        move |scope| {
            if !enabled {
                return DisposableEffectResult::default();
            }
            if KEEP_SCREEN_ON_EFFECTS.fetch_add(1, std::sync::atomic::Ordering::AcqRel) == 0 {
                set_keep_screen_on(true);
            }
            scope.on_dispose(move || {
                if KEEP_SCREEN_ON_EFFECTS.fetch_sub(1, std::sync::atomic::Ordering::AcqRel) == 1 {
                    set_keep_screen_on(false);
                }
            })
        },
    );
}

/// Installs a declared bundled-asset set on a worker and returns the outcome
/// on the UI runtime. Work is cancelled with the owning composition.
#[cfg(not(target_arch = "wasm32"))]
#[expect(non_snake_case, reason = "names follow Compose's casing")]
#[track_caller]
pub fn BundledAssetInstallEffect<K: PartialEq + 'static>(
    keys: K,
    spec: BundledAssetInstallSpec,
    on_result: impl FnOnce(Result<BundledAssetInstallOutcome, BundledAssetError>) + 'static,
) {
    cranpose_core::__launched_effect_impl(
        caller_location_key().scoped(cranpose_core::location_key!()),
        keys,
        move |scope| {
            scope.launch_background(
                move |_token| async move { install_bundled_asset_set(&spec) },
                on_result,
            );
        },
    );
}

/// Registers a lifecycle observer for the lifetime of the current composition.
///
/// Screens that only need the current state read
/// [`cranpose_services::local_lifecycle_state`] instead; this is for work that
/// must react to a *transition*.
#[expect(non_snake_case, reason = "names follow Compose's casing")]
#[track_caller]
pub fn LifecycleEffect<K: PartialEq + 'static>(
    keys: K,
    observer: impl FnMut(LifecycleEvent) + 'static,
) {
    let transitions = rememberLifecycleEvents();
    CollectEvents(transitions, keys, observer);
}

/// Remembers observable application update state for the current composition.
#[expect(non_snake_case, reason = "names follow Compose's casing")]
#[track_caller]
pub fn rememberAppUpdateState() -> State<AppUpdateStatus> {
    let updates = rememberEventStream((), |sender| {
        observe_app_update_status(move |status| sender.send(status))
    });
    collectAsState(updates, (), app_update_status())
}

/// Runs `on_frame` on every animation frame while `running` is true.
///
/// This is the framework-owned animation loop for games and other custom-drawn
/// content. `running` is ordinary observable state the caller derives — a
/// simulation flag, "the window is visible", "a gesture is in progress" — and
/// the loop starts and stops with it. There is no wake handle to hold and no
/// scheduler to poke: stopping is a state change like any other.
#[expect(non_snake_case, reason = "names follow Compose's casing")]
#[track_caller]
pub fn FrameEffect<K: PartialEq + 'static>(
    keys: K,
    running: bool,
    on_frame: impl FnMut(u64) + 'static,
) {
    let on_frame: std::rc::Rc<std::cell::RefCell<dyn FnMut(u64)>> =
        std::rc::Rc::new(std::cell::RefCell::new(on_frame));
    let on_frame = rememberUpdatedState(on_frame);
    cranpose_core::__launched_effect_async_impl(
        caller_location_key().scoped(cranpose_core::location_key!()),
        std::panic::Location::caller().into(),
        (keys, running),
        move |scope| {
            Box::pin(async move {
                if !running {
                    return;
                }
                let clock = scope.runtime().frame_clock();
                while scope.is_active() {
                    let now = clock.next_frame().await;
                    if !scope.is_active() {
                        break;
                    }
                    (on_frame.value().borrow_mut())(now);
                }
            })
        },
    );
}

#[doc(hidden)]
pub use cranpose_core::{
    __branch_group_scope_advance, __branch_group_scope_deferred, __constant, __current_composer,
    __inline_source_scope, __source_scope, CallbackHolder, ComposableGroup, Composer, Key,
    ParamReturnState, ParamState, RecomposeScope, ReturnSlot, ValueSlotHandle, branch_location_key,
    cached_composable_definition_key, caller_location_key, composable_definition_key,
    composable_identity_key, const_location_key, constant_value_key, debug_label_current_scope,
    hot_branch_key, hot_definition_key, hot_origin, location_key, noted_location_key,
    refresh_param, refresh_shared_param, store_param, with_current_composer,
};

#[cfg(all(
    feature = "desktop-shell",
    feature = "robot",
    feature = "renderer-wgpu"
))]
#[doc(hidden)]
pub type RobotAppHook = dyn FnMut(String, String) -> Result<Option<String>, String>;

/// App setup, state, layout and platform guides.
#[cfg(doc)]
pub mod _docs;

/// Convenience imports for Cranpose applications.
pub mod prelude {
    pub use cranpose_services::*;
    pub use cranpose_ui::*;

    #[cfg(feature = "image-loading")]
    pub use crate::async_image::AsyncImage;
    #[cfg(all(feature = "android", feature = "renderer-wgpu", target_os = "android"))]
    pub use crate::{
        AndroidHostWindowPositionError, AndroidHostWindowSizeError, AndroidHostWindowSizeStatus,
        AndroidHostWindowState, rememberAndroidHostWindowState,
    };
    pub use crate::{
        AndroidOverlayWindowOptions, AppFonts, AppLauncher, AppSettings, WebView, WebViewEvent,
        WindowConfig, WindowModifierExt, WindowResizeDirection, WindowState, composition_api::*,
        rememberWindowState, rememberWindowStateAt,
    };
    #[cfg(all(
        feature = "desktop-menus",
        feature = "renderer-wgpu",
        any(
            target_os = "macos",
            target_os = "windows",
            all(target_os = "linux", not(target_arch = "wasm32"))
        )
    ))]
    pub use crate::{CheckItem, KeyShortcut, Menu, MenuBar, MenuEntry, MenuItem, Tray, TraySpec};
}

#[cfg(any(
    all(feature = "desktop-shell", feature = "renderer-wgpu"),
    all(feature = "android", feature = "renderer-wgpu", target_os = "android"),
    all(feature = "ios", feature = "renderer-wgpu", target_os = "ios"),
    all(feature = "web", feature = "renderer-wgpu", target_arch = "wasm32"),
    feature = "embed",
    feature = "framebuffer"
))]
pub(crate) mod platform_env;

#[cfg(any(
    all(feature = "desktop-shell", feature = "renderer-wgpu"),
    all(feature = "android", feature = "renderer-wgpu", target_os = "android"),
    all(feature = "ios", target_os = "ios"),
    feature = "embed"
))]
mod pipeline_cache_file;

#[cfg(any(
    all(feature = "desktop-shell", feature = "renderer-wgpu"),
    feature = "embed"
))]
mod application_id;

#[cfg(feature = "embed")]
pub mod embed;
#[cfg(feature = "embed")]
mod embed_frame;
#[cfg(feature = "embed")]
mod embed_input;
#[cfg(feature = "embed")]
mod embed_overlay;
#[cfg(feature = "embed")]
mod embed_protocol;
#[cfg(feature = "embed")]
mod embed_surfaces;

#[cfg(any(
    test,
    all(feature = "android", feature = "renderer-wgpu", target_os = "android")
))]
mod frame_lead;
#[cfg(any(
    test,
    all(feature = "android", feature = "renderer-wgpu", target_os = "android")
))]
mod frame_pacer;
#[cfg(feature = "renderer-wgpu")]
#[cfg_attr(
    not(any(
        all(feature = "android", target_os = "android"),
        all(feature = "ios", target_os = "ios")
    )),
    allow(
        dead_code,
        reason = "only the Android and iOS backends set memory hints"
    )
)]
pub(crate) mod gpu_limits;
#[cfg(any(
    test,
    all(feature = "android", feature = "renderer-wgpu", target_os = "android")
))]
mod vsync_period;

#[cfg(all(feature = "desktop-shell", feature = "renderer-wgpu"))]
mod cursor_scale;
#[cfg(all(feature = "desktop-shell", feature = "renderer-wgpu"))]
pub mod desktop;
#[cfg(all(feature = "desktop-shell", feature = "renderer-wgpu"))]
pub use desktop::integration::{
    DesktopIntegration, DesktopIntegrationContext, DesktopWaker, DesktopWindow, DesktopWindowId,
};
#[cfg(all(
    feature = "desktop-menus",
    feature = "renderer-wgpu",
    any(
        target_os = "macos",
        target_os = "windows",
        all(target_os = "linux", not(target_arch = "wasm32"))
    )
))]
pub use desktop::menus::{
    CheckItem, KeyShortcut, Menu, MenuBar, MenuEntry, MenuItem, Tray, TraySpec, WindowMenuBar,
};
/// The raw window handle traits a [`DesktopWindow`] implements, at the
/// version the shell uses.
#[cfg(all(feature = "desktop-shell", feature = "renderer-wgpu"))]
pub use raw_window_handle;
#[cfg(any(
    all(feature = "desktop-shell", feature = "renderer-wgpu"),
    all(feature = "web", feature = "renderer-wgpu", target_arch = "wasm32")
))]
mod host_surface_resize;

#[cfg(all(
    unix,
    feature = "renderer-wgpu",
    any(
        feature = "desktop-shell",
        all(feature = "android", target_os = "android"),
        all(feature = "ios", target_os = "ios")
    )
))]
mod process_info;

#[cfg(any(
    all(feature = "desktop-shell", feature = "renderer-wgpu"),
    all(feature = "ios", feature = "renderer-wgpu", target_os = "ios")
))]
mod winit_pointer;

#[cfg(all(feature = "ios", feature = "renderer-wgpu", target_os = "ios"))]
mod winit_touch;

#[cfg(all(feature = "desktop-shell", feature = "renderer-wgpu"))]
mod winit_wheel;

#[cfg(all(
    feature = "robot",
    feature = "desktop-shell",
    feature = "renderer-wgpu"
))]
mod robot;

#[cfg(target_vendor = "apple")]
mod apple;

#[cfg(all(feature = "watchos", target_os = "watchos"))]
mod watchos_services;

#[cfg(all(feature = "watchos", feature = "heart-rate", target_os = "watchos"))]
mod watchos_heart_rate;

#[cfg(all(
    feature = "desktop-shell",
    feature = "renderer-wgpu",
    target_os = "linux"
))]
mod linux_network;

#[cfg(all(feature = "desktop-shell", feature = "renderer-wgpu"))]
#[expect(
    clippy::print_stderr,
    reason = "the recorder reports to the developer who started it"
)]
pub mod recorder;

#[cfg(any(
    test,
    all(feature = "web", feature = "renderer-wgpu", target_arch = "wasm32")
))]
pub mod web;

/// Development frame pacing and FPS statistics types.
#[cfg(all(feature = "desktop-shell", feature = "renderer-wgpu"))]
pub use cranpose_app_shell::{DevOptions, FpsStats, FramePacingMode};
#[cfg(all(
    feature = "desktop-shell",
    feature = "robot",
    feature = "renderer-wgpu"
))]
pub use cranpose_render_wgpu::{pipelines_created, pipelines_created_off_frame};
#[cfg(all(
    feature = "desktop-shell",
    feature = "robot",
    feature = "renderer-wgpu"
))]
pub use robot::{
    Robot, RobotPresentationInfo, RobotScreenshot, RobotTimelineAction, RobotTimelineStep,
    SemanticElement, SemanticRect,
};

#[cfg(all(test, feature = "desktop-shell", feature = "renderer-wgpu"))]
pub(crate) fn test_scratch_dir(tag: &str) -> std::path::PathBuf {
    cranpose_core::test_scratch_dir(env!("CARGO_MANIFEST_DIR"), tag)
}
mod webview;
pub use webview::{WebView, WebViewEvent};

#[cfg(all(
    feature = "webview",
    feature = "renderer-wgpu",
    any(
        all(feature = "android", target_os = "android"),
        all(feature = "ios", target_os = "ios"),
        all(feature = "web", target_arch = "wasm32"),
        all(
            feature = "desktop-shell",
            any(target_os = "macos", target_os = "windows", target_os = "linux")
        )
    )
))]
mod webview_host;
#[cfg(all(
    feature = "webview",
    feature = "renderer-wgpu",
    any(
        all(feature = "ios", target_os = "ios"),
        all(
            feature = "desktop-shell",
            any(target_os = "macos", target_os = "windows", target_os = "linux")
        )
    )
))]
mod wry_webview;