Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
cecbfce
Claude Code: Rewires the documentation generation in abi-mapper to ha…
Mar 2, 2026
d788bf2
Improves memory management strategy.
Mar 2, 2026
798b635
Claude Code: Resolves most open TODOs
Mar 2, 2026
75b452d
Fixes some bad assumptions for C compatibility
Mar 2, 2026
03406f9
Adds abi-mapper to be installed from main zig file
Mar 3, 2026
094759d
Starts adjusting website to abi-mapper DocComment type
Mar 3, 2026
98587c0
Implements rendering of new doccomment scheme
Mar 3, 2026
f951772
Adds missing code admonitions to the theme.css
Mar 3, 2026
047f3a1
Introduces LEARN admonition into code docs, fixes all references insi…
Mar 3, 2026
3680638
Codex: Implements FQN resolution of doc comment refs
Mar 3, 2026
4551176
Codex: Implements abi-mapper errors for invalid code refs.
Mar 3, 2026
d69edf6
Codex: Implements improved validation of bad references, adds proper …
Mar 3, 2026
ec4222c
Fixes all bad references in ashet.abi that are actually bad.
Mar 3, 2026
288740d
Codex: Fixes bug that field references could not be found
Mar 3, 2026
56681e8
Implements hyperlinking doc comment refs
Mar 3, 2026
17ef987
Claude Code: Implements rendering of local qualified names derived fr…
Mar 4, 2026
90107d9
Claude Code: Updates syscall renderer such that type refs to known ty…
Mar 4, 2026
ca41605
Claude Code: Fixes linking for different kind of link targets based o…
Mar 4, 2026
16c6e6d
Adds current working draft for 1.0 ABI file, to serve as a stress tes…
Mar 4, 2026
fe05822
Implements some command line usage errors for abi-parser, adds severa…
Mar 4, 2026
161b6d4
For each problem in findings.md adds a patch file that documents how …
Mar 4, 2026
0762c93
Fixes the obvious human mistakes in ashet-1.0.abi
Mar 4, 2026
6a67ab7
Removes human errors from rework/findings.md
Mar 4, 2026
d55e7b4
Improves abi-mapper a lot and fixes long-standing issues.
Mar 4, 2026
2547d28
Fixes code gen to handle new type changes.
Mar 4, 2026
8d427a3
For the decl lists, only renders the main docs and skips all other ki…
Mar 4, 2026
4edf2b1
Fixes src/abi/utility/render_zig_code.zig to properly handle zig name…
Mar 4, 2026
30e584d
Merge remote-tracking branch 'origin/master' into work/abi-mapper-imp…
Jun 15, 2026
a45b431
Codex: Introduces a tighter validation of FQN parsing.
Jun 15, 2026
a56ddd3
Fixes several bugs in the abi-mapper tool.
Jun 16, 2026
11e553b
Codex: Improves CI script with improved caching behavior.
Jun 16, 2026
c01b8d8
Fixes CI for tooling, and makes .abi files use LF line endings in git
Jun 16, 2026
ec431f8
removes ashet 1.0 abi file, as it was only for testing
Jun 16, 2026
7dd6741
Installs libgtk-3 in smoketest CI
Jun 16, 2026
074cfa6
Adds paranoia debugging option with assertions in fmt_id
Jun 16, 2026
d765ff7
Uploads .zig-cache on failure
Jun 16, 2026
87faa72
Adjusts formatting code such that it renders escape codes
Jun 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.zig text=auto eol=lf
*.abi text=auto eol=lf
43 changes: 41 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build
env:
ZIG_VERSION: "0.15.2"
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-global-cache
ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache

on:
push:
Expand Down Expand Up @@ -34,12 +35,18 @@ jobs:
with:
version: ${{ env.ZIG_VERSION }}

- name: Compute Zig package cache key
id: zig-pkg-cache-key
shell: bash
run: |
python scripts/zig_package_cache_key.py >> "$GITHUB_OUTPUT"

- name: Cache Zig package cache
uses: actions/cache@v4
Comment thread
ikskuh marked this conversation as resolved.
with:
# Zig stores downloaded packages in the p subdirectory of the global cache.
path: ${{ env.ZIG_GLOBAL_CACHE_DIR }}/p
key: zig-pkg-cache-${{ env.ZIG_VERSION }}-${{ hashFiles('**/build.zig.zon') }}
key: zig-pkg-cache-${{ env.ZIG_VERSION }}-${{ steps.zig-pkg-cache-key.outputs.key }}
restore-keys: |
zig-pkg-cache-${{ env.ZIG_VERSION }}-
enableCrossOsArchive: true
Expand All @@ -48,6 +55,16 @@ jobs:
run: |
zig build --global-cache-dir "$ZIG_GLOBAL_CACHE_DIR" ${{ matrix.platform }}

- name: Upload .zig-cache on failure
uses: actions/upload-artifact@v4
if: ${{ failure() && (matrix.os == 'windows-latest' || matrix.os == 'macos-latest') }}
with:
name: zig-cache-build-${{ matrix.os }}-${{ matrix.platform }}
path: ${{ env.ZIG_LOCAL_CACHE_DIR }}
include-hidden-files: true
if-no-files-found: warn
retention-days: 7

- name: Upload disk image
uses: actions/upload-artifact@v4
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand All @@ -73,20 +90,42 @@ jobs:
with:
version: ${{ env.ZIG_VERSION }}

- name: Compute Zig package cache key
id: zig-pkg-cache-key
shell: bash
run: |
python scripts/zig_package_cache_key.py >> "$GITHUB_OUTPUT"

- name: Cache Zig package cache
uses: actions/cache@v4
with:
# Zig stores downloaded packages in the p subdirectory of the global cache.
path: ${{ env.ZIG_GLOBAL_CACHE_DIR }}/p
key: zig-pkg-cache-${{ env.ZIG_VERSION }}-${{ hashFiles('**/build.zig.zon') }}
key: zig-pkg-cache-${{ env.ZIG_VERSION }}-${{ steps.zig-pkg-cache-key.outputs.key }}
restore-keys: |
zig-pkg-cache-${{ env.ZIG_VERSION }}-
enableCrossOsArchive: true

- name: Install Linux GUI dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev

- name: Build Tools
run: |
zig build --global-cache-dir "$ZIG_GLOBAL_CACHE_DIR" tools

- name: Upload .zig-cache on failure
uses: actions/upload-artifact@v4
if: ${{ failure() && (matrix.os == 'windows-latest' || matrix.os == 'macos-latest') }}
with:
name: zig-cache-tools-${{ matrix.os }}
path: ${{ env.ZIG_LOCAL_CACHE_DIR }}
include-hidden-files: true
if-no-files-found: warn
retention-days: 7

- name: Upload tools
uses: actions/upload-artifact@v4
with:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,18 @@ jobs:
with:
version: ${{ env.ZIG_VERSION }}

- name: Compute Zig package cache key
id: zig-pkg-cache-key
shell: bash
run: |
python scripts/zig_package_cache_key.py >> "$GITHUB_OUTPUT"

- name: Cache Zig package cache
uses: actions/cache@v4
with:
# Zig stores downloaded packages in the p subdirectory of the global cache.
path: ${{ env.ZIG_GLOBAL_CACHE_DIR }}/p
key: zig-pkg-cache-${{ env.ZIG_VERSION }}-${{ hashFiles('**/build.zig.zon') }}
key: zig-pkg-cache-${{ env.ZIG_VERSION }}-${{ steps.zig-pkg-cache-key.outputs.key }}
restore-keys: |
zig-pkg-cache-${{ env.ZIG_VERSION }}-
enableCrossOsArchive: true
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/smoketest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,26 @@ jobs:
with:
version: ${{ env.ZIG_VERSION }}

- name: Compute Zig package cache key
id: zig-pkg-cache-key
shell: bash
run: |
python scripts/zig_package_cache_key.py >> "$GITHUB_OUTPUT"

- name: Cache Zig package cache
uses: actions/cache@v4
with:
# Zig stores downloaded packages in the p subdirectory of the global cache.
path: ${{ env.ZIG_GLOBAL_CACHE_DIR }}/p
key: zig-pkg-cache-${{ env.ZIG_VERSION }}-${{ hashFiles('**/build.zig.zon') }}
key: zig-pkg-cache-${{ env.ZIG_VERSION }}-${{ steps.zig-pkg-cache-key.outputs.key }}
restore-keys: |
zig-pkg-cache-${{ env.ZIG_VERSION }}-
enableCrossOsArchive: true

- name: Install QEMU
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: qemu-system
packages: qemu-system libgtk-3-dev
version: 1.1

- name: Build ${{ matrix.platform.kernel }}
Expand Down
4 changes: 4 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ const installed_tools: []const ToolDep = &.{
.dependency = "emulator",
.artifacts = &.{ "emulator-web", "emulator" },
},
.{
.dependency = "abi_mapper",
.artifacts = &.{"abi-parser"},
},
// .{
// .dependency = "agp_tester",
// .artifacts = &.{"agp-tester"},
Expand Down
3 changes: 3 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
.agp_tester = .{
.path = "src/tools/agp-tester",
},
.abi_mapper = .{
.path = "src/tools/abi-mapper",
},
// .wikitool = .{
// .path = "src/tools/wikitool",
// },
Expand Down
49 changes: 49 additions & 0 deletions scripts/zig_package_cache_key.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env python3

import hashlib
import pathlib
import subprocess
import sys


digest = hashlib.sha256()
entries: set[str] = set()

git_files = subprocess.run(
["git", "ls-files", "-z"],
check=True,
capture_output=True,
).stdout.split(b"\0")

manifest_paths = sorted(
pathlib.Path(raw.decode("utf-8"))
for raw in git_files
if raw and (raw == b"build.zig.zon" or raw.endswith(b"/build.zig.zon"))
)

for path in manifest_paths:
print(path.as_posix(), file=sys.stderr)

for path in manifest_paths:
for line in path.read_text().splitlines():
stripped = line.strip()
if stripped.startswith("//"):
continue

for key in (".url", ".hash"):
prefix = f"{key} ="
if not stripped.startswith(prefix):
continue

_, value = stripped.split("=", 1)
value = value.strip()

assert value.startswith('"'), f"{path}: malformed {key} entry: {line!r}"
assert value.endswith('",'), f"{path}: malformed {key} entry: {line!r}"

Comment thread
ikskuh marked this conversation as resolved.
entries.add(f"{key}={value}")

for entry in sorted(entries):
digest.update(f"{entry}\n".encode("utf-8"))

print(f"key={digest.hexdigest()}")
19 changes: 18 additions & 1 deletion src/abi/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,26 @@ pub fn build(b: *std.Build) void {

const abi_tests_run = b.addRunArtifact(abi_tests_exe);
test_step.dependOn(&abi_tests_run.step);

const escaping_tests_json = abi_mapper.get_json_dump(null, b.path("tests/escaping.abi"));

for (std.enums.values(ConversionMode)) |mode| {
const escaping_tests_zig = convert_abi_file(b, render_zig_exe, escaping_tests_json, null, mode);

const escaping_tests_exe = b.addTest(.{
.root_module = b.createModule(.{
.root_source_file = escaping_tests_zig,
.target = b.graph.host,
.optimize = .Debug,
}),
});
const escaping_tests_run = b.addRunArtifact(escaping_tests_exe);
test_step.dependOn(&escaping_tests_run.step);
}
}

pub fn convert_abi_file(b: *std.Build, render: *std.Build.Step.Compile, input: std.Build.LazyPath, patch: ?std.Build.LazyPath, mode: enum { kernel, definition }) std.Build.LazyPath {
const ConversionMode = enum { kernel, definition };
pub fn convert_abi_file(b: *std.Build, render: *std.Build.Step.Compile, input: std.Build.LazyPath, patch: ?std.Build.LazyPath, mode: ConversionMode) std.Build.LazyPath {
const generate_core_abi = b.addRunArtifact(render);
generate_core_abi.addArg(@tagName(mode));
generate_core_abi.addFileArg(input);
Expand Down
Loading
Loading