module: remove the ability to send "standard" arguments to systems

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-09-02 21:00:01 -07:00 committed by Emi Gutekanst
parent f220494649
commit 2a13c07d9e
12 changed files with 39 additions and 144 deletions

View file

@ -18,8 +18,7 @@ pub fn main() !void {
// If desired, it is possible to observe when the app has finished starting by dispatching
// systems until the app has started:
const stack_space = try allocator.alloc(u8, 8 * 1024 * 1024);
try mach.mods.dispatchUntil(stack_space, .mach_core, .started);
try mach.mods.dispatchUntil(.mach_core, .started);
// On some platforms, you can drive the mach.Core main loop yourself - but this isn't
// possible on all platforms.
@ -27,9 +26,8 @@ pub fn main() !void {
mach.Core.non_blocking = true;
while (mach.mods.mod.mach_core.state().state != .exited) {
// Execute systems until a frame has been finished.
try mach.mods.dispatchUntil(stack_space, .mach_core, .frame_finished);
try mach.mods.dispatchUntil(.mach_core, .frame_finished);
}
allocator.free(stack_space);
} else {
// On platforms where you cannot control the mach.Core main loop, the .mach_core.start
// system your app schedules will block forever and the function call below will NEVER
@ -37,6 +35,6 @@ pub fn main() !void {
//
// In this case we can just dispatch systems until there are no more left to execute, which
// conviently works even if you aren't using mach.Core in your program.
try mach.mods.dispatch(stack_space, .{});
try mach.mods.dispatch(.{});
}
}

View file

@ -19,6 +19,5 @@ pub fn main() !void {
// Dispatch systems forever or until there are none left to dispatch. If your app uses mach.Core
// then this will block forever and never return.
const stack_space = try allocator.alloc(u8, 8 * 1024 * 1024);
try mach.mods.dispatch(stack_space, .{});
try mach.mods.dispatch(.{});
}

View file

@ -20,6 +20,5 @@ pub fn main() !void {
// Dispatch systems forever or until there are none left to dispatch. If your app uses mach.Core
// then this will block forever and never return.
const stack_space = try allocator.alloc(u8, 8 * 1024 * 1024);
try mach.mods.dispatch(stack_space, .{});
try mach.mods.dispatch(.{});
}

View file

@ -21,6 +21,5 @@ pub fn main() !void {
// Dispatch systems forever or until there are none left to dispatch. If your app uses mach.Core
// then this will block forever and never return.
const stack_space = try allocator.alloc(u8, 8 * 1024 * 1024);
try mach.mods.dispatch(stack_space, .{});
try mach.mods.dispatch(.{});
}

View file

@ -22,6 +22,5 @@ pub fn main() !void {
// Dispatch systems forever or until there are none left to dispatch. If your app uses mach.Core
// then this will block forever and never return.
const stack_space = try allocator.alloc(u8, 8 * 1024 * 1024);
try mach.mods.dispatch(stack_space, .{});
try mach.mods.dispatch(.{});
}

View file

@ -20,6 +20,5 @@ pub fn main() !void {
// Dispatch systems forever or until there are none left to dispatch. If your app uses mach.Core
// then this will block forever and never return.
const stack_space = try allocator.alloc(u8, 8 * 1024 * 1024);
try mach.mods.dispatch(stack_space, .{});
try mach.mods.dispatch(.{});
}

View file

@ -20,6 +20,5 @@ pub fn main() !void {
// Dispatch systems forever or until there are none left to dispatch. If your app uses mach.Core
// then this will block forever and never return.
const stack_space = try allocator.alloc(u8, 8 * 1024 * 1024);
try mach.mods.dispatch(stack_space, .{});
try mach.mods.dispatch(.{});
}

View file

@ -20,6 +20,5 @@ pub fn main() !void {
// Dispatch systems forever or until there are none left to dispatch. If your app uses mach.Core
// then this will block forever and never return.
const stack_space = try allocator.alloc(u8, 8 * 1024 * 1024);
try mach.mods.dispatch(stack_space, .{});
try mach.mods.dispatch(.{});
}

View file

@ -20,6 +20,5 @@ pub fn main() !void {
// Dispatch systems forever or until there are none left to dispatch. If your app uses mach.Core
// then this will block forever and never return.
const stack_space = try allocator.alloc(u8, 8 * 1024 * 1024);
try mach.mods.dispatch(stack_space, .{});
try mach.mods.dispatch(.{});
}