Files
WrldBox/.tmp_zig/lib/zig/compiler/aro/backend/Assembly.zig
swim67667 c17dfc94ce
Some checks failed
Build Project / build (ubuntu-latest) (push) Failing after 12m33s
added multi-compiling stuff (only works on my mac for now)
2026-06-28 16:40:20 -04:00

20 lines
480 B
Zig

const std = @import("std");
const Allocator = std.mem.Allocator;
data: []const u8,
text: []const u8,
const Assembly = @This();
pub fn deinit(self: *const Assembly, gpa: Allocator) void {
gpa.free(self.data);
gpa.free(self.text);
}
pub fn writeToFile(self: Assembly, io: std.Io, file: std.Io.File) !void {
var file_writer = file.writer(io, &.{});
var buffers = [_][]const u8{ self.data, self.text };
try file_writer.interface.writeSplatAll(&buffers, 1);
}