BinFunction
BinFunction = (
proc) =>Promise<ExitCode>
Defined in: packages/core/src/kernel/types.ts:946
A bin is an async function that receives a ProcContext and returns an ExitCode.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ExitCode>
Remarks
Section titled “Remarks”The single contract every bin (builtin, coreutil, package, WASM adapter) satisfies.
Bins do not receive argv or env separately — both are on proc. A bin returns its
exit code; throwing is reserved for unexpected errors (the kernel logs them and exits
with code 1). For intentional non-zero exits, return exitCode(N).