Application
The Application
is the entry point into your GPUI application.
Creating an Application
The new
function creates the Application
.
use gpui::Application;
fn main() {
let application = Application::new();
}
Running an Application
The run
function consumes the Application
and takes a callback which will be fired once the application has finished loading. This callback is the entry point into your application, a mutable reference of App
is supplied where you can start controlling aspects of your application like opening a window.
use gpui::Application;
fn main() {
let application = Application::new();
application.run(|_app| {
// Entry point
});
}