Skip to content

nektro/abi-diner

Repository files navigation

abi-diner

loc license

Verify the ABI of pairs of compilers.

Inspired by https://github.com/Gankra/abi-cafe but leveraging the Zig Build System.

Built With

  • Zig 0.14.0

Supported Languages

How It Works

3 files get compiled together in roughly this form:

extern fn do_caller() void;

pub fn main() void {
    do_caller();
}

export fn do_panic() void {
    @panic("reached unreachable code");
}
extern fn do_test(a0: f16) void;
export fn do_caller() void {
    do_test(@as(f16, @bitCast(@as(u16, 64776))));
}
extern fn do_panic() void;
export fn do_test(a0: f16) void {
    if (a0 != @as(f16, @bitCast(@as(u16, 64776)))) do_panic();
}

the key part being that the latter two files are generated in various configurations of types, argument count, and language.

License

MIT

About

Verify the ABI of pairs of compilers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published