aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-10-05 15:33:46 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2026-10-05 15:33:46 +0200
commit02582cc490fc0d753dd153211cc172eb28fbee5d (patch)
tree4add149d5e1ecf28cf20ecb497626fef85cdbd75 /src/main.zig
parent2f3199622d9e7a97da4b5c31a2d81b170b7cdaa6 (diff)
first sketch of wasm environment
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig
index 176d3b2..bb8b34d 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -7,9 +7,13 @@ const std = @import("std");
const http = @import("http");
const api = @import("api");
-const web = @import("web/root.zig");
+const z = @import("z");
+const wasm = @embedFile("wasm");
-const routes: http.RouteSet = .init(api.interfaces ++ web.interfaces);
+const routes: http.RouteSet = .init(&([_]http.handler.Interface{
+ http.handler.Static(.index, z.app.create(.{ .name = "Memora" }), "text/html").interface(),
+ http.handler.Static(.{"index.wasm"}, wasm, "application/wasm").interface(),
+}) ++ api.interfaces);
pub fn main(init: std.process.Init) !void {
try http.serve(init.gpa, routes, .{