Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Standard Library Reference

Cross-target helpers live under std::. Bare calls such as min(a, b) or sha256(data) are rejected (V49) — use the qualified forms.

Authoritative tables also live in cambrian-lang docs/STDLIB.md.

std::math

FunctionRole
min, max, minmaxOrdering
abs, signSign
clampRange clamp
muldiv, muldivmodWidening multiply-then-divide
divmod, divc, divrDivision variants
modpow2, powPowers

std::str

FunctionRole
parse_u64 / parse_u8 / parse_i64 / parse_uint / parse_intString → Option<T>
formatFormat string

String ↔ number conversion is never implicit (V50): use parse_* / format.

match std::str::parse_u64(s, 10) {
    some(n) => n,
    none => 0,
}

std::crypto

FunctionRole
sha256Hash bytes / string → digest
NamespaceDocs
msg::Message Context
sys::System Context
evm::EVM Intrinsics