This data structure is used by the Zig language code generation and therefore must be kept in sync with the compiler implementation.

Fields

Unspecified,

This is the default Zig calling convention used when not using export on fn and no other calling convention is specified.

C,

Matches the C ABI for the target. This is the default calling convention when using export on fn and no other calling convention is specified.

Naked,

This makes a function not have any function prologue or epilogue, making the function itself uncallable in regular Zig code. This can be useful when integrating with assembly.

Async,

Functions with this calling convention are called asynchronously, as if called as async function().

Inline,

Functions with this calling convention are inlined at all call sites.

Interrupt,

x86-only.

Signal,
Stdcall,

x86-only.

Fastcall,

x86-only.

Vectorcall,

x86-only.

Thiscall,

x86-only.

APCS,

ARM Procedure Call Standard (obsolete) ARM-only.

AAPCS,

ARM Architecture Procedure Call Standard (current standard) ARM-only.

AAPCSVFP,

ARM Architecture Procedure Call Standard Vector Floating-Point ARM-only.

SysV,

x86-64-only.

Win64,

x86-64-only.

Kernel,

AMD GPU, NVPTX, or SPIR-V kernel