← All docs
printf() — internals
Compiler internals for printf(): lowering path, type checks, and runtime helpers.
printf() — internals
Where it lives
- Signature:
src/builtins/string/printf.rs - Lowering:
src/codegen/lower_inst/builtins/strings.rs:579 (lower_printf) - Function symbol:
lower_printf()
Lowering notes
- Lowers
printf(format, values...)assprintf()followed by stdout emission.
Runtime helpers
The following runtime helpers are referenced:
__rt_sprintf
Signature summary
function printf(string $format, ...$values): int
What the type checker enforces
- Arity: takes exactly 1 argument.
- Variadic: collects excess arguments into
$values.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/formatting/printf.rs(eval_builtin!) - Dispatch hooks:
direct,values - Variadic: collects excess arguments into
$values.