summaryrefslogtreecommitdiff
path: root/src/source_manifest.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/source_manifest.zig')
-rw-r--r--src/source_manifest.zig13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/source_manifest.zig b/src/source_manifest.zig
index 5de560ac..e2cc312c 100644
--- a/src/source_manifest.zig
+++ b/src/source_manifest.zig
@@ -15,9 +15,20 @@
//! Paths are as a user would type them, repo-root-relative, which is what
//! `look` resolves a click against.
+//! ON THE P4 the allowlist is EMPTY, and that is the whole difference: the
+//! table is ~0.95 MiB of rodata against a 1.5 MiB flash partition, and the
+//! firmware's filesystem is the serial host's, reached through the Host
+//! vtable. The API is unchanged — `all` is a zero-length array and `find`
+//! answers null — so every caller compiles identically and simply finds
+//! nothing embedded.
+
pub const Source = struct { path: []const u8, contents: []const u8 };
-pub const all = [_]Source{
+/// A slice, not an array: the P4 table is empty and every consumer only ever
+/// iterates or takes `.len`.
+pub const all: []const Source = if (@import("pardes_config").platform == .p4) &.{} else &allowlist;
+
+const allowlist = [_]Source{
.{ .path = "build.zig", .contents = @embedFile("root-build.zig") },
.{ .path = "build.zig.zon", .contents = @embedFile("root-build.zig.zon") },
.{ .path = "src/pardes.zig", .contents = @embedFile("pardes.zig") },