Skip to content

Commit

Permalink
upgraded to zig 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
David Sugar committed Jul 4, 2024
1 parent bfa5d61 commit 9cd6707
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub fn build(b: *std.Build) !void {
//lib.install();

const zbor_module = b.addModule("zbor", .{
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
Expand All @@ -34,7 +34,7 @@ pub fn build(b: *std.Build) !void {

// Creates a step for unit testing.
const lib_tests = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
Expand All @@ -44,7 +44,7 @@ pub fn build(b: *std.Build) !void {

// Creates a step for fuzz testing.
const fuzz_tests = b.addTest(.{
.root_source_file = .{ .path = "src/fuzz.zig" },
.root_source_file = b.path("src/fuzz.zig"),
.target = target,
.optimize = optimize,
});
Expand All @@ -64,7 +64,7 @@ pub fn build(b: *std.Build) !void {

const example = b.addExecutable(.{
.name = name,
.root_source_file = .{ .path = path },
.root_source_file = b.path(path),
.target = target,
.optimize = optimize,
});
Expand Down
5 changes: 2 additions & 3 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.name = "zbor",
// This is a [Semantic Version](https://semver.org/).
// In a future version of Zig it will be used for package deduplication.
.version = "0.14.0",
.version = "0.15.0",

// This field is optional.
// This is currently advisory only; Zig does not yet do anything
// with this value.
.minimum_zig_version = "0.12.0",
.minimum_zig_version = "0.13.0",

// This field is optional.
// Each dependency must either provide a `url` and `hash`, or a `path`.
Expand Down Expand Up @@ -60,4 +60,3 @@
"data",
},
}

Empty file.
Empty file added src/.zig-cache/h/timestamp
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub const packages = struct {};
pub const root_deps: []const struct { []const u8, []const u8 } = &.{};
Binary file added src/.zig-cache/z/53d8da468c12563c8ba398391b5e75e7
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/cose.zig
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ pub const Key = union(KeyTag) {

// Sign the data
const sig = try signer.finalize();
var buffer: [EcdsaP256Sha256.Signature.der_encoded_max_length]u8 = undefined;
var buffer: [EcdsaP256Sha256.Signature.der_encoded_length_max]u8 = undefined;
const der = sig.toDer(&buffer);
const mem = try allocator.alloc(u8, der.len);
@memcpy(mem, der);
Expand Down
2 changes: 1 addition & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub const ArrayBackedSlice = parser.ArrayBackedSlice;
pub const ArrayBackedSliceType = parser.ArrayBackedSliceType;

// TODO: can we somehow read this from build.zig.zon???
pub const VERSION: []const u8 = "0.14.0";
pub const VERSION: []const u8 = "0.15.0";

test "main tests" {
_ = cbor;
Expand Down

0 comments on commit 9cd6707

Please sign in to comment.