mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
move datastructures to dedicated "datastruct" package
This commit is contained in:
@ -13,7 +13,7 @@ const Surface = @import("Surface.zig");
|
||||
const tracy = @import("tracy");
|
||||
const input = @import("input.zig");
|
||||
const Config = @import("config.zig").Config;
|
||||
const BlockingQueue = @import("./blocking_queue.zig").BlockingQueue;
|
||||
const BlockingQueue = @import("datastruct/main.zig").BlockingQueue;
|
||||
const renderer = @import("renderer.zig");
|
||||
const font = @import("font/main.zig");
|
||||
const internal_os = @import("os/main.zig");
|
||||
|
@ -1,4 +1,4 @@
|
||||
const fastmem = @import("./fastmem.zig");
|
||||
const fastmem = @import("../fastmem.zig");
|
||||
|
||||
const std = @import("std");
|
||||
const assert = std.debug.assert;
|
@ -1,7 +1,7 @@
|
||||
const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
const Allocator = std.mem.Allocator;
|
||||
const fastmem = @import("fastmem.zig");
|
||||
const fastmem = @import("../fastmem.zig");
|
||||
|
||||
/// Returns a circular buffer containing type T.
|
||||
pub fn CircBuf(comptime T: type, comptime default: T) type {
|
17
src/datastruct/main.zig
Normal file
17
src/datastruct/main.zig
Normal file
@ -0,0 +1,17 @@
|
||||
//! The datastruct package contains data structures or anything closely
|
||||
//! related to data structures.
|
||||
|
||||
const blocking_queue = @import("blocking_queue.zig");
|
||||
const cache_table = @import("cache_table.zig");
|
||||
const circ_buf = @import("circ_buf.zig");
|
||||
const segmented_pool = @import("segmented_pool.zig");
|
||||
|
||||
pub const lru = @import("lru.zig");
|
||||
pub const BlockingQueue = blocking_queue.BlockingQueue;
|
||||
pub const CacheTable = cache_table.CacheTable;
|
||||
pub const CircBuf = circ_buf.CircBuf;
|
||||
pub const SegmentedPool = segmented_pool.SegmentedPool;
|
||||
|
||||
test {
|
||||
@import("std").testing.refAllDecls(@This());
|
||||
}
|
@ -14,7 +14,7 @@ const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
const Allocator = std.mem.Allocator;
|
||||
const font = @import("../main.zig");
|
||||
const CacheTable = @import("../../cache_table.zig").CacheTable;
|
||||
const CacheTable = @import("../../datastruct/main.zig").CacheTable;
|
||||
|
||||
const log = std.log.scoped(.font_shaper_cache);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
const std = @import("std");
|
||||
const Allocator = std.mem.Allocator;
|
||||
const input = @import("../input.zig");
|
||||
const CircBuf = @import("../circ_buf.zig").CircBuf;
|
||||
const CircBuf = @import("../datastruct/main.zig").CircBuf;
|
||||
const cimgui = @import("cimgui");
|
||||
|
||||
/// Circular buffer of key events.
|
||||
|
@ -2,7 +2,7 @@ const std = @import("std");
|
||||
const Allocator = std.mem.Allocator;
|
||||
const cimgui = @import("cimgui");
|
||||
const terminal = @import("../terminal/main.zig");
|
||||
const CircBuf = @import("../circ_buf.zig").CircBuf;
|
||||
const CircBuf = @import("../datastruct/main.zig").CircBuf;
|
||||
const Surface = @import("../Surface.zig");
|
||||
|
||||
/// The stream handler for our inspector.
|
||||
|
@ -168,7 +168,6 @@ pub const std_options: std.Options = .{
|
||||
};
|
||||
|
||||
test {
|
||||
_ = @import("circ_buf.zig");
|
||||
_ = @import("pty.zig");
|
||||
_ = @import("Command.zig");
|
||||
_ = @import("font/main.zig");
|
||||
@ -180,17 +179,11 @@ test {
|
||||
_ = @import("surface_mouse.zig");
|
||||
|
||||
// Libraries
|
||||
_ = @import("segmented_pool.zig");
|
||||
_ = @import("crash/main.zig");
|
||||
_ = @import("datastruct/main.zig");
|
||||
_ = @import("inspector/main.zig");
|
||||
_ = @import("terminal/main.zig");
|
||||
_ = @import("terminfo/main.zig");
|
||||
_ = @import("simd/main.zig");
|
||||
_ = @import("unicode/main.zig");
|
||||
|
||||
// TODO
|
||||
_ = @import("blocking_queue.zig");
|
||||
_ = @import("cache_table.zig");
|
||||
_ = @import("config.zig");
|
||||
_ = @import("lru.zig");
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ const builtin = @import("builtin");
|
||||
const xev = @import("xev");
|
||||
const macos = @import("macos");
|
||||
|
||||
const BlockingQueue = @import("../blocking_queue.zig").BlockingQueue;
|
||||
const BlockingQueue = @import("../datastruct/main.zig").BlockingQueue;
|
||||
|
||||
const Allocator = std.mem.Allocator;
|
||||
const log = std.log.scoped(.cf_release_thread);
|
||||
|
@ -9,7 +9,7 @@ const crash = @import("../crash/main.zig");
|
||||
const renderer = @import("../renderer.zig");
|
||||
const apprt = @import("../apprt.zig");
|
||||
const configpkg = @import("../config.zig");
|
||||
const BlockingQueue = @import("../blocking_queue.zig").BlockingQueue;
|
||||
const BlockingQueue = @import("../datastruct/main.zig").BlockingQueue;
|
||||
const App = @import("../App.zig");
|
||||
|
||||
const Allocator = std.mem.Allocator;
|
||||
|
@ -20,7 +20,7 @@ const shell_integration = @import("shell_integration.zig");
|
||||
const terminal = @import("../terminal/main.zig");
|
||||
const termio = @import("../termio.zig");
|
||||
const Command = @import("../Command.zig");
|
||||
const SegmentedPool = @import("../segmented_pool.zig").SegmentedPool;
|
||||
const SegmentedPool = @import("../datastruct/main.zig").SegmentedPool;
|
||||
const ptypkg = @import("../pty.zig");
|
||||
const Pty = ptypkg.Pty;
|
||||
const EnvMap = std.process.EnvMap;
|
||||
|
@ -15,7 +15,6 @@ const posix = std.posix;
|
||||
const termio = @import("../termio.zig");
|
||||
const Command = @import("../Command.zig");
|
||||
const Pty = @import("../pty.zig").Pty;
|
||||
const SegmentedPool = @import("../segmented_pool.zig").SegmentedPool;
|
||||
const StreamHandler = @import("stream_handler.zig").StreamHandler;
|
||||
const terminal = @import("../terminal/main.zig");
|
||||
const terminfo = @import("../terminfo/main.zig");
|
||||
|
@ -17,7 +17,7 @@ const builtin = @import("builtin");
|
||||
const xev = @import("xev");
|
||||
const crash = @import("../crash/main.zig");
|
||||
const termio = @import("../termio.zig");
|
||||
const BlockingQueue = @import("../blocking_queue.zig").BlockingQueue;
|
||||
const BlockingQueue = @import("../datastruct/main.zig").BlockingQueue;
|
||||
|
||||
const Allocator = std.mem.Allocator;
|
||||
const log = std.log.scoped(.io_thread);
|
||||
|
@ -12,7 +12,6 @@ const shell_integration = @import("shell_integration.zig");
|
||||
const terminal = @import("../terminal/main.zig");
|
||||
const termio = @import("../termio.zig");
|
||||
const Command = @import("../Command.zig");
|
||||
const SegmentedPool = @import("../segmented_pool.zig").SegmentedPool;
|
||||
const Pty = @import("../pty.zig").Pty;
|
||||
|
||||
// The preallocation size for the write request pool. This should be big
|
||||
|
@ -5,7 +5,7 @@ const Allocator = std.mem.Allocator;
|
||||
const xev = @import("xev");
|
||||
const renderer = @import("../renderer.zig");
|
||||
const termio = @import("../termio.zig");
|
||||
const BlockingQueue = @import("../blocking_queue.zig").BlockingQueue;
|
||||
const BlockingQueue = @import("../datastruct/main.zig").BlockingQueue;
|
||||
|
||||
const log = std.log.scoped(.io_writer);
|
||||
|
||||
|
Reference in New Issue
Block a user