fold app/ into src/editor/

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-07-12 10:28:21 -07:00
parent 71863e215c
commit d72155df4c
10 changed files with 11 additions and 4 deletions

View file

@ -63,7 +63,7 @@ pub fn build(b: *std.Build) !void {
if (target.getCpuArch() != .wasm32) {
const app = b.addExecutable(.{
.name = "mach",
.root_source_file = .{ .path = "app/main.zig" },
.root_source_file = .{ .path = "src/mach.zig" },
.version = .{ .major = 0, .minor = 1, .patch = 0 },
.optimize = optimize,
.target = target,

View file

@ -2,7 +2,7 @@ const std = @import("std");
const mime_map = @import("Builder/mime.zig").mime_map;
const Target = @import("target.zig").Target;
const OptimizeMode = std.builtin.OptimizeMode;
const allocator = @import("root").allocator;
const allocator = @import("entrypoint.zig").allocator;
const Builder = @This();

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

@ -10,7 +10,7 @@ var arg_i: usize = 1;
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
pub const allocator = gpa.allocator();
pub fn main() !void {
pub fn Main() !void {
defer _ = gpa.deinit();
args = try std.process.argsAlloc(allocator);

View file

@ -1,5 +1,5 @@
const std = @import("std");
const allocator = @import("root").allocator;
const allocator = @import("entrypoint.zig").allocator;
pub const Target = enum {
@"linux-x86_64",

7
src/mach.zig Normal file
View file

@ -0,0 +1,7 @@
//! The 'mach' CLI and engine editor
const entrypoint = @import("editor/entrypoint.zig");
pub fn main() !void {
try entrypoint.Main();
}