Datasets:
id stringlengths 8 8 | kind stringclasses 2
values | fn stringlengths 2 33 | repo stringlengths 8 38 | host stringclasses 2
values | commit stringlengths 40 40 | path stringlengths 8 42 | license stringclasses 6
values | prompt stringlengths 36 32.6k | suffix stringlengths 3 25.2k | ref_body stringlengths 37 18.5k | grader dict | n_tests int64 2 95 | license_text stringlengths 1.05k 16.8k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ib1-0000 | fn | findFirstUnset | 0xbas4lt/marble | github | df9dcc5b2191118aba6e01504abc332b63bb07c7 | kernel/src/BitSet.zig | MIT | const std = @import("std");
/// Padding bits at the end are assumed to be 0.
masks: []MaskInt,
bit_length: usize,
const BitSet = @This();
pub const MaskInt = usize;
pub const ShiftInt = std.math.Log2Int(MaskInt);
pub const Range = struct {
/// The index of the first bit of interest.
start: usize,
/// Th... | }
/// Finds the index of the first unset bit at or after `index`. Returns `null` if none is found.
pub fn findFirstUnsetFrom(self: *const BitSet, index: usize) ?usize {
std.debug.assert(index < self.bit_length);
const bits = @bitSizeOf(MaskInt);
var word: usize = index / bits;
const start_bit: ShiftI... |
var bit_offset_aligned: usize = 0;
const mask = for (self.masks) |mask| {
if (mask != std.math.maxInt(MaskInt))
break mask;
bit_offset_aligned += @bitSizeOf(MaskInt);
} else return null;
const result_offset = bit_offset_aligned + @ctz(~mask);
if (result_offset >= self.b... | {
"prefix": "const std = @import(\"std\");\n\n/// Padding bits at the end are assumed to be 0.\nmasks: []MaskInt,\nbit_length: usize,\n\nconst BitSet = @This();\n\npub const MaskInt = usize;\npub const ShiftInt = std.math.Log2Int(MaskInt);\n\npub const Range = struct {\n /// The index of the first bit of interest.... | 14 | MIT License
Copyright (c) 2026 Evgenii Gorbunov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... |
ib1-0003 | fn | init | 0xbas4lt/marble | github | df9dcc5b2191118aba6e01504abc332b63bb07c7 | kernel/src/KernelEventLogger.zig | MIT | //!
//! Kernel logger and ring buffer.
//! Each write to the ring buffer advances the cursor.
//!
const std = @import("std");
const testing = std.testing;
const builtin = @import("builtin");
const KernelEventLogger = @This();
/// `ring_buffer.len` must be a power of two.
ring_buffer: []Record,
/// SAFETY: Check if wr... | }
pub fn log(self: *KernelEventLogger, tag: Tag) void {
const clock_count: u64 = @intCast(self.clock_count_fn() orelse std.math.maxInt(u64));
const buf_index = self.total_logged_record_count % self.ring_buffer.len;
self.ring_buffer[buf_index] = .{ .tag = tag, .clock_count = clock_count };
self.total_lo... |
std.debug.assert(std.math.isPowerOfTwo(buffer.len));
return .{
.ring_buffer = buffer,
.total_logged_record_count = 0,
.clock_count_fn = clock_count_fn,
};
| {
"prefix": "//!\n//! Kernel logger and ring buffer.\n//! Each write to the ring buffer advances the cursor.\n//!\nconst std = @import(\"std\");\nconst testing = std.testing;\nconst builtin = @import(\"builtin\");\n\nconst KernelEventLogger = @This();\n\n/// `ring_buffer.len` must be a power of two.\nring_buffer: []R... | 6 | MIT License
Copyright (c) 2026 Evgenii Gorbunov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... |
ib1-0005 | fn | log | 0xbas4lt/marble | github | df9dcc5b2191118aba6e01504abc332b63bb07c7 | kernel/src/KernelEventLogger.zig | MIT | //!
//! Kernel logger and ring buffer.
//! Each write to the ring buffer advances the cursor.
//!
const std = @import("std");
const testing = std.testing;
const builtin = @import("builtin");
const KernelEventLogger = @This();
/// `ring_buffer.len` must be a power of two.
ring_buffer: []Record,
/// SAFETY: Check if wr... | }
pub const Iterator = struct {
/// Historical index (not the wrapped one!!).
/// Set by `.next()`.
index: usize = 0,
logger: *const KernelEventLogger,
/// Returns the next available record.
/// If there are no records left, returns a `null`.
pub fn next(self: *@This()) ?Record {
if... |
const clock_count: u64 = @intCast(self.clock_count_fn() orelse std.math.maxInt(u64));
const buf_index = self.total_logged_record_count % self.ring_buffer.len;
self.ring_buffer[buf_index] = .{ .tag = tag, .clock_count = clock_count };
self.total_logged_record_count +%= 1;
| {
"prefix": "//!\n//! Kernel logger and ring buffer.\n//! Each write to the ring buffer advances the cursor.\n//!\nconst std = @import(\"std\");\nconst testing = std.testing;\nconst builtin = @import(\"builtin\");\n\nconst KernelEventLogger = @This();\n\n/// `ring_buffer.len` must be a power of two.\nring_buffer: []R... | 6 | MIT License
Copyright (c) 2026 Evgenii Gorbunov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... |
ib1-0006 | type | Zprof | ANDRVV/zprof | github | 7f480e9cbe6ed34cc14d7840978186b3cb8e8ca3 | src/zprof.zig | MIT | //! zprof.zig
//!
//! Copyright (c) Andrea Vaccaro
//!
//! Zprof is a zero-overhead, zero-dependency memory profiler
//! that wraps any allocator written in Zig.
//! Tracks allocations, detects memory leaks, and logs
//! memory changes with optional thread-safe mode.
//! Version 5.0.0
//!
//! Original repository: https... | }
fn absDiff(a: usize, b: usize) struct { std.math.Order, usize } {
// in this branch integer underflow/overflow is impossible
@setRuntimeSafety(false);
const order = std.math.order(a, b);
const diff = switch (order) {
.eq => 0,
.gt => a - b,
.lt => b - a,
};
return .{... |
return struct {
const Self = @This();
child_allocator: std.mem.Allocator,
mutex: @TypeOf(mutex_init) = mutex_init,
profiler: Profiler(config),
const mutex_init = if (config.thread_safe) std.Io.Mutex.init else {};
pub fn init(child_allocator: std.mem.Allocator, wr... | {
"prefix": "//! zprof.zig\n//!\n//! Copyright (c) Andrea Vaccaro\n//!\n//! Zprof is a zero-overhead, zero-dependency memory profiler\n//! that wraps any allocator written in Zig.\n//! Tracks allocations, detects memory leaks, and logs\n//! memory changes with optional thread-safe mode.\n//! Version 5.0.0\n//!\n//! O... | 12 | MIT License
Copyright (c) Andrea Vaccaro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distrib... |
ib1-0007 | fn | deinit | ATTron/astroz | github | c4aed01077028c6e4db279d9ad50aaf626f71a57 | src/Ccsds.zig | MIT | //! CCSDS packet structure
const std = @import("std");
const Ccsds = @This();
header: HeaderMetadata,
primaryHeader: []const u8,
secondaryHeader: ?[]const u8,
packets: []const u8,
rawData: []const u8,
allocator: std.mem.Allocator,
pub fn init(pl: []const u8, allocator: std.mem.Allocator, config: ?Config) !Ccsds {
... | }
/// Optional packet layout; load it with `parseConfig`.
pub const Config = struct {
secondaryHeaderLength: u8,
};
/// CCSDS primary header fields.
pub const HeaderMetadata = packed struct {
version: u3,
packetType: u1,
secondaryHeaderFlag: bool,
apid: u11,
sequenceFlag: u2,
packetSequenc... |
self.allocator.free(self.rawData);
| {
"prefix": "//! CCSDS packet structure\n\nconst std = @import(\"std\");\n\nconst Ccsds = @This();\n\nheader: HeaderMetadata,\nprimaryHeader: []const u8,\nsecondaryHeader: ?[]const u8,\npackets: []const u8,\nrawData: []const u8,\nallocator: std.mem.Allocator,\n\npub fn init(pl: []const u8, allocator: std.mem.Allocato... | 2 | MIT License
Copyright (c) 2024 Anthony Templeton
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... |
ib1-0008 | fn | init | ATTron/astroz | github | c4aed01077028c6e4db279d9ad50aaf626f71a57 | src/Ccsds.zig | MIT | //! CCSDS packet structure
const std = @import("std");
const Ccsds = @This();
header: HeaderMetadata,
primaryHeader: []const u8,
secondaryHeader: ?[]const u8,
packets: []const u8,
rawData: []const u8,
allocator: std.mem.Allocator,
pub fn init(pl: []const u8, allocator: std.mem.Allocator, config: ?Config) !Ccsds { | }
pub fn deinit(self: *Ccsds) void {
self.allocator.free(self.rawData);
}
/// Optional packet layout; load it with `parseConfig`.
pub const Config = struct {
secondaryHeaderLength: u8,
};
/// CCSDS primary header fields.
pub const HeaderMetadata = packed struct {
version: u3,
packetType: u1,
seco... |
var rawPackets = try allocator.dupe(u8, pl); // dupe so it doesn't go out of scope too early
const primaryHeader = rawPackets[0..6];
const version = @as(u3, @truncate((primaryHeader[0] >> 5) & 0x07));
const packetType = @as(u1, @truncate((primaryHeader[0] >> 4) & 0x01));
const secondaryHeaderFlag =... | {
"prefix": "//! CCSDS packet structure\n\nconst std = @import(\"std\");\n\nconst Ccsds = @This();\n\nheader: HeaderMetadata,\nprimaryHeader: []const u8,\nsecondaryHeader: ?[]const u8,\npackets: []const u8,\nrawData: []const u8,\nallocator: std.mem.Allocator,\n\npub fn init(pl: []const u8, allocator: std.mem.Allocato... | 2 | MIT License
Copyright (c) 2024 Anthony Templeton
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... |
ib1-0009 | fn | parseConfig | ATTron/astroz | github | c4aed01077028c6e4db279d9ad50aaf626f71a57 | src/Ccsds.zig | MIT | //! CCSDS packet structure
const std = @import("std");
const Ccsds = @This();
header: HeaderMetadata,
primaryHeader: []const u8,
secondaryHeader: ?[]const u8,
packets: []const u8,
rawData: []const u8,
allocator: std.mem.Allocator,
pub fn init(pl: []const u8, allocator: std.mem.Allocator, config: ?Config) !Ccsds {
... | }
fn readBigEndianU16(bytes: [2]u8) u16 {
return @as(u16, bytes[0]) << 8 | bytes[1];
}
|
const parsed = try std.json.parseFromSlice(Config, allocator, configContent, .{});
defer parsed.deinit();
return parsed.value;
| {
"prefix": "//! CCSDS packet structure\n\nconst std = @import(\"std\");\n\nconst Ccsds = @This();\n\nheader: HeaderMetadata,\nprimaryHeader: []const u8,\nsecondaryHeader: ?[]const u8,\npackets: []const u8,\nrawData: []const u8,\nallocator: std.mem.Allocator,\n\npub fn init(pl: []const u8, allocator: std.mem.Allocato... | 2 | MIT License
Copyright (c) 2024 Anthony Templeton
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... |
ib1-0010 | fn | deinit | ATTron/astroz | github | c4aed01077028c6e4db279d9ad50aaf626f71a57 | src/Vita49.zig | MIT | //! The Vita49 packet structure
const std = @import("std");
const Vita49 = @This();
header: Header,
streamId: ?u32,
classId: ?ClassId,
iTimestamp: ?u32,
fTimestamp: ?u64,
payload: []const u8,
trailer: ?Trailer,
allocator: std.mem.Allocator,
end: usize,
_rawData: []const u8,
pub fn init(pl: []const u8, allocator: st... | }
fn getPayloadRange(header: Header, hasStreamId: bool) !struct { start: usize, end: usize } {
var start: usize = 4;
var end: usize = @as(usize, (header.packetSize * 4)) - 1;
if (hasStreamId) {
start += 4;
}
if (header.classId) {
start += 8;
}
if (header.tsi != Tsi.none) {
... |
self.allocator.free(self._rawData);
| {
"prefix": "//! The Vita49 packet structure\n\nconst std = @import(\"std\");\n\nconst Vita49 = @This();\n\nheader: Header,\nstreamId: ?u32,\nclassId: ?ClassId,\niTimestamp: ?u32,\nfTimestamp: ?u64,\npayload: []const u8,\ntrailer: ?Trailer,\nallocator: std.mem.Allocator,\nend: usize,\n_rawData: []const u8,\n\npub fn ... | 3 | MIT License
Copyright (c) 2024 Anthony Templeton
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... |
ib1-0011 | fn | init | ATTron/astroz | github | c4aed01077028c6e4db279d9ad50aaf626f71a57 | src/Vita49.zig | MIT | //! The Vita49 packet structure
const std = @import("std");
const Vita49 = @This();
header: Header,
streamId: ?u32,
classId: ?ClassId,
iTimestamp: ?u32,
fTimestamp: ?u64,
payload: []const u8,
trailer: ?Trailer,
allocator: std.mem.Allocator,
end: usize,
_rawData: []const u8,
pub fn init(pl: []const u8, allocator: st... | }
pub fn deinit(self: *Vita49) void {
self.allocator.free(self._rawData);
}
fn getPayloadRange(header: Header, hasStreamId: bool) !struct { start: usize, end: usize } {
var start: usize = 4;
var end: usize = @as(usize, (header.packetSize * 4)) - 1;
if (hasStreamId) {
start += 4;
}
if (... |
var stream = try allocator.dupe(u8, pl); // dupe this so it doesnt go out of scope too early
if (config != null) {
std.log.debug("Config found for Vita49 but this hasn't been implemented yet", .{});
}
if (stream.len < 4) {
return Error.InsufficientData;
}
const header = try Head... | {
"prefix": "//! The Vita49 packet structure\n\nconst std = @import(\"std\");\n\nconst Vita49 = @This();\n\nheader: Header,\nstreamId: ?u32,\nclassId: ?ClassId,\niTimestamp: ?u32,\nfTimestamp: ?u64,\npayload: []const u8,\ntrailer: ?Trailer,\nallocator: std.mem.Allocator,\nend: usize,\n_rawData: []const u8,\n\npub fn ... | 3 | MIT License
Copyright (c) 2024 Anthony Templeton
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... |
ib1-0012 | fn | buildCpuLevel | ATTron/oma | github | c94eae96bdf4f2cfb32c77b91c4dd11eec970d7d | src/root.zig | MIT | const std = @import("std");
const builtin = @import("builtin");
pub const CpuLevel = enum {
x86_64,
x86_64_v2,
x86_64_v3,
x86_64_v4,
aarch64,
aarch64_sve,
aarch64_sve2,
pub fn suffix(self: CpuLevel) []const u8 {
return @tagName(self);
}
};
// Ordered highest-first so disp... | }
/// Detect the CPU and resolve a function pointer in one call. The function
/// type is derived from `Source`, which must be an `@import`ed module
/// registered via `addMultiVersion(.name = ...)`.
///
/// const dot = oma.resolveFrom(dot_product, "dot", io);
///
/// If using `.name` causes a file-ownership conflic... |
return levelFromFeatures(builtin.target.cpu.arch, builtin.target.cpu.features);
| {
"prefix": "const std = @import(\"std\");\nconst builtin = @import(\"builtin\");\n\npub const CpuLevel = enum {\n x86_64,\n x86_64_v2,\n x86_64_v3,\n x86_64_v4,\n\n aarch64,\n aarch64_sve,\n aarch64_sve2,\n\n pub fn suffix(self: CpuLevel) []const u8 {\n return @tagName(self);\n }\n}... | 2 | MIT License
Copyright (c) 2025 Anthony Oleinik
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... |
ib1-0013 | type | module | AlexBlais/dbc_parser | codeberg | 2bc97405063f163fc8840741ebeed697142c6ad7 | src/tripwire.zig | MIT | //! A library for injecting failures into Zig code for the express
//! purpose of testing error handling paths.
//!
//! Improper `errdefer` is one of the highest sources of bugs in Zig code.
//! Many `errdefer` points are hard to exercise in unit tests and rare
//! to encounter in production, so they often hide bugs. W... | }
|
return struct {
/// The points this module can fail at.
pub const FailPoint = P;
/// The error set used for failures at the failure points.
pub const Error = err: {
const T = if (@TypeOf(E) == type) E else @TypeOf(E);
break :err switch (@typeInfo(T)) {
... | {
"prefix": "//! A library for injecting failures into Zig code for the express\n//! purpose of testing error handling paths.\n//!\n//! Improper `errdefer` is one of the highest sources of bugs in Zig code.\n//! Many `errdefer` points are hard to exercise in unit tests and rare\n//! to encounter in production, so the... | 3 | Copyright Alexandre Blais
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,... |
ib1-0014 | type | AclReassembler | AritoUser/Zig-BLE | github | 38e798951c72c75adca3686b07957883cd8f77eb | src/l2cap/acl_reassembler.zig | MIT | //! # L2CAP ACL Packet Reassembly Engine
//!
//! Implements Bluetooth Core Specification Vol 3, Part A (L2CAP).
//! Reassembles fragmented ACL Data packets (with Packet Boundary flags
//! PB_FIRST_FLUSH (0b10) and PB_CONTINUING (0b01)) into full L2CAP frames
//! (e.g. ATT PDUs or SMP frames) with zero dynamic allocatio... | }
|
return struct {
const Self = @This();
rx_buffer: [max_frame_len]u8 = undefined,
active_handle: ?u16 = null,
expected_len: u16 = 0,
cid: u16 = 0,
accumulated: usize = 0,
pub fn init() Self {
return .{};
}
pub fn reset(self: *Self... | {
"prefix": "//! # L2CAP ACL Packet Reassembly Engine\n//!\n//! Implements Bluetooth Core Specification Vol 3, Part A (L2CAP).\n//! Reassembles fragmented ACL Data packets (with Packet Boundary flags\n//! PB_FIRST_FLUSH (0b10) and PB_CONTINUING (0b01)) into full L2CAP frames\n//! (e.g. ATT PDUs or SMP frames) with ze... | 2 | MIT License
Copyright (c) 2026 Attila / Zig-BLE Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, mer... |
Ingot: compiler-verified Zig 0.17
Zig's API changes with every release, so most Zig on the web no longer compiles. Models trained on it write broken code. Ingot keeps the Zig that a Zig 0.17.0 compiler actually accepted, says how it was checked, and grades everything else separately.
Three pools, by quality
| pool | quality | configs | ≈ tokens | use it for |
|---|---|---|---|---|
| Ingot | ✅ Verified on Zig 0.17.0 | tested built compiled std langref (+ repo) |
187M | training and fine-tuning |
| Ore | ⚠️ Unverified. Probably modern Zig, but could not be checked | ore |
199M | extra pretraining volume, mixed in carefully |
| Slag | ❌ Known broken on 0.17, compiler error attached | slag |
79M | migration research (old → new). Not for plain training |
The pools never overlap. No Ore or Slag row duplicates an Ingot row. All three share the same license, cleaning and benchmark hold-out rules.
Formerly ego0op/ingot; old links redirect here.
Sibling dataset: ego0op/ingot-lean-zig: about 3,000 Lean 4 theorems written as test-verified Zig 0.17 files.
from datasets import load_dataset
ds = load_dataset("ego0op/ingot-zig", "tested", split="train") # the cleanest config
Token counts are estimated with a 4,096-entry Zig BPE (3.27 bytes per token). A typical 100k-vocabulary tokenizer gives roughly 20–25% fewer.
Ingot: verified
Each file passed one of these checks on Zig 0.17.0 (x86_64-linux). They are listed strongest first.
| config | check passed | rows | repos | ≈ tokens |
|---|---|---|---|---|
tested |
the repo builds and its own tests pass (zig build test) |
15,604 | 736 | 61M |
built |
the repo builds (zig build) |
18,533 | 556 | 89M |
compiled |
the repo's build failed, but this file and every file it imports pass a per-file type check | 10,951 | 981 | 32M |
std |
the official Zig 0.17.0 standard library | 538 | 1 | 5M |
langref |
the official language-reference examples, each behaving exactly as documented (passes, or fails with the stated error) | 285 | 1 | — |
repo |
the three tiers above, regrouped into one document per repo with files in import order (same text, so not counted twice) | 2,273 | 2,273 | — |
Ore: unverified
These files come from repos whose build failed, and the per-file check could not analyse them. The gate field says why:
env: the file needs a module defined in the repo'sbuild.zig, that the check could not supply (17.7k rows; v1.1 wires in modules declared in the repo's ownbuild.zig, so most remaining cases need an external package)unchecked: the file imports a file that fails to parse (9.2k rows)dep: the file imports a repo file that did not pass (8.2k rows)
Most of this is likely valid modern Zig, but it is not proven. 35,007 rows from 1,086 repos.
Slag: known broken
The type check proved these do not compile on 0.17.0. Most were written for older Zig, using APIs such as Build.args, root_source_file and managed ArrayList. Each row's gate_error holds the compiler's error message. That makes the pool raw material for migration work, such as teaching a model to port old Zig to 0.17. Do not train on it as ordinary code: it teaches stale APIs. 12,074 rows from 1,208 repos.
Changelog
- v1.1 (2026-10-29): verified pool 175M → 187M tokens (+7%).
- 49 repos whose builds had failed on dependency downloads now build. The causes were a
.ziparchive saved under the wrong extension, git dependencies not fetched at their pinned commit, and submodules that broke the declared hash. Those repos moved up whole intobuilt/tested. - The per-file check now supplies modules declared in each repo's
build.zig: 1,049 more files verified, and 1,106 files proven broken that had been hidden as unverified. Somecompiledfiles moved tobuiltorslagas a result. - Fixed: a trace-parsing bug (test names containing spaces) that marked some unverified files as broken with an empty error.
- The benchmark is unchanged.
- 49 repos whose builds had failed on dependency downloads now build. The causes were a
- v1.0 (2026-10-26): first public release.
Ingot-Bench v1
790 test-graded tasks, held out of every pool:
- 719 write this function body tasks
- 71 write this generic type tasks
The model sees the file with all test blocks removed. The grader (tools/bench_grade.py) puts the answer back into the original file and runs the file's own tests through Zig's test-runner protocol, so exiting early or printing fake output does not pass. Tasks that an empty body, a return undefined body or a visible near-copy of the answer could pass were removed.
Closed-book baselines on 265 tasks (the reference answers pass 265/265):
| model | overall | functions | generic types |
|---|---|---|---|
| Claude Opus | 75.1% | 89.7% | 35.2% |
| Claude Sonnet | 70.2% | 86.1% | 26.8% |
| Claude Haiku | 66.0% | 81.4% | 23.9% |
Most failures are 0.17 API changes, which is exactly what Ingot targets. The tasks come from public code, so models trained on web-scale data may have seen some of them.
Every row tells you
| field | meaning |
|---|---|
text |
the file |
host, repo, commit, path |
where it came from: GitHub, Codeberg or GitLab, at a pinned commit |
license, license_text |
the license id and full license text (the file's own SPDX header wins when it has one) |
tier, verify |
which pool or tier the row belongs to, and the exact check it passed |
gate, gate_error (Ore and Slag only) |
why the file is not verified, or the compiler error |
lines, comment_frac, n_tests, pub_decls, imports, std_only, … |
quality signals for your own filtering |
How it was built
- Sources. About 2,900 permissively licensed Zig repos from GitHub, Codeberg and GitLab, each cloned fresh at a pinned commit.
- Build check. Each repo was run through
zig buildand, when it has tests,zig build testwith Zig 0.17.0. - Per-file type check, for repos that don't build. Nothing is executed. It parse-checks every file, then type-checks each one together with the containers declared inside it. A planted error in every compile proves the type check actually ran. An error Zig reports inside std is charged to the file that caused it. A file passes only if every repo file it imports also passes.
- Cleaning. This removes generated code, data tables, vendored copies (including forks found by content), fixtures written to fail, secrets, files over 400 KB, files using std APIs removed in 0.17, and overlap with the benchmark. Exact and near duplicates go too.
- License. Only permissive licenses are kept, with every license text re-checked. Files whose own header says GPL, or that were ported from GPL code, are dropped. MPL-2.0 and UPL-1.0 are kept and labelled.
Three independent adversarial audits tried to break these checks and the grader. Everything they found is fixed. The scripts in tools/ rebuild the whole dataset for any Zig release (ZIG=/path/to/zig ./tools/resmelt.sh).
Limits
- Everything was checked on x86_64-linux only, so some OS-specific files may be missing from
compiled. builtmeans the repo's default build step compiled. Files the build never touches are not individually proven.- The per-file check does not force private declarations, uninstantiated generics or non-generic
inline fnbodies. - File headers keep their authors' names and e-mail addresses as written.
- Run graded answers in a sandbox; they are untrusted code.
License, removal, credit
Every row keeps its original license (see LICENSE.md). The collection layout and the tools are MIT. If you own a repo in Ingot and want it removed, open a discussion on this page with the repo URL.
Built by Opus · Smelter (Claude) with Gokce Özdemir as part of the Babel project. The code belongs to its authors.
- Downloads last month
- 277