Unknown state [2025-08-04]
This commit is contained in:
@@ -1,25 +1,11 @@
|
||||
const std = @import("std");
|
||||
const core = @import("core.zig");
|
||||
const common = @import("common.zig");
|
||||
|
||||
const Self = @This();
|
||||
|
||||
export const MODULE = core.module(Self);
|
||||
|
||||
pub fn startup(alloc: std.mem.Allocator) !*Self {
|
||||
std.log.debug("!! startup {s} !!", .{@typeName(@This())});
|
||||
return try alloc.create(Self);
|
||||
fn perform(action: common.Action) !void {
|
||||
std.log.debug("{s} says {any}", .{ @typeName(@This()), action });
|
||||
}
|
||||
|
||||
pub fn unload(_: *Self, _: std.mem.Allocator) ![]u8 {
|
||||
std.log.debug("!! unload {s} !!", .{@typeName(@This())});
|
||||
return &.{};
|
||||
}
|
||||
|
||||
pub fn reload(_: *Self, _: std.mem.Allocator, _: []u8) !void {
|
||||
std.log.debug("!! reload {s} !!", .{@typeName(@This())});
|
||||
}
|
||||
|
||||
pub fn shutdown(self: *Self, alloc: std.mem.Allocator) void {
|
||||
std.log.debug("!! shutdown {s} !!", .{@typeName(@This())});
|
||||
alloc.destroy(self);
|
||||
}
|
||||
// TODO in comptime, loop through the struct; generate the "hook" api i used before.
|
||||
// automatically generate the "interface" and return that. then consumers can import
|
||||
// and use it directly, but it'll automatically go through the thing.
|
||||
// use @export in comptime to export the necessary symbols.
|
||||
|
Reference in New Issue
Block a user