aboutsummaryrefslogtreecommitdiff
path: root/src/app/root.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/root.zig')
-rw-r--r--src/app/root.zig31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/app/root.zig b/src/app/root.zig
new file mode 100644
index 0000000..1a04b21
--- /dev/null
+++ b/src/app/root.zig
@@ -0,0 +1,31 @@
+const builtin = @import("builtin");
+const std = @import("std");
+const zilch = @import("zilch");
+
+pub const panic = zilch.panic;
+pub const std_options: std.Options = .{
+ .logFn = zilch.log.default,
+};
+
+const components = @import("components/root.zig").components;
+
+pub const app: zilch.App(.{
+ .name = "Memora",
+ .favicon = "icon.png",
+ .functions = &(zilch.Object.functions ++
+ zilch.Promise.functions ++
+ zilch.Callable.functions ++
+ zilch.Component.functions),
+ .globals = &.{
+ zilch.Object.global(.window),
+ zilch.Object.global(.Object),
+ zilch.Callable.global(.fetch),
+ },
+ .components = components,
+ .body = .parse(@embedFile("index.html")),
+ .theme = @embedFile("theme.css"),
+}) = .init;
+
+comptime {
+ _ = app;
+}