diff --git a/build.zig b/build.zig index aa1f1dd7..37acd09a 100644 --- a/build.zig +++ b/build.zig @@ -149,9 +149,6 @@ pub const App = struct { core: core.App, use_freetype: ?[]const u8 = null, - pub const InitError = core.App.InitError; - pub const LinkError = core.App.LinkError; - pub fn init( b: *std.Build, options: struct { @@ -167,7 +164,7 @@ pub const App = struct { // TODO(build-system): name is currently not used / always "freetype" use_freetype: ?[]const u8 = null, }, - ) InitError!App { + ) !App { var deps = std.ArrayList(std.build.ModuleDependency).init(b.allocator); if (options.deps) |v| try deps.appendSlice(v); try deps.append(.{ .name = "mach", .module = module(b, options.optimize, options.target) }); @@ -193,7 +190,7 @@ pub const App = struct { }; } - pub fn link(app: *const App, options: Options) LinkError!void { + pub fn link(app: *const App, options: Options) !void { try app.core.link(options.core); sysaudio.link(app.b, app.step, options.sysaudio); if (app.use_freetype) |_| freetype.link(app.b, app.step, options.freetype); diff --git a/libs/core/sdk.zig b/libs/core/sdk.zig index b8972b91..6b33bb47 100644 --- a/libs/core/sdk.zig +++ b/libs/core/sdk.zig @@ -91,9 +91,6 @@ pub fn Sdk(comptime deps: anytype) type { const web_install_dir = std.build.InstallDir{ .custom = "www" }; - pub const InitError = error{OutOfMemory} || std.zig.system.NativeTargetInfo.DetectError; - pub const LinkError = deps.glfw.LinkError; - pub const Platform = enum { native, web, @@ -115,7 +112,7 @@ pub fn Sdk(comptime deps: anytype) type { res_dirs: ?[]const []const u8 = null, watch_paths: ?[]const []const u8 = null, }, - ) InitError!App { + ) !App { const target = (try std.zig.system.NativeTargetInfo.detect(options.target)).target; const platform = Platform.fromTarget(target); @@ -179,7 +176,7 @@ pub fn Sdk(comptime deps: anytype) type { }; } - pub fn link(app: *const App, options: Options) LinkError!void { + pub fn link(app: *const App, options: Options) !void { if (app.platform != .web) { try deps.glfw.link(app.b, app.step, options.glfw_options); deps.gpu.link(app.b, app.step, options.gpuOptions()) catch return error.FailedToLinkGPU;