From f951e5189450af04df661cd73dec36182da3f64f Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Thu, 5 Nov 2026 14:00:47 +0100 Subject: [PATCH 1/4] Add a benchmark results badge to the main `README.md` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a76f5ce..d36a740 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@

Ordered

[![Tests](https://img.shields.io/github/actions/workflow/status/CogitatorTech/ordered/tests.yml?label=tests&style=flat&labelColor=282c34&logo=github)](https://github.com/CogitatorTech/ordered/actions/workflows/tests.yml) -[![Benchmarks](https://img.shields.io/github/actions/workflow/status/CogitatorTech/ordered/benches.yml?label=benchmarks&style=flat&labelColor=282c34&logo=github)](https://github.com/CogitatorTech/ordered/actions/workflows/benches.yml) [![Zig](https://img.shields.io/badge/zig-0.17.0-F7A41D?style=flat&labelColor=282c34&logo=zig)](https://ziglang.org/download/) [![Release](https://img.shields.io/github/release/CogitatorTech/ordered.svg?label=release&style=flat&labelColor=282c34&logo=github)](https://github.com/CogitatorTech/ordered/releases/latest) [![Docs](https://img.shields.io/badge/docs-read-507ec6?style=flat&labelColor=282c34&logo=read-the-docs)](https://CogitatorTech.github.io/ordered/) [![Examples](https://img.shields.io/badge/examples-view-507ec6?style=flat&labelColor=282c34&logo=zig)](https://github.com/CogitatorTech/ordered/tree/main/examples) +[![Benchmark Results](https://img.shields.io/badge/benchmark%20results-view-507ec6?style=flat&labelColor=282c34&logo=github)](https://cogitatortech.github.io/benchmarks-ordered) [![License](https://img.shields.io/badge/license-MIT-007ec6?label=license&style=flat&labelColor=282c34&logo=open-source-initiative)](https://github.com/CogitatorTech/ordered/blob/main/LICENSE) A sorted collection library for Zig From b1f1ddabdd766d9dea11d507e882f10ca7ff282b Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Thu, 5 Nov 2026 14:04:04 +0100 Subject: [PATCH 2/4] WIP --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d36a740..f0db79c 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,8 @@ Check out the [examples](examples) directory for example usages of Ordered. ### Benchmarks -Check out the [benchmarks](benches) directory for local benchmarks. +Check out the [benchmarks](https://cogitatortech.github.io/benchmarks-ordered) directory for benchmark results comparing implementations in +Ordered with implementations in other languages like C, C++, Rust, and Java. --- From 91369f5e26fc6949f59476a0b4cbb02c27ddb561 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Thu, 5 Nov 2026 18:25:45 +0100 Subject: [PATCH 3/4] Apply a bunch of optimizations (based on the benchmark results with different libraries) --- src/ordered/btree_map.zig | 186 ++++++++++++++--------------- src/ordered/cartesian_tree_map.zig | 142 +++++++++------------- src/ordered/red_black_tree_set.zig | 66 ++++++---- src/ordered/skip_list_map.zig | 43 +++++-- uv.lock | 30 ++--- 5 files changed, 238 insertions(+), 229 deletions(-) diff --git a/src/ordered/btree_map.zig b/src/ordered/btree_map.zig index aa8fcd6..2daee4d 100644 --- a/src/ordered/btree_map.zig +++ b/src/ordered/btree_map.zig @@ -149,13 +149,12 @@ pub fn BTreeMap( pub fn get(self: *const Self, key: K) ?*const V { var current = self.root; while (current) |node| { - const res = std.sort.binarySearch(K, node.keys[0..node.len], key, compareFn); - if (res) |index| return &node.values[index]; + const index = std.sort.lowerBound(K, node.keys[0..node.len], key, compareFn); + if (index < node.len and compare(key, node.keys[index]) == .eq) return &node.values[index]; if (node.is_leaf) return null; - const insertion_point = std.sort.lowerBound(K, node.keys[0..node.len], key, compareFn); - current = node.children[insertion_point]; + current = node.children[index]; } return null; } @@ -176,13 +175,12 @@ pub fn BTreeMap( pub fn getPtr(self: *Self, key: K) ?*V { var current = self.root; while (current) |node| { - const res = std.sort.binarySearch(K, node.keys[0..node.len], key, compareFn); - if (res) |index| return &node.values[index]; + const index = std.sort.lowerBound(K, node.keys[0..node.len], key, compareFn); + if (index < node.len and compare(key, node.keys[index]) == .eq) return &node.values[index]; if (node.is_leaf) return null; - const insertion_point = std.sort.lowerBound(K, node.keys[0..node.len], key, compareFn); - current = node.children[insertion_point]; + current = node.children[index]; } return null; } @@ -279,38 +277,22 @@ pub fn BTreeMap( fn insertNonFull(self: *Self, node: *Node, key: K, value: V) !bool { var i = node.len; + while (i > 0 and compare(key, node.keys[i - 1]) == .lt) : (i -= 1) {} + if (i > 0 and compare(key, node.keys[i - 1]) == .eq) { + node.values[i - 1] = value; + return false; + } if (node.is_leaf) { - // Check if key already exists - var j: u16 = 0; - while (j < node.len) : (j += 1) { - if (compare(key, node.keys[j]) == .eq) { - // Update existing value - node.values[j] = value; - return false; // Not a new insertion - } - } - - // Insert new key - while (i > 0 and compare(key, node.keys[i - 1]) == .lt) : (i -= 1) { - node.keys[i] = node.keys[i - 1]; - node.values[i] = node.values[i - 1]; + var j = node.len; + while (j > i) : (j -= 1) { + node.keys[j] = node.keys[j - 1]; + node.values[j] = node.values[j - 1]; } node.keys[i] = key; node.values[i] = value; node.len += 1; - return true; // New insertion + return true; } else { - // Check if key exists in current node - var j: u16 = 0; - while (j < node.len) : (j += 1) { - if (compare(key, node.keys[j]) == .eq) { - // Update existing value - node.values[j] = value; - return false; // Not a new insertion - } - } - - while (i > 0 and compare(key, node.keys[i - 1]) == .lt) : (i -= 1) {} if (node.children[i].?.len == BRANCHING_FACTOR - 1) { try self.splitChild(node, i); // The split promotes a median key into this node at index `i`. @@ -356,11 +338,11 @@ pub fn BTreeMap( } fn deleteFromNode(self: *Self, node: *Node, key: K) ?V { - const res = std.sort.binarySearch(K, node.keys[0..node.len], key, compareFn); + const position = std.sort.lowerBound(K, node.keys[0..node.len], key, compareFn); var val: ?V = null; - if (res) |index_usize| { - const index = @as(u16, @intCast(index_usize)); + if (position < node.len and compare(key, node.keys[position]) == .eq) { + const index: u16 = @intCast(position); val = node.values[index]; self.len -= 1; if (node.is_leaf) { @@ -369,7 +351,7 @@ pub fn BTreeMap( self.removeFromInternal(node, index); } } else if (!node.is_leaf) { - const insertion_point = std.sort.lowerBound(K, node.keys[0..node.len], key, compareFn); + const insertion_point = position; const key_exists_in_child = self.ensureChildHasEnoughKeys(node, @as(u16, @intCast(insertion_point))); if (key_exists_in_child) { return self.deleteFromNode(node, key); @@ -537,6 +519,8 @@ pub fn BTreeMap( pub const Iterator = struct { stack: std.ArrayList(StackFrame), allocator: std.mem.Allocator, + leaf: ?*Node = null, + leaf_index: u16 = 0, const StackFrame = struct { node: *Node, @@ -549,29 +533,20 @@ pub fn BTreeMap( }; fn init(allocator: std.mem.Allocator, root: ?*Node) !Iterator { - var stack: std.ArrayList(StackFrame) = .empty; - // If any append below fails after the first, the local - // `stack` goes out of scope without being moved into the - // returned Iterator; its heap buffer would leak without - // this errdefer. - errdefer stack.deinit(allocator); - - if (root) |r| { - try stack.append(allocator, StackFrame{ .node = r, .index = 0 }); - // Descend to leftmost leaf - var current = r; - while (!current.is_leaf) { - if (current.children[0]) |child| { - try stack.append(allocator, StackFrame{ .node = child, .index = 0 }); - current = child; - } else break; - } - } + var it = Iterator{ .stack = .empty, .allocator = allocator }; + errdefer it.deinit(); + if (root) |node| try it.pushLeft(node); + return it; + } - return Iterator{ - .stack = stack, - .allocator = allocator, - }; + fn pushLeft(self: *Iterator, root: *Node) !void { + var node = root; + while (!node.is_leaf) { + try self.stack.append(self.allocator, .{ .node = node, .index = 0 }); + node = node.children[0].?; + } + self.leaf = node; + self.leaf_index = 0; } pub fn deinit(self: *Iterator) void { @@ -579,43 +554,25 @@ pub fn BTreeMap( } pub fn next(self: *Iterator) !?Entry { + if (self.leaf) |leaf| { + if (self.leaf_index < leaf.len) { + const index = self.leaf_index; + self.leaf_index += 1; + return .{ .key = leaf.keys[index], .value = leaf.values[index] }; + } + self.leaf = null; + } while (self.stack.items.len > 0) { - var frame = &self.stack.items[self.stack.items.len - 1]; - + const frame = &self.stack.items[self.stack.items.len - 1]; if (frame.index < frame.node.len) { - const result = Entry{ - .key = frame.node.keys[frame.index], - .value = frame.node.values[frame.index], - }; - - // Move to next position - if (!frame.node.is_leaf) { - // Go to right child of current key - if (frame.node.children[frame.index + 1]) |child| { - frame.index += 1; - try self.stack.append(self.allocator, StackFrame{ .node = child, .index = 0 }); - - // Descend to leftmost leaf - var current = child; - while (!current.is_leaf) { - if (current.children[0]) |left_child| { - try self.stack.append(self.allocator, StackFrame{ .node = left_child, .index = 0 }); - current = left_child; - } else break; - } - } else { - frame.index += 1; - } - } else { - frame.index += 1; - } - - return result; - } else { - _ = self.stack.pop(); + const node = frame.node; + const index = frame.index; + frame.index += 1; + try self.pushLeft(node.children[index + 1].?); + return .{ .key = node.keys[index], .value = node.values[index] }; } + _ = self.stack.pop(); } - return null; } }; @@ -967,3 +924,46 @@ test "regression: BTreeMap put of a split median does not duplicate the key" { } try std.testing.expectEqual(@as(usize, 7), n); } + +test "BTreeMap: search boundaries and leaf iteration after removal" { + var map = BTreeMap(i32, i32, i32Compare, 16).init(std.testing.allocator); + defer map.deinit(); + var key: i32 = 510; + while (key >= 0) : (key -= 2) try map.put(key, key); + key = 0; + while (key < 512) : (key += 2) { + try std.testing.expectEqual(key, map.get(key).?.*); + map.getPtr(key).?.* += 1; + try std.testing.expect(map.get(key + 1) == null); + try std.testing.expect(map.getPtr(key + 1) == null); + try std.testing.expect(map.remove(key + 1) == null); + } + try std.testing.expect(map.get(-1) == null); + try std.testing.expect(map.get(512) == null); + key = 0; + while (key < 512) : (key += 4) try std.testing.expectEqual(key + 1, map.remove(key).?); + var it = try map.iterator(); + defer it.deinit(); + key = 2; + while (try it.next()) |entry| : (key += 4) { + try std.testing.expectEqual(key, entry.key); + try std.testing.expectEqual(key + 1, entry.value); + } + try std.testing.expectEqual(@as(i32, 514), key); + try std.testing.expect(try it.next() == null); +} + +fn iteratorAllocationCheck(allocator: std.mem.Allocator) !void { + var map = BTreeMap(i32, i32, i32Compare, 4).init(std.testing.allocator); + defer map.deinit(); + for (0..1024) |key| try map.put(@intCast(key), @intCast(key)); + var it = try @TypeOf(map).Iterator.init(allocator, map.root); + defer it.deinit(); + var count: usize = 0; + while (try it.next()) |entry| : (count += 1) try std.testing.expectEqual(@as(i32, @intCast(count)), entry.key); + try std.testing.expectEqual(@as(usize, 1024), count); +} + +test "BTreeMap: iterator allocation failures release the stack" { + try std.testing.checkAllAllocationFailures(std.testing.allocator, iteratorAllocationCheck, .{}); +} diff --git a/src/ordered/cartesian_tree_map.zig b/src/ordered/cartesian_tree_map.zig index 9501f10..c24ab27 100644 --- a/src/ordered/cartesian_tree_map.zig +++ b/src/ordered/cartesian_tree_map.zig @@ -118,13 +118,7 @@ pub fn CartesianTreeMap( /// ## Errors /// Returns `error.OutOfMemory` if node allocation fails. pub fn put(self: *Self, key: K, value: V) !void { - // A value-only update keeps the existing priority: re-randomising it - // on every update would churn the tree structure for no benefit. - if (self.findNode(key)) |existing| { - existing.value = value; - return; - } - try self.insertNew(key, value, self.prng.random().int(u32)); + self.root = try self.insertNode(self.root, key, value, null); } /// Inserts a key-value pair with an explicit priority. @@ -148,93 +142,39 @@ pub fn CartesianTreeMap( if (self.contains(key)) { _ = self.remove(key); } - try self.insertNew(key, value, priority); - } - - /// Inserts a key known not to be present. Callers must ensure the key is - /// absent so the insertion never produces a duplicate. - fn insertNew(self: *Self, key: K, value: V, priority: u32) !void { - const new_node = try self.allocator.create(Node); - new_node.* = Node.init(key, value, priority); - - if (self.root == null) { - self.root = new_node; - self.len += 1; - return; - } - - self.root = self.insertNode(self.root, new_node); - } - - fn findNode(self: *Self, key: K) ?*Node { - var current = self.root; - while (current) |node| { - switch (compare(key, node.key)) { - .eq => return node, - .lt => current = node.left, - .gt => current = node.right, - } - } - return null; + self.root = try self.insertNode(self.root, key, value, priority); } - fn insertNode(self: *Self, root: ?*Node, new_node: *Node) ?*Node { - if (root == null) { + fn insertNode(self: *Self, root: ?*Node, key: K, value: V, priority: ?u32) Allocator.Error!*Node { + const node = root orelse { + const new_node = try self.allocator.create(Node); + new_node.* = Node.init(key, value, priority orelse self.prng.random().int(u32)); self.len += 1; return new_node; - } - - const node = root.?; - const key_cmp = compare(new_node.key, node.key); - - if (key_cmp == .eq) { - // Replace existing value - node.value = new_node.value; - node.priority = new_node.priority; - self.allocator.destroy(new_node); - return root; - } - - if (new_node.priority > node.priority) { - // New node becomes root, split current tree - const split_result = self.split(root, new_node.key); - new_node.left = split_result.left; - new_node.right = split_result.right; - self.len += 1; - return new_node; - } - - if (key_cmp == .lt) { - node.left = self.insertNode(node.left, new_node); - } else { - node.right = self.insertNode(node.right, new_node); - } - - return root; - } - - const SplitResult = struct { - left: ?*Node, - right: ?*Node, - }; - - fn split(self: *Self, root: ?*Node, key: K) SplitResult { - if (root == null) { - return SplitResult{ .left = null, .right = null }; - } - - const node = root.?; - const key_cmp = compare(key, node.key); + }; - if (key_cmp == .lt) { - const split_result = self.split(node.left, key); - node.left = split_result.right; - return SplitResult{ .left = split_result.left, .right = node }; - } else { - const split_result = self.split(node.right, key); - node.right = split_result.left; - return SplitResult{ .left = node, .right = split_result.right }; + switch (compare(key, node.key)) { + .eq => node.value = value, + .lt => { + const child = try self.insertNode(node.left, key, value, priority); + node.left = child; + if (child.priority > node.priority) { + node.left = child.right; + child.right = node; + return child; + } + }, + .gt => { + const child = try self.insertNode(node.right, key, value, priority); + node.right = child; + if (child.priority > node.priority) { + node.right = child.left; + child.left = node; + return child; + } + }, } + return node; } /// Retrieves the value associated with the given key. @@ -764,3 +704,29 @@ test "regression: CartesianTreeMap update with higher priority does not duplicat try testing.expectEqual(@as(usize, 2), n); try expectTreapInvariants(tree.root); } + +test "CartesianTreeMap: updates and failed insertions preserve existing nodes" { + var failing = testing.FailingAllocator.init(testing.allocator, .{}); + var tree = TreapI32.init(failing.allocator()); + defer tree.deinit(); + try tree.putWithPriority(10, 100, 100); + try tree.putWithPriority(5, 50, 50); + try tree.putWithPriority(15, 150, 50); + const root = tree.root.?; + const left = root.left.?; + const right = root.right.?; + failing.fail_index = failing.alloc_index; + try tree.put(5, 55); + try tree.put(15, 155); + try testing.expectEqual(@as(i32, 55), left.value); + try testing.expectEqual(@as(i32, 155), right.value); + try testing.expectError(error.OutOfMemory, tree.put(7, 70)); + try testing.expectError(error.OutOfMemory, tree.put(17, 170)); + try testing.expectEqual(@as(usize, 3), tree.count()); + try testing.expectEqual(root, tree.root.?); + try testing.expectEqual(left, root.left.?); + try testing.expectEqual(right, root.right.?); + try testing.expectEqual(@as(u32, 50), left.priority); + try testing.expectEqual(@as(u32, 50), right.priority); + try expectTreapInvariants(tree.root); +} diff --git a/src/ordered/red_black_tree_set.zig b/src/ordered/red_black_tree_set.zig index 0a8a130..9008194 100644 --- a/src/ordered/red_black_tree_set.zig +++ b/src/ordered/red_black_tree_set.zig @@ -132,10 +132,20 @@ pub fn RedBlackTreeSet( /// ## Errors /// Returns `error.OutOfMemory` if node allocation fails. pub fn put(self: *Self, data: T) !void { - // Check if key already exists first to avoid unnecessary allocation - if (self.getNode(data)) |existing| { - existing.data = data; - return; + var current = self.root; + var parent: ?*Node = null; + var order: std.math.Order = .eq; + while (current) |node| { + parent = node; + order = compare(data, node.data); + switch (order) { + .eq => { + node.data = data; + return; + }, + .lt => current = node.left, + .gt => current = node.right, + } } const new_node = try self.allocator.create(Node); @@ -144,7 +154,7 @@ pub fn RedBlackTreeSet( .color = .red, // New nodes are always red .left = null, .right = null, - .parent = null, + .parent = parent, }; if (self.root == null) { @@ -154,21 +164,7 @@ pub fn RedBlackTreeSet( return; } - // Standard BST insertion - var current = self.root; - var parent: ?*Node = null; - - while (current != null) { - parent = current; - if (compare(data, current.?.data) == .lt) { - current = current.?.left; - } else { - current = current.?.right; - } - } - - new_node.parent = parent; - if (compare(data, parent.?.data) == .lt) { + if (order == .lt) { parent.?.left = new_node; } else { parent.?.right = new_node; @@ -878,3 +874,33 @@ test "regression: RedBlackTreeSet deletion preserves red-black invariants" { } try std.testing.expectEqual(@as(usize, 0), tree.count()); } + +test "RedBlackTreeSet: updates do not allocate and failed insertion preserves values" { + const Item = struct { + key: i32, + value: i32, + + fn compare(a: @This(), b: @This()) std.math.Order { + return std.math.order(a.key, b.key); + } + }; + var failing = std.testing.FailingAllocator.init(std.testing.allocator, .{}); + var tree = RedBlackTreeSet(Item, Item.compare).init(failing.allocator()); + defer tree.deinit(); + for (0..64) |key| try tree.put(.{ .key = @intCast(key), .value = 0 }); + failing.fail_index = failing.alloc_index; + for (0..64) |key| try tree.put(.{ .key = @intCast(key), .value = @intCast(key + 1) }); + try std.testing.expectError(error.OutOfMemory, tree.put(.{ .key = 64, .value = 0 })); + try std.testing.expectEqual(@as(usize, 64), tree.count()); + for (0..32) |key| _ = tree.remove(.{ .key = @intCast(key * 2), .value = 0 }); + failing.fail_index = std.math.maxInt(usize); + var it = try tree.iterator(); + defer it.deinit(); + var key: i32 = 1; + while (try it.next()) |item| : (key += 2) { + try std.testing.expectEqual(key, item.key); + try std.testing.expectEqual(key + 1, item.value); + } + try std.testing.expectEqual(@as(i32, 65), key); + try std.testing.expect(try it.next() == null); +} diff --git a/src/ordered/skip_list_map.zig b/src/ordered/skip_list_map.zig index 6fee965..d4046e4 100644 --- a/src/ordered/skip_list_map.zig +++ b/src/ordered/skip_list_map.zig @@ -49,18 +49,20 @@ pub fn SkipListMap( forward: []?*Node, fn init(allocator: std.mem.Allocator, key: K, value: V, level: u8) !*Node { - const node = try allocator.create(Node); - errdefer allocator.destroy(node); + const bytes = try allocator.alignedAlloc(u8, .of(Node), @sizeOf(Node) + @sizeOf(?*Node) * (@as(usize, level) + 1)); + const node: *Node = @ptrCast(bytes.ptr); node.key = key; node.value = value; - node.forward = try allocator.alloc(?*Node, level + 1); + const forward: [*]?*Node = @ptrCast(@alignCast(bytes.ptr + @sizeOf(Node))); + node.forward = forward[0 .. @as(usize, level) + 1]; @memset(node.forward, null); return node; } fn deinit(self: *Node, allocator: std.mem.Allocator) void { - allocator.free(self.forward); - allocator.destroy(self); + const size = @sizeOf(Node) + @sizeOf(?*Node) * self.forward.len; + const bytes: [*]align(@alignOf(Node)) u8 = @ptrCast(self); + allocator.free(bytes[0..size]); } }; @@ -82,12 +84,7 @@ pub fn SkipListMap( /// ## Errors /// Returns `error.OutOfMemory` if allocation fails. pub fn init(allocator: std.mem.Allocator) !Self { - const header = try allocator.create(Node); - errdefer allocator.destroy(header); - header.key = undefined; - header.value = undefined; - header.forward = try allocator.alloc(?*Node, MAX_LEVEL); - @memset(header.forward, null); + const header = try Node.init(allocator, undefined, undefined, MAX_LEVEL - 1); // Seed from a stack-address-derived hash. ASLR makes this differ // across process runs, which is enough randomness for skip-list @@ -108,8 +105,7 @@ pub fn SkipListMap( pub fn deinit(self: *Self) void { self.clear(); - self.allocator.free(self.header.forward); - self.allocator.destroy(self.header); + self.header.deinit(self.allocator); self.* = undefined; } @@ -578,3 +574,24 @@ fn allocationFailureCheck(allocator: std.mem.Allocator) !void { test "SkipListMap: allocation failures release partial nodes" { try std.testing.checkAllAllocationFailures(std.testing.allocator, allocationFailureCheck, .{}); } + +test "SkipListMap: one allocation per node with aligned values" { + const Value = struct { number: u8 align(64) }; + inline for (.{ 1, 32 }) |max_level| { + var counting = std.testing.FailingAllocator.init(std.testing.allocator, .{}); + var list = try SkipListMap(i32, Value, i32Compare, max_level).init(counting.allocator()); + defer list.deinit(); + try std.testing.expectEqual(@as(usize, 1), counting.allocations); + for (0..32) |key| try list.put(@intCast(key), .{ .number = @intCast(key) }); + try std.testing.expectEqual(@as(usize, 33), counting.allocations); + for (0..32) |key| { + const value = list.getPtr(@intCast(key)).?; + try std.testing.expectEqual(@as(usize, 0), @intFromPtr(value) % 64); + try std.testing.expectEqual(@as(u8, @intCast(key)), list.remove(@intCast(key)).?.number); + } + try std.testing.expectEqual(@as(usize, 32), counting.deallocations); + try list.put(1, .{ .number = 1 }); + list.clear(); + try std.testing.expectEqual(@as(usize, 33), counting.deallocations); + } +} diff --git a/uv.lock b/uv.lock index 33287fc..a8ec2c3 100644 --- a/uv.lock +++ b/uv.lock @@ -22,11 +22,11 @@ wheels = [ [[package]] name = "filelock" -version = "4.2.4" +version = "4.2.9" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d8/28/3893324bcadf8f89b1616637468d766af3f625008c0735bf704fdfa86617/filelock-4.2.4.tar.gz", hash = "sha256:c6d8663535e1650ee430507b4ffbac7b464dd64b7647ea0112a9f406499d163d", size = 652444, upload-time = "2026-10-19T01:57:51.001Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a3/1d/d730c664fcb4f1d264a722722a3134cf0881854f73c1fd58abf87572f232/filelock-4.2.9.tar.gz", hash = "sha256:96530b7c538d4ea08493ab067247aab7948c54d8cd622cce711c97cccc5d9896", size = 663116, upload-time = "2026-11-04T18:37:10.014Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e0/1b/5e74289a1878e666bb4b65fe5805a04cafcac2aa5f519ef1ead67ef91c56/filelock-4.2.4-py3-none-any.whl", hash = "sha256:301241438c57936ef93f4243a94f2559022268bfcf9b375a9a72eb0f8db8358e", size = 162475, upload-time = "2026-10-19T01:57:49.419Z" }, + { url = "https://files.pythonhosted.org/packages/00/05/76184fe08339723d643ab47887a8e4de8f2921ca4e008617ab7490af7857/filelock-4.2.9-py3-none-any.whl", hash = "sha256:a379c50a729e5b68c8519a4d26489f755d9769960a236ecd838190e2a78db2e9", size = 164734, upload-time = "2026-11-04T18:37:08.273Z" }, ] [[package]] @@ -40,11 +40,11 @@ wheels = [ [[package]] name = "nodeenv" -version = "1.11.0" +version = "1.12.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/105de02c1322cfada6d9710d9146ef8026419d433c9d08359a2d35805811/nodeenv-1.11.0.tar.gz", hash = "sha256:3ce8fe5b71d16e8af7039ca65257354100bc772965d6bc549070649e53b1b146", size = 99301, upload-time = "2026-09-26T11:29:21.367Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e6/99/d27cfc9518f49e4cbc25c683ec7cf8704a9d31311341c291c0e78ddf791b/nodeenv-1.12.0.tar.gz", hash = "sha256:4ea7f88339310afebc3253f2c7a91b94bacf97d73a36a5c108962abdfaca501e", size = 131292, upload-time = "2026-10-31T19:03:18.847Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/54/c8/12811c9b48fde162bb72b6f2e78fada9a247a09d7bb5be2050a5d099c77b/nodeenv-1.11.0-py2.py3-none-any.whl", hash = "sha256:edaa16e6c14d7cf395d75d4bbd5a26390f4dc06501a33b4e76282b02cc688a25", size = 34277, upload-time = "2026-09-26T11:29:19.933Z" }, + { url = "https://files.pythonhosted.org/packages/2d/6a/8a9ac7d5e2f7cf53c459bfef90ebc17a2f8cd54b665af96799d4c534840e/nodeenv-1.12.0-py3-none-any.whl", hash = "sha256:80644d65c10cc2be12e3e4b54b3367ff288c7ad24ae75c2dcc65454fc7449d4d", size = 39442, upload-time = "2026-10-31T19:03:17.427Z" }, ] [[package]] @@ -73,11 +73,11 @@ wheels = [ [[package]] name = "platformdirs" -version = "4.13.5" +version = "4.14.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/58/e6/d0abbb256b44e6a05748c6942511ff67db8dbb068de0c35b24bf1b395b09/platformdirs-4.13.5.tar.gz", hash = "sha256:05831adf87d392760f4b5c3a0a95579ab5a10b18b9b9bd43680dcb47544788a0", size = 62362, upload-time = "2026-10-19T01:02:11.778Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/9a/8475be631fb33ca1466915e70fd594c42a4e84b512db650eaa14f90fe75d/platformdirs-4.14.5.tar.gz", hash = "sha256:32e9921db7385aa8169bee4fe9501923e5715ba9fb7ea3b9c69b0d8e0639f7a1", size = 71464, upload-time = "2026-11-04T16:54:50.358Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/6c/8a/1d8cb3842909dc193a73835adedf412e32e18f8ffd59f43983949622fe6f/platformdirs-4.13.5-py3-none-any.whl", hash = "sha256:53d3ec4280b815c1e0b02edad7f9ee8fda1ba9c0865dd9c2e6e63849ce82fc1e", size = 32779, upload-time = "2026-10-19T01:02:10.17Z" }, + { url = "https://files.pythonhosted.org/packages/7c/ae/ecbbbfd0e4343a6a521d49b3c8656fb4643dee2a4f6eaf941cf3280391a8/platformdirs-4.14.5-py3-none-any.whl", hash = "sha256:8e778c6fa421516f4d3369449f8df3b0e1b72c0e0005fe88e3ec772d0a14e750", size = 35402, upload-time = "2026-11-04T16:54:48.875Z" }, ] [[package]] @@ -98,14 +98,14 @@ wheels = [ [[package]] name = "python-discovery" -version = "1.6.4" +version = "1.9.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "filelock" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f3/ee/cf608372c88ce2c136ee13c69ab6f667dbc0d0c1176af188b4ddc8853e66/python_discovery-1.6.4.tar.gz", hash = "sha256:bc70d31f0ec5de11eda13d4d64c16e24b3506a65984684f2b6c98cb83b2ea9df", size = 89883, upload-time = "2026-10-19T01:45:14.855Z" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/d7/1e94df7d1636bf00b9f261bf88a4adc0414f14931ff60511eb0f34c250d1/python_discovery-1.9.4.tar.gz", hash = "sha256:c01b45fe515c1d268b57c57d554bb0e1d320b8e9eb5490bb2f4f577be26e4380", size = 140385, upload-time = "2026-11-04T05:25:52.097Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/60/91/1aa70d3dfcab0dbcf88a2cbc3bce7f7c69562287a90216e617eaa4937e25/python_discovery-1.6.4-py3-none-any.whl", hash = "sha256:530179cc51a1816d512b15635b3dc931295ae12efb183783ad31190a5d425d2b", size = 39385, upload-time = "2026-10-19T01:45:13.668Z" }, + { url = "https://files.pythonhosted.org/packages/c5/44/b248f3b1a23f44d8de172e2767748082c41cbd9353009af72f4b11b00afa/python_discovery-1.9.4-py3-none-any.whl", hash = "sha256:b468f365040b40f4cb39918b0766d3e5a2f340968e07df752fbc96f1bb4641ab", size = 44220, upload-time = "2026-11-04T05:25:50.514Z" }, ] [[package]] @@ -145,7 +145,7 @@ wheels = [ [[package]] name = "virtualenv" -version = "21.14.13" +version = "21.15.5" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "distlib" }, @@ -154,7 +154,7 @@ dependencies = [ { name = "platformdirs" }, { name = "python-discovery" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/70/aa/bff50daee0488e16d611258a9b6c5a1d0c9e128f8ca424e9f4e1c0444ef2/virtualenv-21.14.13.tar.gz", hash = "sha256:de5307ba4b9a0001d9c8ea02832d38f63ca432880f416c1bface61c4323fd905", size = 5570301, upload-time = "2026-10-22T20:10:16.952Z" } +sdist = { url = "https://files.pythonhosted.org/packages/69/74/745e612b69ad14a534b7bc233c4574b968eb2c21a276ea172e8f0fc13f51/virtualenv-21.15.5.tar.gz", hash = "sha256:fb869ea32930530ccc87549877b53268c2a4d4a7d7f2c384042eca05170350e6", size = 5639868, upload-time = "2026-11-04T05:13:20.929Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/bb/a9/c10d8a44a29fb94a18b43fdf11f38caca53ae7c9406f11a72b1cb8f624f1/virtualenv-21.14.13-py3-none-any.whl", hash = "sha256:5fbb04138a4861580b78ba9110d529a26bc48fcc93c8ec36bc0202eeed96a788", size = 5557094, upload-time = "2026-10-22T20:10:15.096Z" }, + { url = "https://files.pythonhosted.org/packages/9d/d6/f9ac78f115e32e0d76adda9db72b74425b86495ae274cd7b58c660f5d1c1/virtualenv-21.15.5-py3-none-any.whl", hash = "sha256:bcf98c32139cf3df7f0cc2c8c48ca150645c20e66f8c4fe6c1e5e40bcae73947", size = 5680750, upload-time = "2026-11-04T05:13:19.057Z" }, ] From c364b13cdc4c072640667479790b6a5a2afa9349 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Thu, 5 Nov 2026 18:28:28 +0100 Subject: [PATCH 4/4] Set the version to `0.3.2` --- build.zig.zon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.zig.zon b/build.zig.zon index bff4f67..60bbe19 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,6 +1,6 @@ .{ .name = .ordered, - .version = "0.3.1", + .version = "0.3.2", .fingerprint = 0xc3121f99b0352e1b, // Changing this has security and trust implications. .minimum_zig_version = "0.17.0", .paths = .{