From f13471de46a3e6cf6497b8ded16b95b848ffaaf7 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 17 May 2023 17:52:15 -0700 Subject: [PATCH] add more todos/documentation --- src/main-lib.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main-lib.zig b/src/main-lib.zig index 0367431..85bd0ae 100644 --- a/src/main-lib.zig +++ b/src/main-lib.zig @@ -18,6 +18,8 @@ export fn zigInit(parent_allocator: *anyopaque) void { allocator = @ptrCast(*std.mem.Allocator, @alignCast(@alignOf(*std.mem.Allocator), parent_allocator)); } export fn handle_request() ?*interface.Response { + // TODO: implement another library in C or Rust or something to show + // that anything using a C ABI can be successful var alloc = if (allocator) |a| a.* else @panic("zigInit not called prior to handle_request. This is a coding error"); // setup response body @@ -59,7 +61,7 @@ export fn handle_request() ?*interface.Response { // } // ************************************************************************ -// Boilerplate ^^, Custom code below +// Boilerplate ^^, Custom code vv // ************************************************************************ // // handleRequest function here is the last line of boilerplate and the