Skip to main content

gpui_web/
gpui_web.rs

1//! GPUI's browser platform uses one document-owned canvas and supports one top-level window.
2//! Browser WebGPU is preferred by default, with an automatic WebGL2 fallback. Applications can
3//! force either backend with `WebBackendPreference`. Opening a second top-level window, or
4//! reopening one after it closes, returns `WebWindowError`.
5
6pub mod canvas_fallback;
7
8pub use canvas_fallback::CanvasFontFallback;
9
10#[cfg(target_family = "wasm")]
11mod canvas_text;
12#[cfg(target_family = "wasm")]
13mod dispatcher;
14#[cfg(target_family = "wasm")]
15mod display;
16#[cfg(target_family = "wasm")]
17mod events;
18#[cfg(any(target_family = "wasm", test))]
19mod glyph_cache;
20#[cfg(target_family = "wasm")]
21mod http_client;
22#[cfg(target_family = "wasm")]
23mod ime_mirror;
24#[cfg(target_family = "wasm")]
25mod keyboard;
26#[cfg(target_family = "wasm")]
27mod logging;
28#[cfg(target_family = "wasm")]
29mod platform;
30#[cfg(any(target_family = "wasm", test))]
31mod run_replacements;
32#[cfg(target_family = "wasm")]
33mod text_system;
34#[cfg(target_family = "wasm")]
35mod viewport;
36#[cfg(target_family = "wasm")]
37mod window;
38
39#[cfg(target_family = "wasm")]
40pub use dispatcher::WebDispatcher;
41#[cfg(target_family = "wasm")]
42pub use display::WebDisplay;
43#[cfg(target_family = "wasm")]
44pub use gpui_wgpu::WebBackendPreference;
45#[cfg(target_family = "wasm")]
46pub use http_client::{FetchCredentials, FetchHttpClient};
47#[cfg(target_family = "wasm")]
48pub use keyboard::WebKeyboardLayout;
49#[cfg(target_family = "wasm")]
50pub use logging::init_logging;
51#[cfg(target_family = "wasm")]
52pub use platform::{WebPlatform, WebWindowError};
53#[cfg(target_family = "wasm")]
54pub use window::WebWindow;