MCPcopy Index your code
hub / github.com/Gankra/abi-cafe

github.com/Gankra/abi-cafe @kdl-script-v1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release kdl-script-v1.1.0 ↗ · + Follow
606 symbols 1,342 edges 41 files 84 documented · 14%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ABI Cafe 🧩☕️❤️

Not sure if your compilers have matching ABIs? Then put them through the ultimate compatibility crucible and pair them up on a shift at The ABI Cafe! Find out if your one true pairing fastcalls for each other or are just another slowburn disaster. (Maid outfits optional but recommended.)

Quickstart

To run ABI Cafe, just checkout the repository and cargo run!

What Is This

ABI Cafe automates testing that two languages/compilers agree on their ABIs.

ABI Cafe is essentially an ABI fuzzer, which:

If they agree, great!

If they don't agree, even better, we just learned something! We then try to diagnose why they disagreed, and generate a minimized version that a human can inspect and report!

Now do this a bajillion times and suddenly we're learning a whole lot! Alternatively, you can hand-craft any type or function signature you're interested in, and explore its interoperability between different toolchains.

ABI Cafe is purely descriptive. It has no preconceived notion of what should work, and it doesn't trust any damn thing anyone says about it. We don't analyze assembly or metadata, and we'll gleefully create programs riddled with Undefined Behaviour. We're here to learn not lecture.

This design is based on a fundamental belief that ABIs exist only through sheer force of will. The spec if often "read GCC's source code", and damn if that ain't an error-prone process. Also GCC doesn't even know you exist, and you're only going to keep interoperating with them if you check and maintain your work. So here's a tool for checking and maintaining your work!

Choose Your Own Adventure

Extension points exported contracts — how you extend this code

Toolchain (Interface)
A compiler/language toolchain! [2 implementers]
src/toolchains/mod.rs

Core symbols most depended-on inside this repo

compile_string
called by 98
kdl-script/src/lib.rs
arg
called by 89
src/harness/vals.rs
span
called by 46
kdl-script/src/spanned.rs
add_indent
called by 31
src/fivemat.rs
sub_indent
called by 31
src/fivemat.rs
realize_ty
called by 21
kdl-script/src/types.rs
as_ref
called by 16
kdl-script/src/spanned.rs
next_val
called by 15
src/harness/vals.rs

Shape

Method 275
Function 179
Class 105
Enum 46
Interface 1

Languages

Rust100%

Modules by API surface

kdl-script/src/parse.rs88 symbols
kdl-script/src/tests/parse_fail.rs78 symbols
kdl-script/src/types.rs45 symbols
src/harness/vals.rs38 symbols
src/harness/report.rs35 symbols
src/log.rs27 symbols
src/toolchains/c.rs25 symbols
src/harness/test.rs22 symbols
kdl-script/src/spanned.rs20 symbols
kdl-script/src/tests/type_pass.rs19 symbols
src/toolchains/rust.rs18 symbols
src/harness/run.rs15 symbols

For agents

$ claude mcp add abi-cafe \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page