mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-28 18:11:39 +00:00
WIP: Update to new build module API after Zig PR #18160
Temporarily change dependency sources to forks until they update
This commit is contained in:
@@ -53,12 +53,12 @@ pub const Runtime = enum {
|
||||
/// GTK-backed. Rich windowed application. GTK is dynamically linked.
|
||||
gtk,
|
||||
|
||||
pub fn default(target: std.zig.CrossTarget) Runtime {
|
||||
pub fn default(target: std.Target) Runtime {
|
||||
// The Linux default is GTK because it is full featured.
|
||||
if (target.isLinux()) return .gtk;
|
||||
if (target.os.tag == .linux) return .gtk;
|
||||
|
||||
// Windows we currently only support glfw
|
||||
if (target.isWindows()) return .glfw;
|
||||
if (target.os.tag == .windows) return .glfw;
|
||||
|
||||
// Otherwise, we do NONE so we don't create an exe. The GLFW
|
||||
// build is opt-in because it is missing so many features compared
|
||||
|
||||
@@ -63,10 +63,10 @@ pub const Backend = enum {
|
||||
/// meant to be called at comptime by the build.zig script. To get the
|
||||
/// backend look at build_options.
|
||||
pub fn default(
|
||||
target: std.zig.CrossTarget,
|
||||
target: std.Target,
|
||||
wasm_target: WasmTarget,
|
||||
) Backend {
|
||||
if (target.getCpuArch() == .wasm32) {
|
||||
if (target.cpu.arch == .wasm32) {
|
||||
return switch (wasm_target) {
|
||||
.browser => .web_canvas,
|
||||
};
|
||||
|
||||
@@ -30,10 +30,10 @@ pub const Impl = enum {
|
||||
webgl,
|
||||
|
||||
pub fn default(
|
||||
target: std.zig.CrossTarget,
|
||||
target: std.Target,
|
||||
wasm_target: WasmTarget,
|
||||
) Impl {
|
||||
if (target.getCpuArch() == .wasm32) {
|
||||
if (target.cpu.arch == .wasm32) {
|
||||
return switch (wasm_target) {
|
||||
.browser => .webgl,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user