Compare commits

..

4 Commits

Author SHA1 Message Date
9deee2efd3 bump protobuf-c version to 1.5.2
Some checks failed
CI / build (macos-latest, 0.15.2) (push) Has been cancelled
CI / build (true, ubuntu-latest, 0.15.2) (push) Has been cancelled
CI / build (ubuntu-latest, master) (push) Has been cancelled
CI / build (windows-latest, 0.15.2) (push) Has been cancelled
Looking at the diff, this is mostly changes to the code generator and
not the runtime library, but it appears to have at least one fix for
the runtime library included.
2025-12-06 16:12:52 -07:00
Jan200101
fc2500abed ci: update setup-zig 2025-12-06 16:41:18 +01:00
Jan200101
04a42559c6 build: update to 0.15.2 2025-12-06 16:33:43 +01:00
788002c09c build: support 0.14.0
Unfortunately, this has irreconcilable incompatibilities with previous
versions of zig, due to the build.zig.zon schema changes. Support for
older versions has been dropped.
2025-03-05 20:31:30 -07:00
5 changed files with 25 additions and 18 deletions

View File

@@ -14,21 +14,23 @@ jobs:
strategy:
fail-fast: false
matrix:
zig-version: ["0.13.0"]
os: [ubuntu-latest, macos-latest, windows-latest]
zig-version: ["0.15.2"]
os: [macos-latest, windows-latest]
include:
- zig-version: "0.12.1"
- zig-version: "0.15.2"
os: ubuntu-latest
- zig-version: "master"
check-format: true
- zig-version: "master"
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: mlugg/setup-zig@v1
uses: mlugg/setup-zig@v2
with:
version: ${{ matrix.zig-version }}

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.zig-cache/
zig-out/

View File

@@ -6,14 +6,15 @@ pub fn build(b: *std.Build) void {
const upstream = b.dependency("protobuf_c", .{});
const lib = b.addStaticLibrary(.{
const lib = b.addLibrary(.{
.name = "protobuf_c",
.target = target,
.optimize = optimize,
.root_module = b.createModule(.{
.target = target,
.optimize = optimize,
.link_libc = true,
}),
});
lib.linkLibC();
lib.addCSourceFiles(.{
.root = upstream.path("protobuf-c"),
.files = &.{"protobuf-c.c"},

View File

@@ -1,11 +1,12 @@
.{
.name = "protobuf_c",
.version = "1.5.0",
.minimum_zig_version = "0.12.0",
.name = .protobuf_c,
.fingerprint = 0x39094F755166B308,
.version = "1.5.2",
.minimum_zig_version = "0.15.2",
.dependencies = .{
.protobuf_c = .{
.url = "git+https://github.com/protobuf-c/protobuf-c?ref=v1.5.0#8c201f6e47a53feaab773922a743091eb6c8972a",
.hash = "12205a20f38efb23d8f688ddb208047b26235608d9fde4c84ce3302ea156443c2b12",
.url = "git+https://github.com/protobuf-c/protobuf-c?ref=v1.5.2#4719fdd7760624388c2c5b9d6759eb6a47490626",
.hash = "N-V-__8AAOzKCgADWAaJ_5J9U3rotTnQCw0OBd-Qb3gL-8vW",
},
},
.paths = .{

View File

@@ -31,6 +31,7 @@ your_exe.linkLibrary(protobuf_c_dep.artifact("protobuf_c"));
## Version Support Matrix
| Refname | protobuf-c Version | Zig `0.12.x` | Zig `0.13.x` | Zig `0.14.0-dev` |
|----------|--------------------|--------------|--------------|------------------|
| `1.5.0` | `1.5.0` | ✅ | | |
| Refname | protobuf-c Version | Zig `0.14.0` | Zig `0.13.x` | Zig `0.12.x` |
|-----------|--------------------|-------------------|--------------|--------------|
| `1.5.0+1` | `1.5.0` | ✅ | | |
| `1.5.0` | `1.5.0` | (as a dependency) | ✅ | ✅ |