Skip to content

Commit 9ed7688

Browse files
hyperpolymathclaude
andcommitted
fix(ffi): add missing build.zig for 35 cartridges; stubs for claude-ai+toolchain
35 cartridges had bare .zig FFI files but no build.zig, so the container build loop skipped them and the V adapter linker would fail. Generated build.zig for all 33 with existing .zig files. Added stub FFI + build.zig for claude-ai-mcp and toolchain-mcp (had empty ffi/ dirs). All 99 cartridges now have complete Zig FFI build infrastructure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a183509 commit 9ed7688

File tree

37 files changed

+1078
-0
lines changed

37 files changed

+1078
-0
lines changed

cartridges/aerie-mcp/ffi/build.zig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
4+
const std = @import("std");
5+
6+
pub fn build(b: *std.Build) void {
7+
const target = b.standardTargetOptions(.{});
8+
const optimize = b.standardOptimizeOption(.{});
9+
10+
const ffi_mod = b.addModule("aerie_mcp", .{
11+
.root_source_file = b.path("aerie_ffi.zig"),
12+
.target = target,
13+
.optimize = optimize,
14+
});
15+
16+
const lib = b.addLibrary(.{
17+
.name = "aerie_mcp",
18+
.root_module = ffi_mod,
19+
.linkage = .dynamic,
20+
});
21+
lib.linkLibC();
22+
b.installArtifact(lib);
23+
24+
const tests = b.addTest(.{ .root_module = ffi_mod });
25+
tests.linkLibC();
26+
const run_tests = b.addRunArtifact(tests);
27+
const test_step = b.step("test", "Run FFI tests");
28+
test_step.dependOn(&run_tests.step);
29+
}
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
4+
const std = @import("std");
5+
6+
pub fn build(b: *std.Build) void {
7+
const target = b.standardTargetOptions(.{});
8+
const optimize = b.standardOptimizeOption(.{});
9+
10+
const ffi_mod = b.addModule("affinescript_mcp", .{
11+
.root_source_file = b.path("affinescript_mcp_ffi.zig"),
12+
.target = target,
13+
.optimize = optimize,
14+
});
15+
16+
const lib = b.addLibrary(.{
17+
.name = "affinescript_mcp",
18+
.root_module = ffi_mod,
19+
.linkage = .dynamic,
20+
});
21+
lib.linkLibC();
22+
b.installArtifact(lib);
23+
24+
const tests = b.addTest(.{ .root_module = ffi_mod });
25+
tests.linkLibC();
26+
const run_tests = b.addRunArtifact(tests);
27+
const test_step = b.step("test", "Run FFI tests");
28+
test_step.dependOn(&run_tests.step);
29+
}
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
4+
const std = @import("std");
5+
6+
pub fn build(b: *std.Build) void {
7+
const target = b.standardTargetOptions(.{});
8+
const optimize = b.standardOptimizeOption(.{});
9+
10+
const ffi_mod = b.addModule("airtable_mcp", .{
11+
.root_source_file = b.path("airtable_mcp_ffi.zig"),
12+
.target = target,
13+
.optimize = optimize,
14+
});
15+
16+
const lib = b.addLibrary(.{
17+
.name = "airtable_mcp",
18+
.root_module = ffi_mod,
19+
.linkage = .dynamic,
20+
});
21+
lib.linkLibC();
22+
b.installArtifact(lib);
23+
24+
const tests = b.addTest(.{ .root_module = ffi_mod });
25+
tests.linkLibC();
26+
const run_tests = b.addRunArtifact(tests);
27+
const test_step = b.step("test", "Run FFI tests");
28+
test_step.dependOn(&run_tests.step);
29+
}
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
4+
const std = @import("std");
5+
6+
pub fn build(b: *std.Build) void {
7+
const target = b.standardTargetOptions(.{});
8+
const optimize = b.standardOptimizeOption(.{});
9+
10+
const ffi_mod = b.addModule("buildkite_mcp", .{
11+
.root_source_file = b.path("buildkite_mcp_ffi.zig"),
12+
.target = target,
13+
.optimize = optimize,
14+
});
15+
16+
const lib = b.addLibrary(.{
17+
.name = "buildkite_mcp",
18+
.root_module = ffi_mod,
19+
.linkage = .dynamic,
20+
});
21+
lib.linkLibC();
22+
b.installArtifact(lib);
23+
24+
const tests = b.addTest(.{ .root_module = ffi_mod });
25+
tests.linkLibC();
26+
const run_tests = b.addRunArtifact(tests);
27+
const test_step = b.step("test", "Run FFI tests");
28+
test_step.dependOn(&run_tests.step);
29+
}
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
4+
const std = @import("std");
5+
6+
pub fn build(b: *std.Build) void {
7+
const target = b.standardTargetOptions(.{});
8+
const optimize = b.standardOptimizeOption(.{});
9+
10+
const ffi_mod = b.addModule("circleci_mcp", .{
11+
.root_source_file = b.path("circleci_mcp_ffi.zig"),
12+
.target = target,
13+
.optimize = optimize,
14+
});
15+
16+
const lib = b.addLibrary(.{
17+
.name = "circleci_mcp",
18+
.root_module = ffi_mod,
19+
.linkage = .dynamic,
20+
});
21+
lib.linkLibC();
22+
b.installArtifact(lib);
23+
24+
const tests = b.addTest(.{ .root_module = ffi_mod });
25+
tests.linkLibC();
26+
const run_tests = b.addRunArtifact(tests);
27+
const test_step = b.step("test", "Run FFI tests");
28+
test_step.dependOn(&run_tests.step);
29+
}
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
4+
const std = @import("std");
5+
6+
pub fn build(b: *std.Build) void {
7+
const target = b.standardTargetOptions(.{});
8+
const optimize = b.standardOptimizeOption(.{});
9+
10+
const ffi_mod = b.addModule("civic_connect_mcp", .{
11+
.root_source_file = b.path("civic_connect_ffi.zig"),
12+
.target = target,
13+
.optimize = optimize,
14+
});
15+
16+
const lib = b.addLibrary(.{
17+
.name = "civic_connect_mcp",
18+
.root_module = ffi_mod,
19+
.linkage = .dynamic,
20+
});
21+
lib.linkLibC();
22+
b.installArtifact(lib);
23+
24+
const tests = b.addTest(.{ .root_module = ffi_mod });
25+
tests.linkLibC();
26+
const run_tests = b.addRunArtifact(tests);
27+
const test_step = b.step("test", "Run FFI tests");
28+
test_step.dependOn(&run_tests.step);
29+
}
30+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
4+
const std = @import("std");
5+
6+
pub fn build(b: *std.Build) void {
7+
const target = b.standardTargetOptions(.{});
8+
const optimize = b.standardOptimizeOption(.{});
9+
10+
const ffi_mod = b.addModule("claude_ai_mcp", .{
11+
.root_source_file = b.path("claude_ai_mcp_ffi.zig"),
12+
.target = target,
13+
.optimize = optimize,
14+
});
15+
16+
const lib = b.addLibrary(.{
17+
.name = "claude_ai_mcp",
18+
.root_module = ffi_mod,
19+
.linkage = .dynamic,
20+
});
21+
lib.linkLibC();
22+
b.installArtifact(lib);
23+
24+
const tests = b.addTest(.{ .root_module = ffi_mod });
25+
tests.linkLibC();
26+
const run_tests = b.addRunArtifact(tests);
27+
const test_step = b.step("test", "Run FFI tests");
28+
test_step.dependOn(&run_tests.step);
29+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
//
4+
// Claude AI MCP cartridge FFI — stub implementation
5+
// Full implementation uses the Anthropic API via the REST adapter layer.
6+
7+
const std = @import("std");
8+
9+
pub export fn claude_ai_mcp_version() [*:0]const u8 {
10+
return "0.1.0";
11+
}
12+
13+
pub export fn claude_ai_mcp_health() c_int {
14+
return 0;
15+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
4+
const std = @import("std");
5+
6+
pub fn build(b: *std.Build) void {
7+
const target = b.standardTargetOptions(.{});
8+
const optimize = b.standardOptimizeOption(.{});
9+
10+
const ffi_mod = b.addModule("conflow_mcp", .{
11+
.root_source_file = b.path("conflow_ffi.zig"),
12+
.target = target,
13+
.optimize = optimize,
14+
});
15+
16+
const lib = b.addLibrary(.{
17+
.name = "conflow_mcp",
18+
.root_module = ffi_mod,
19+
.linkage = .dynamic,
20+
});
21+
lib.linkLibC();
22+
b.installArtifact(lib);
23+
24+
const tests = b.addTest(.{ .root_module = ffi_mod });
25+
tests.linkLibC();
26+
const run_tests = b.addRunArtifact(tests);
27+
const test_step = b.step("test", "Run FFI tests");
28+
test_step.dependOn(&run_tests.step);
29+
}
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
4+
const std = @import("std");
5+
6+
pub fn build(b: *std.Build) void {
7+
const target = b.standardTargetOptions(.{});
8+
const optimize = b.standardOptimizeOption(.{});
9+
10+
const ffi_mod = b.addModule("dns_shield_mcp", .{
11+
.root_source_file = b.path("dns_shield_ffi.zig"),
12+
.target = target,
13+
.optimize = optimize,
14+
});
15+
16+
const lib = b.addLibrary(.{
17+
.name = "dns_shield_mcp",
18+
.root_module = ffi_mod,
19+
.linkage = .dynamic,
20+
});
21+
lib.linkLibC();
22+
b.installArtifact(lib);
23+
24+
const tests = b.addTest(.{ .root_module = ffi_mod });
25+
tests.linkLibC();
26+
const run_tests = b.addRunArtifact(tests);
27+
const test_step = b.step("test", "Run FFI tests");
28+
test_step.dependOn(&run_tests.step);
29+
}
30+

0 commit comments

Comments
 (0)