Skip to main content

gpui/
gpui.rs

1#![doc = include_str!("../README.md")]
2#![warn(missing_docs)]
3#![allow(clippy::type_complexity)] // Not useful, GPUI makes heavy use of callbacks
4#![allow(clippy::collapsible_else_if)] // False positives in platform specific code
5#![allow(unused_mut)] // False positives in platform specific code
6
7// Macros generated by `gpui_macros` name `gpui::` paths, so within this crate
8// `gpui` is an alias for itself.
9extern crate self as gpui;
10
11#[cfg(feature = "platform")]
12mod platform_entry;
13
14/// Do not touch, here be dragons for use by gpui_macros and such.
15#[doc(hidden)]
16pub use gpui_authoring::private;
17
18/// Defines a Criterion benchmark group for benchmarks annotated with [`gpui::bench`].
19///
20/// This mirrors `criterion::criterion_group!` so GPUI benchmark files can keep the
21/// same shape as ordinary Criterion benchmarks.
22///
23/// [`gpui::bench`]: crate::bench
24#[macro_export]
25macro_rules! bench_group {
26    ($($tokens:tt)*) => {
27        criterion::criterion_group!($($tokens)*);
28    };
29}
30
31/// Defines the entry point for GPUI Criterion benchmark groups.
32///
33/// This mirrors `criterion::criterion_main!` so GPUI benchmark files can keep the
34/// same shape as ordinary Criterion benchmarks.
35#[macro_export]
36macro_rules! bench_main {
37    ($($tokens:tt)*) => {
38        criterion::criterion_main!($($tokens)*);
39    };
40}
41
42pub use gpui_authoring::prelude;
43pub use gpui_authoring::*;
44pub use gpui_runtime::*;
45#[cfg(feature = "platform")]
46pub use platform_entry::*;