mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-18 21:40:29 +00:00
implement sentry transport to write crash reports to XDG_STATE_HOME
This commit is contained in:
@@ -7,4 +7,12 @@ pub const Envelope = opaque {
|
||||
pub fn deinit(self: *Envelope) void {
|
||||
c.sentry_envelope_free(@ptrCast(self));
|
||||
}
|
||||
|
||||
pub fn writeToFile(self: *Envelope, path: []const u8) !void {
|
||||
if (c.sentry_envelope_write_to_file_n(
|
||||
@ptrCast(self),
|
||||
path.ptr,
|
||||
path.len,
|
||||
) != 0) return error.WriteFailed;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,6 +6,10 @@ const c = @import("c.zig").c;
|
||||
pub const UUID = struct {
|
||||
value: c.sentry_uuid_t,
|
||||
|
||||
pub fn init() UUID {
|
||||
return .{ .value = c.sentry_uuid_new_v4() };
|
||||
}
|
||||
|
||||
pub fn isNil(self: UUID) bool {
|
||||
return c.sentry_uuid_is_nil(&self.value) != 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user