From 02582cc490fc0d753dd153211cc172eb28fbee5d Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 5 Oct 2026 15:33:46 +0200 Subject: first sketch of wasm environment --- src/main.zig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main.zig') 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, .{ -- cgit v1.2.3-70-g09d2