root module nu_options
This commit is contained in:
11
src/main.zig
11
src/main.zig
@@ -1,9 +1,13 @@
|
||||
const std = @import("std");
|
||||
|
||||
const nu = @import("nu.zig");
|
||||
|
||||
const App = @import("App.zig");
|
||||
|
||||
pub const nu_options: nu.Options = .{
|
||||
.window = .{ .title = "Hello World" },
|
||||
.render = .{ .app_name = "hello-world" },
|
||||
};
|
||||
|
||||
pub fn main() !void {
|
||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||
defer _ = gpa.detectLeaks();
|
||||
@@ -13,7 +17,10 @@ pub fn main() !void {
|
||||
// problem: how to specify runtime options, like Window title?
|
||||
// problem: where should gpa go? probably some "Engine" structure in nu.zig
|
||||
|
||||
try nu.Window.init(alloc, .{ .title = "Hello World" });
|
||||
// don't necessarily need to declare topological sort - depth-first traversal
|
||||
// of each module's dependencies without repeats would do.
|
||||
|
||||
try nu.Window.init(alloc);
|
||||
defer nu.Window.deinit();
|
||||
|
||||
try nu.Render.init(alloc);
|
||||
|
Reference in New Issue
Block a user