Bootstrap a window in 20 lines of C. Build components with a declarative DSL that compiles to C.
#include <strata/runtime/runtime.h>
#include <sui/sui_app.h>
#include "my_app_sui.h"
typedef struct app_state {
my_app_root *root;
} app_state;
STRATA_V2_SUI_DEFINE_ROOT(my_app, app_state, root, my_app_root);
int main(int argc, char **argv) {
app_state state = {0};
StrataV2Config cfg = STRATA_V2_CONFIG_INIT;
cfg.window_title = "My App";
cfg.window_width = 1280;
cfg.window_height = 720;
StrataV2SuiApp app = STRATA_V2_SUI_APP_INIT;
app.app_context = &state;
app.build_ui = my_app_build_ui;
app.destroy_ui = my_app_destroy_ui;
return strata_v2_run_sui_app_default(&cfg, &app);
}