Skip to content

Standard Library Ref-Card

libc

distinct Errno = inline CInt;
struct DivResult
struct LongDivResult
struct TimeSpec
struct Timespec
struct Tm
fn TimeSpec Duration.to_timespec(self) @inline
fn TimeSpec NanoDuration.to_timespec(self) @inline
fn Errno errno()
fn void errno_set(Errno e)

libc @if(!env::LIBC)

fn void* calloc(usz count, usz size) @weak @extern("calloc") @nostrip
fn CFile fclose(CFile) @weak @extern("fclose") @nostrip
fn int feof(CFile stream) @weak @extern("feof") @nostrip
fn int fflush(CFile stream) @weak @extern("fflush") @nostrip
fn int fgetc(CFile stream) @weak @extern("fgetc") @nostrip
fn char* fgets(ZString str, int n, CFile stream) @weak @extern("fgets") @nostrip
fn CFile fopen(ZString filename, ZString mode) @weak @extern("fopen") @nostrip
fn int fputc(int c, CFile stream) @weak @extern("fputc") @nostrip
fn usz fread(void* ptr, usz size, usz nmemb, CFile stream) @weak @extern("fread") @nostrip
fn void* free(void*) @weak @extern("free")
fn CFile freopen(ZString filename, ZString mode, CFile stream) @weak @extern("fopen") @nostrip
fn int fseek(CFile stream, SeekIndex offset, int whence) @weak @extern("fseek") @nostrip
fn usz fwrite(void* ptr, usz size, usz nmemb, CFile stream) @weak @extern("fwrite") @nostrip
fn void longjmp(JmpBuf* buffer, CInt value) @weak @extern("longjmp") @nostrip
fn void* malloc(usz size) @weak @extern("malloc") @nostrip
fn void* memcpy(void* dest, void* src, usz n) @weak @extern("memcpy") @nostrip
fn void* memmove(void* dest, void* src, usz n) @weak @extern("memmove") @nostrip
fn void* memset(void* dest, CInt value, usz n) @weak @extern("memset") @nostrip
fn int putc(int c, CFile stream) @weak @extern("putc") @nostrip
fn int putchar(int c) @weak @extern("putchar") @nostrip
fn int puts(ZString str) @weak @extern("puts") @nostrip
fn void* realloc(void* ptr, usz size) @weak @extern("realloc") @nostrip
fn CInt setjmp(JmpBuf* buffer) @weak @extern("setjmp") @nostrip

libc @if(env::DARWIN)

struct Stat
macro CFile stderr()
macro CFile stdin()
macro CFile stdout()

libc @if(env::LIBC && !env::WIN32 && !env::LINUX && !env::DARWIN)

macro CFile stderr() { return (CFile*)(uptr)STDERR_FD; }
macro CFile stdin() { return (CFile*)(uptr)STDIN_FD; }
macro CFile stdout() { return (CFile*)(uptr)STDOUT_FD; }

libc @if(env::LINUX)

struct Stat @if(!env::X86_64)
struct Stat @if(env::X86_64)
macro usz malloc_size(void* ptr)
macro CFile stderr()
macro CFile stdin()
macro CFile stdout()

libc @if(env::POSIX)

struct Sigaction
struct Stack_t

libc @if(env::WIN32)

struct SystemInfo
macro Tm* gmtime_r(Time_t* timer, Tm* buf)
macro Tm* localtime_r(Time_t* timer, Tm* buf)
macro usz malloc_size(void* ptr)
macro isz read(Fd fd, void* buffer, usz buffer_size)
macro CInt setjmp(JmpBuf* buffer)
macro CFile stderr()
macro CFile stdin()
macro CFile stdout()
macro isz write(Fd fd, void* buffer, usz count)

libc::os

fn int errno() @if(ERRNO_DEFAULT)
macro int errno() @if(env::DARWIN)
macro int errno() @if(env::LINUX)
macro int errno() @if(env::WIN32)
fn void errno_set(int err) @if(ERRNO_DEFAULT)
macro void errno_set(int err) @if(env::DARWIN)
macro void errno_set(int err) @if(env::LINUX)
macro void errno_set(int err) @if(env::WIN32)

std::ascii

fn char char.from_hex(char c)
fn bool char.in_range(char c, char start, char len)
fn bool char.is_alnum(char c)
fn bool char.is_alpha(char c)
fn bool char.is_bdigit(char c)
fn bool char.is_blank(char c)
fn bool char.is_cntrl(char c)
fn bool char.is_digit(char c)
fn bool char.is_graph(char c)
fn bool char.is_lower(char c)
fn bool char.is_odigit(char c)
fn bool char.is_print(char c)
fn bool char.is_punct(char c)
fn bool char.is_space(char c)
fn bool char.is_upper(char c)
fn bool char.is_xdigit(char c)
fn char char.to_lower(char c)
fn char char.to_upper(char c)
fn bool in_range(char c, char start, char len)
macro bool in_range_m(c, start, len)
fn bool is_alnum(char c)
macro bool is_alnum_m(c)
fn bool is_alpha(char c)
macro bool is_alpha_m(c)
fn bool is_bdigit(char c)
macro bool is_bdigit_m(c)
fn bool is_blank(char c)
macro bool is_blank_m(c)
fn bool is_cntrl(char c)
macro bool is_cntrl_m(c)
fn bool is_digit(char c)
macro bool is_digit_m(c)
fn bool is_graph(char c)
macro bool is_graph_m(c)
fn bool is_lower(char c)
macro bool is_lower_m(c)
fn bool is_odigit(char c)
macro bool is_odigit_m(c)
fn bool is_print(char c)
macro bool is_print_m(c)
fn bool is_punct(char c)
macro bool is_punct_m(c)
fn bool is_space(char c)
macro bool is_space_m(c)
fn bool is_upper(char c)
macro bool is_upper_m(c)
fn bool is_xdigit(char c)
macro bool is_xdigit_m(c)
fn char to_lower(char c)
macro to_lower_m(c)
fn char to_upper(char c)
macro to_upper_m(c)
fn bool uint.in_range(uint c, uint start, uint len)
fn bool uint.is_alnum(uint c)
fn bool uint.is_alpha(uint c)
fn bool uint.is_bdigit(uint c)
fn bool uint.is_blank(uint c)
fn bool uint.is_cntrl(uint c)
fn bool uint.is_digit(uint c)
fn bool uint.is_graph(uint c)
fn bool uint.is_lower(uint c)
fn bool uint.is_odigit(uint c)
fn bool uint.is_print(uint c)
fn bool uint.is_punct(uint c)
fn bool uint.is_space(uint c)
fn bool uint.is_upper(uint c)
fn bool uint.is_xdigit(uint c)
fn uint uint.to_lower(uint c)
fn uint uint.to_upper(uint c)

std::atomic

macro @__atomic_compare_exchange_ordering_failure(ptr, expected, desired, $success, failure, $alignment)
macro @__atomic_compare_exchange_ordering_success(ptr, expected, desired, success, failure, $alignment)
fn CInt __atomic_compare_exchange(CInt size, any ptr, any expected, any desired, CInt success, CInt failure) @extern("__atomic_compare_exchange") @export
macro fetch_add(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT, bool $volatile = false, usz $alignment = 0)
macro fetch_and(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT, bool $volatile = false, usz $alignment = 0)
macro fetch_div(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT)
macro fetch_max(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT, bool $volatile = false, usz $alignment = 0)
macro fetch_min(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT, bool $volatile = false, usz $alignment = 0)
macro fetch_mul(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT)
macro fetch_or(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT, bool $volatile = false, usz $alignment = 0)
macro fetch_shift_left(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT)
macro fetch_shift_right(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT)
macro fetch_sub(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT, bool $volatile = false, usz $alignment = 0)
macro fetch_xor(ptr, y, AtomicOrdering $ordering = SEQ_CONSISTENT, bool $volatile = false, usz $alignment = 0)
macro flag_clear(ptr, AtomicOrdering $ordering = SEQ_CONSISTENT)
macro flag_set(ptr, AtomicOrdering $ordering = SEQ_CONSISTENT)

std::atomic::types(<Type>)

struct Atomic
macro Type Atomic.add(&self, Type value, AtomicOrdering ordering = SEQ_CONSISTENT)
macro Type Atomic.and(&self, uint value, AtomicOrdering ordering = SEQ_CONSISTENT) @if(!types::is_float(Type))
macro Type Atomic.div(&self, Type value, AtomicOrdering ordering = SEQ_CONSISTENT)
macro Type Atomic.load(&self, AtomicOrdering ordering = SEQ_CONSISTENT)
macro Type Atomic.max(&self, Type value, AtomicOrdering ordering = SEQ_CONSISTENT)
macro Type Atomic.min(&self, Type value, AtomicOrdering ordering = SEQ_CONSISTENT)
macro Type Atomic.mul(&self, Type value, AtomicOrdering ordering = SEQ_CONSISTENT)
macro Type Atomic.or(&self, uint value, AtomicOrdering ordering = SEQ_CONSISTENT) @if(!types::is_float(Type))
macro Type Atomic.shift_left(&self, uint amount, AtomicOrdering ordering = SEQ_CONSISTENT) @if(!types::is_float(Type))
macro Type Atomic.shift_right(&self, uint amount, AtomicOrdering ordering = SEQ_CONSISTENT) @if(!types::is_float(Type))
macro void Atomic.store(&self, Type value, AtomicOrdering ordering = SEQ_CONSISTENT)
macro Type Atomic.sub(&self, Type value, AtomicOrdering ordering = SEQ_CONSISTENT)
fn Type Atomic.xor(&self, uint value, AtomicOrdering ordering = SEQ_CONSISTENT) @if(!types::is_float(Type))

std::bits

macro bswap(i) @builtin
macro char.clz(self)
macro char.ctz(self)
macro char char.fshl(hi, char lo, char shift)
macro char char.fshr(hi, char lo, char shift)
macro char.popcount(self)
macro char char.rotl(self, char shift)
macro char char.rotr(self, char shift)
macro char[<*>].clz(self)
macro char[<*>].ctz(self)
macro char[<*>] char[<*>].fshl(hi, char[<*>] lo, char[<*>] shift)
macro char[<*>] char[<*>].fshr(hi, char[<*>] lo, char[<*>] shift)
macro char[<*>].popcount(self)
macro char[<*>] char[<*>].rotl(self, char[<*>] shift)
macro char[<*>] char[<*>].rotr(self, char[<*>] shift)
macro ichar.clz(self)
macro ichar.ctz(self)
macro ichar ichar.fshl(hi, ichar lo, ichar shift)
macro ichar ichar.fshr(hi, ichar lo, ichar shift)
macro ichar.popcount(self)
macro ichar ichar.rotl(self, ichar shift)
macro ichar ichar.rotr(self, ichar shift)
macro ichar[<*>].clz(self)
macro ichar[<*>].ctz(self)
macro ichar[<*>] ichar[<*>].fshl(hi, ichar[<*>] lo, ichar[<*>] shift)
macro ichar[<*>] ichar[<*>].fshr(hi, ichar[<*>] lo, ichar[<*>] shift)
macro ichar[<*>].popcount(self)
macro ichar[<*>] ichar[<*>].rotl(self, ichar[<*>] shift)
macro ichar[<*>] ichar[<*>].rotr(self, ichar[<*>] shift)
macro int.clz(self)
macro int.ctz(self)
macro int int.fshl(hi, int lo, int shift)
macro int int.fshr(hi, int lo, int shift)
macro int.popcount(self)
macro int int.rotl(self, int shift)
macro int int.rotr(self, int shift)
macro int128.clz(self)
macro int128.ctz(self)
macro int128 int128.fshl(hi, int128 lo, int128 shift)
macro int128 int128.fshr(hi, int128 lo, int128 shift)
macro int128.popcount(self)
macro int128 int128.rotl(self, int128 shift)
macro int128 int128.rotr(self, int128 shift)
macro int128[<*>].clz(self)
macro int128[<*>].ctz(self)
macro int128[<*>] int128[<*>].fshl(hi, int128[<*>] lo, int128[<*>] shift)
macro int128[<*>] int128[<*>].fshr(hi, int128[<*>] lo, int128[<*>] shift)
macro int128[<*>].popcount(self)
macro int128[<*>] int128[<*>].rotl(self, int128[<*>] shift)
macro int128[<*>] int128[<*>].rotr(self, int128[<*>] shift)
macro int[<*>].clz(self)
macro int[<*>].ctz(self)
macro int[<*>] int[<*>].fshl(hi, int[<*>] lo, int[<*>] shift)
macro int[<*>] int[<*>].fshr(hi, int[<*>] lo, int[<*>] shift)
macro int[<*>].popcount(self)
macro int[<*>] int[<*>].rotl(self, int[<*>] shift)
macro int[<*>] int[<*>].rotr(self, int[<*>] shift)
macro long.clz(self)
macro long.ctz(self)
macro long long.fshl(hi, long lo, long shift)
macro long long.fshr(hi, long lo, long shift)
macro long.popcount(self)
macro long long.rotl(self, long shift)
macro long long.rotr(self, long shift)
macro long[<*>].clz(self)
macro long[<*>].ctz(self)
macro long[<*>] long[<*>].fshl(hi, long[<*>] lo, long[<*>] shift)
macro long[<*>] long[<*>].fshr(hi, long[<*>] lo, long[<*>] shift)
macro long[<*>].popcount(self)
macro long[<*>] long[<*>].rotl(self, long[<*>] shift)
macro long[<*>] long[<*>].rotr(self, long[<*>] shift)
macro reverse(i)
macro short.clz(self)
macro short.ctz(self)
macro short short.fshl(hi, short lo, short shift)
macro short short.fshr(hi, short lo, short shift)
macro short.popcount(self)
macro short short.rotl(self, short shift)
macro short short.rotr(self, short shift)
macro short[<*>].clz(self)
macro short[<*>].ctz(self)
macro short[<*>] short[<*>].fshl(hi, short[<*>] lo, short[<*>] shift)
macro short[<*>] short[<*>].fshr(hi, short[<*>] lo, short[<*>] shift)
macro short[<*>].popcount(self)
macro short[<*>] short[<*>].rotl(self, short[<*>] shift)
macro short[<*>] short[<*>].rotr(self, short[<*>] shift)
macro uint.clz(self)
macro uint.ctz(self)
macro uint uint.fshl(hi, uint lo, uint shift)
macro uint uint.fshr(hi, uint lo, uint shift)
macro uint.popcount(self)
macro uint uint.rotl(self, uint shift)
macro uint uint.rotr(self, uint shift)
macro uint128.clz(self)
macro uint128.ctz(self)
macro uint128 uint128.fshl(hi, uint128 lo, uint128 shift)
macro uint128 uint128.fshr(hi, uint128 lo, uint128 shift)
macro uint128.popcount(self)
macro uint128 uint128.rotl(self, uint128 shift)
macro uint128 uint128.rotr(self, uint128 shift)
macro uint128[<*>].clz(self)
macro uint128[<*>].ctz(self)
macro uint128[<*>] uint128[<*>].fshl(hi, uint128[<*>] lo, uint128[<*>] shift)
macro uint128[<*>] uint128[<*>].fshr(hi, uint128[<*>] lo, uint128[<*>] shift)
macro uint128[<*>].popcount(self)
macro uint128[<*>] uint128[<*>].rotl(self, uint128[<*>] shift)
macro uint128[<*>] uint128[<*>].rotr(self, uint128[<*>] shift)
macro uint[<*>].clz(self)
macro uint[<*>].ctz(self)
macro uint[<*>] uint[<*>].fshl(hi, uint[<*>] lo, uint[<*>] shift)
macro uint[<*>] uint[<*>].fshr(hi, uint[<*>] lo, uint[<*>] shift)
macro uint[<*>].popcount(self)
macro uint[<*>] uint[<*>].rotl(self, uint[<*>] shift)
macro uint[<*>] uint[<*>].rotr(self, uint[<*>] shift)
macro ulong.clz(self)
macro ulong.ctz(self)
macro ulong ulong.fshl(hi, ulong lo, ulong shift)
macro ulong ulong.fshr(hi, ulong lo, ulong shift)
macro ulong.popcount(self)
macro ulong ulong.rotl(self, ulong shift)
macro ulong ulong.rotr(self, ulong shift)
macro ulong[<*>].clz(self)
macro ulong[<*>].ctz(self)
macro ulong[<*>] ulong[<*>].fshl(hi, ulong[<*>] lo, ulong[<*>] shift)
macro ulong[<*>] ulong[<*>].fshr(hi, ulong[<*>] lo, ulong[<*>] shift)
macro ulong[<*>].popcount(self)
macro ulong[<*>] ulong[<*>].rotl(self, ulong[<*>] shift)
macro ulong[<*>] ulong[<*>].rotr(self, ulong[<*>] shift)
macro ushort.clz(self)
macro ushort.ctz(self)
macro ushort ushort.fshl(hi, ushort lo, ushort shift)
macro ushort ushort.fshr(hi, ushort lo, ushort shift)
macro ushort.popcount(self)
macro ushort ushort.rotl(self, ushort shift)
macro ushort ushort.rotr(self, ushort shift)
macro ushort[<*>].clz(self)
macro ushort[<*>].ctz(self)
macro ushort[<*>] ushort[<*>].fshl(hi, ushort[<*>] lo, ushort[<*>] shift)
macro ushort[<*>] ushort[<*>].fshr(hi, ushort[<*>] lo, ushort[<*>] shift)
macro ushort[<*>].popcount(self)
macro ushort[<*>] ushort[<*>].rotl(self, ushort[<*>] shift)
macro ushort[<*>] ushort[<*>].rotr(self, ushort[<*>] shift)

std::collections::anylist

struct AnyList (Printable)
macro any AnyList.@item_at(&self, usz index) @operator([])
fn void AnyList.add_all(&self, AnyList* other_list)
fn any[] AnyList.array_view(&self)
fn void AnyList.clear(&self)
macro AnyList.first(&self, $Type)
fn any! AnyList.first_any(&self) @inline
fn void AnyList.free(&self)
fn void AnyList.free_element(&self, any element) @inline
macro AnyList.get(&self, usz index, $Type)
fn any AnyList.get_any(&self, usz index) @inline
fn bool AnyList.is_empty(&self) @inline
macro AnyList.last(&self, $Type)
fn any! AnyList.last_any(&self) @inline
fn usz AnyList.len(&self) @operator(len) @inline
fn AnyList* AnyList.new_init(&self, usz initial_capacity = 16, Allocator allocator = allocator::heap())
fn any! AnyList.new_pop(&self, Allocator allocator = allocator::heap())
fn any! AnyList.new_pop_first(&self, Allocator allocator = allocator::heap())
macro AnyList.pop(&self, $Type)
macro AnyList.pop_first(&self, $Type)
fn any! AnyList.pop_first_retained(&self)
fn any! AnyList.pop_retained(&self)
macro void AnyList.push(&self, element)
macro void AnyList.push_front(&self, type)
fn void AnyList.remove_at(&self, usz index)
fn void AnyList.remove_first(&self)
fn usz AnyList.remove_if(&self, AnyPredicate filter)
fn void AnyList.remove_last(&self)
fn usz AnyList.remove_using_test(&self, AnyTest filter, any context)
fn void AnyList.reserve(&self, usz min_capacity)
fn usz AnyList.retain_if(&self, AnyPredicate selection)
fn usz AnyList.retain_using_test(&self, AnyTest filter, any context)
fn void AnyList.reverse(&self)
macro void AnyList.set(&self, usz index, value)
fn void AnyList.swap(&self, usz i, usz j)
fn AnyList* AnyList.temp_init(&self, usz initial_capacity = 16)
fn any! AnyList.temp_pop(&self)
fn any! AnyList.temp_pop_first(&self)
fn usz! AnyList.to_format(&self, Formatter* formatter) @dynamic
fn String AnyList.to_new_string(&self, Allocator allocator = allocator::heap()) @dynamic
fn String AnyList.to_tstring(&self)

std::collections::bitset(<SIZE>)

struct BitSet
fn usz BitSet.cardinality(&self)
fn bool BitSet.get(&self, usz i) @operator([]) @inline
fn usz BitSet.len(&self) @operator(len) @inline
fn void BitSet.set(&self, usz i)
fn void BitSet.set_bool(&self, usz i, bool value) @operator([]=) @inline
fn void BitSet.unset(&self, usz i)

std::collections::enummap(<Enum, ValueType>)

struct EnumMap (Printable)
fn ValueType EnumMap.get(&self, Enum key) @operator([]) @inline
fn ValueType* EnumMap.get_ref(&self, Enum key) @operator(&[]) @inline
fn void EnumMap.init(&self, ValueType init_value)
fn usz EnumMap.len(&self) @operator(len) @inline
fn void EnumMap.set(&self, Enum key, ValueType value) @operator([]=) @inline
fn usz! EnumMap.to_format(&self, Formatter* formatter) @dynamic
fn String EnumMap.to_new_string(&self, Allocator allocator = allocator::heap()) @dynamic
fn String EnumMap.to_tstring(&self) @dynamic

std::collections::enumset(<Enum>)

distinct EnumSet (Printable) = EnumSetType;
fn void EnumSet.add(&self, Enum v)
fn void EnumSet.add_all(&self, EnumSet s)
fn EnumSet EnumSet.and_of(&self, EnumSet s)
fn void EnumSet.clear(&self)
fn EnumSet EnumSet.diff_of(&self, EnumSet s)
fn bool EnumSet.has(&self, Enum v)
fn EnumSet EnumSet.or_of(&self, EnumSet s)
fn bool EnumSet.remove(&self, Enum v)
fn void EnumSet.remove_all(&self, EnumSet s)
fn void EnumSet.retain_all(&self, EnumSet s)
fn usz! EnumSet.to_format(&set, Formatter* formatter) @dynamic
fn String EnumSet.to_new_string(&set, Allocator allocator = allocator::heap()) @dynamic
fn String EnumSet.to_tstring(&set) @dynamic
fn EnumSet EnumSet.xor_of(&self, EnumSet s)

std::collections::enumset::private

macro typeid type_for_enum_elements(usz $elements)

std::collections::growablebitset(<Type>)

struct GrowableBitSet
fn usz GrowableBitSet.cardinality(&self)
fn void GrowableBitSet.free(&self)
fn bool GrowableBitSet.get(&self, usz i) @operator([]) @inline
fn usz GrowableBitSet.len(&self) @operator(len)
fn GrowableBitSet* GrowableBitSet.new_init(&self, usz initial_capacity = 1, Allocator allocator = allocator::heap())
fn void GrowableBitSet.set(&self, usz i)
fn void GrowableBitSet.set_bool(&self, usz i, bool value) @operator([]=) @inline
fn GrowableBitSet* GrowableBitSet.temp_init(&self, usz initial_capacity = 1)
fn void GrowableBitSet.unset(&self, usz i)

std::collections::linkedlist(<Type>)

struct LinkedList
fn void LinkedList.clear(&self)
fn Type! LinkedList.first(&self)
fn void LinkedList.free(&self)
fn Type LinkedList.get(&self, usz index)
fn void LinkedList.insert_at(&self, usz index, Type element)
fn Type! LinkedList.last(&self)
fn usz LinkedList.len(&self) @inline
fn LinkedList* LinkedList.new_init(&self, Allocator allocator = allocator::heap())
macro Node* LinkedList.node_at_index(&self, usz index)
fn Type! LinkedList.peek(&self)
fn Type! LinkedList.peek_last(&self)
fn Type! LinkedList.pop(&self)
fn Type! LinkedList.pop_front(&self)
fn void LinkedList.push(&self, Type value)
fn void LinkedList.push_front(&self, Type value)
fn usz LinkedList.remove(&self, Type t) @if(ELEMENT_IS_EQUATABLE)
fn void LinkedList.remove_at(&self, usz index)
fn void! LinkedList.remove_first(&self) @maydiscard
fn bool LinkedList.remove_first_match(&self, Type t) @if(ELEMENT_IS_EQUATABLE)
fn void! LinkedList.remove_last(&self) @maydiscard
fn bool LinkedList.remove_last_match(&self, Type t) @if(ELEMENT_IS_EQUATABLE)
fn void LinkedList.set(&self, usz index, Type element)
fn LinkedList* LinkedList.temp_init(&self)

std::collections::list(<Type>)

struct List (Printable)
macro Type List.@item_at(&self, usz index) @operator([])
fn void List.add_all(&self, List* other_list)
fn void List.add_array(&self, Type[] array)
fn Type[] List.array_view(&self)
fn usz List.byte_size(&self) @inline
fn void List.clear(&self)
fn usz List.compact(&self) @if(ELEMENT_IS_POINTER)
fn usz List.compact_count(&self) @if(ELEMENT_IS_POINTER)
fn bool List.contains(&self, Type value) @if(ELEMENT_IS_EQUATABLE)
fn bool List.equals(&self, List other_list) @if(ELEMENT_IS_EQUATABLE)
fn Type! List.first(&self)
fn void List.free(&self)
fn Type List.get(&self, usz index) @inline
fn Type* List.get_ref(&self, usz index) @operator(&[]) @inline
fn usz! List.index_of(&self, Type type) @if(ELEMENT_IS_EQUATABLE)
fn void List.init_wrapping_array(&self, Type[] types, Allocator allocator = allocator::heap())
fn void List.insert_at(&self, usz index, Type type)
fn bool List.is_empty(&self) @inline
fn Type! List.last(&self)
fn usz List.len(&self) @operator(len) @inline
fn List* List.new_init(&self, usz initial_capacity = 16, Allocator allocator = allocator::heap())
fn Type! List.pop(&self)
fn Type! List.pop_first(&self)
fn void List.push(&self, Type element) @inline
fn void List.push_front(&self, Type type) @inline
fn void List.remove_all_from(&self, List* other_list) @if(ELEMENT_IS_EQUATABLE)
fn usz List.remove_all_matches(&self, Type value) @if(ELEMENT_IS_EQUATABLE)
fn void List.remove_at(&self, usz index)
fn void! List.remove_first(&self) @maydiscard
fn bool List.remove_first_match(&self, Type value) @if(ELEMENT_IS_EQUATABLE)
fn usz List.remove_if(&self, ElementPredicate filter)
fn void! List.remove_last(&self) @maydiscard
fn bool List.remove_last_match(&self, Type value) @if(ELEMENT_IS_EQUATABLE)
fn usz List.remove_using_test(&self, ElementTest filter, any context)
fn void List.reserve(&self, usz min_capacity)
fn usz List.retain_if(&self, ElementPredicate selection)
fn usz List.retain_using_test(&self, ElementTest filter, any context)
fn void List.reverse(&self)
fn usz! List.rindex_of(&self, Type type) @if(ELEMENT_IS_EQUATABLE)
fn void List.set(&self, usz index, Type value) @operator([]=)
fn void List.set_at(&self, usz index, Type type)
fn void List.swap(&self, usz i, usz j)
fn List* List.temp_init(&self, usz initial_capacity = 16)
fn usz! List.to_format(&self, Formatter* formatter) @dynamic
fn Type[] List.to_new_array(&self, Allocator allocator = allocator::heap())
fn String List.to_new_string(&self, Allocator allocator = allocator::heap()) @dynamic
fn Type[] List.to_tarray(&self)
fn String List.to_tstring(&self)

std::collections::map(<Key, Value>)

struct Entry
struct HashMap
macro HashMap.@each(map; @body(key, value))
macro HashMap.@each_entry(map; @body(entry))
macro Value HashMap.@get_or_set(&map, Key key, Value #expr)
fn void HashMap.clear(&map)
fn void HashMap.free(&map)
fn Value! HashMap.get(&map, Key key) @operator([])
fn Entry*! HashMap.get_entry(&map, Key key)
fn Value*! HashMap.get_ref(&map, Key key)
fn bool HashMap.has_key(&map, Key key)
fn bool HashMap.has_value(&map, Value v) @if(VALUE_IS_EQUATABLE)
fn bool HashMap.is_empty(&map) @inline
fn bool HashMap.is_initialized(&map)
fn Key[] HashMap.key_new_list(&map, Allocator allocator = allocator::heap())
fn Key[] HashMap.key_tlist(&map)
fn usz HashMap.len(&map) @inline
fn HashMap* HashMap.new_init(&self, uint capacity = DEFAULT_INITIAL_CAPACITY, float load_factor = DEFAULT_LOAD_FACTOR, Allocator allocator = allocator::heap())
fn HashMap* HashMap.new_init_from_map(&self, HashMap* other_map, Allocator allocator = allocator::heap())
fn void! HashMap.remove(&map, Key key) @maydiscard
fn bool HashMap.set(&map, Key key, Value value) @operator([]=)
fn HashMap* HashMap.temp_init(&self, uint capacity = DEFAULT_INITIAL_CAPACITY, float load_factor = DEFAULT_LOAD_FACTOR)
fn HashMap* HashMap.temp_init_from_map(&map, HashMap* other_map)
fn Value[] HashMap.value_new_list(&map, Allocator allocator = allocator::heap())
fn Value[] HashMap.value_tlist(&map)

std::collections::maybe(<Type>)

struct Maybe
macro Type! Maybe.get(self)
fn Maybe value(Type val)

std::collections::object

struct Object (Printable)
fn void Object.free(&self)
fn Object*! Object.get(&self, String key)
fn Object* Object.get_at(&self, usz index)
fn bool! Object.get_bool(&self, String key)
fn bool! Object.get_bool_at(&self, usz index)
fn char! Object.get_char(&self, String key)
fn char! Object.get_char_at(&self, usz index)
macro String! Object.get_enum(&self, $EnumType, String key)
macro String! Object.get_enum_at(&self, $EnumType, usz index)
fn double! Object.get_float(&self, String key)
fn double! Object.get_float_at(&self, usz index)
fn ichar! Object.get_ichar(&self, String key)
fn ichar! Object.get_ichar_at(&self, usz index)
fn int! Object.get_int(&self, String key)
fn int128! Object.get_int128(&self, String key)
fn int128! Object.get_int128_at(&self, usz index)
fn int! Object.get_int_at(&self, usz index)
fn usz Object.get_len(&self)
fn long! Object.get_long(&self, String key)
fn long! Object.get_long_at(&self, usz index)
fn Object* Object.get_or_create_obj(&self, String key)
fn short! Object.get_short(&self, String key)
fn short! Object.get_short_at(&self, usz index)
fn String! Object.get_string(&self, String key)
fn String! Object.get_string_at(&self, usz index)
fn uint! Object.get_uint(&self, String key)
fn uint128! Object.get_uint128(&self, String key)
fn uint128! Object.get_uint128_at(&self, usz index)
fn uint! Object.get_uint_at(&self, usz index)
fn ulong! Object.get_ulong(&self, String key)
fn ulong! Object.get_ulong_at(&self, usz index)
fn short! Object.get_ushort(&self, String key)
fn ushort! Object.get_ushort_at(&self, usz index)
fn bool Object.has_key(&self, String key)
fn bool Object.is_array(&self) @inline
fn bool Object.is_bool(&self) @inline
fn bool Object.is_empty(&self) @inline
fn bool Object.is_float(&self) @inline
fn bool Object.is_indexable(&self)
fn bool Object.is_int(&self) @inline
fn bool Object.is_keyable(&self)
fn bool Object.is_map(&self) @inline
fn bool Object.is_null(&self) @inline
fn bool Object.is_string(&self) @inline
macro Object* Object.push(&self, value)
fn void Object.push_object(&self, Object* to_append)
macro Object* Object.set(&self, String key, value)
macro Object* Object.set_at(&self, usz index, String key, value)
fn void Object.set_object_at(&self, usz index, Object* to_set)
fn usz! Object.to_format(&self, Formatter* formatter) @dynamic
macro get_integer_value(Object* value, $Type)
fn Object* new_bool(bool b)
macro Object* new_enum(e, Allocator allocator)
fn Object* new_float(double f, Allocator allocator)
fn Object* new_int(int128 i, Allocator allocator)
fn Object* new_null()
fn Object* new_obj(Allocator allocator)
fn Object* new_string(String s, Allocator allocator)

std::collections::priorityqueue(<Type>)

distinct PriorityQueue = inline PrivatePriorityQueue(<Type, false>);
distinct PriorityQueueMax = inline PrivatePriorityQueue(<Type, true>);

std::collections::priorityqueue::private(<Type, MAX>)

struct PrivatePriorityQueue (Printable)
fn Type! PrivatePriorityQueue.first(&self)
fn void PrivatePriorityQueue.free(&self)
fn Type PrivatePriorityQueue.get(&self, usz index) @operator([])
fn bool PrivatePriorityQueue.is_empty(&self)
fn usz PrivatePriorityQueue.len(&self) @operator(len)
fn void PrivatePriorityQueue.new_init(&self, usz initial_capacity = 16, Allocator allocator = allocator::heap()) @inline
fn Type! PrivatePriorityQueue.pop(&self)
fn void PrivatePriorityQueue.push(&self, Type element)
fn void PrivatePriorityQueue.temp_init(&self, usz initial_capacity = 16) @inline
fn usz! PrivatePriorityQueue.to_format(&self, Formatter* formatter) @dynamic
fn String PrivatePriorityQueue.to_new_string(&self, Allocator allocator = allocator::heap()) @dynamic

std::collections::range(<Type>)

struct ExclusiveRange (Printable)
struct Range (Printable)
fn bool ExclusiveRange.contains(&self, Type value) @inline
fn Type ExclusiveRange.get(&self, usz index) @operator([])
fn usz ExclusiveRange.len(&self) @operator(len)
fn usz! ExclusiveRange.to_format(&self, Formatter* formatter) @dynamic
fn String ExclusiveRange.to_new_string(&self, Allocator allocator = allocator::heap()) @dynamic
fn String ExclusiveRange.to_tstring(&self)
fn bool Range.contains(&self, Type value) @inline
fn Type Range.get(&self, usz index) @operator([])
fn usz Range.len(&self) @operator(len)
fn usz! Range.to_format(&self, Formatter* formatter) @dynamic
fn String Range.to_new_string(&self, Allocator allocator = allocator::heap()) @dynamic
fn String Range.to_tstring(&self)

std::collections::ringbuffer(<Type, SIZE>)

struct RingBuffer
fn Type RingBuffer.get(&self, usz index) @operator([])
fn void RingBuffer.init(&self) @inline
fn Type! RingBuffer.pop(&self)
fn void RingBuffer.push(&self, Type c)
fn usz RingBuffer.read(&self, usz index, Type[] buffer)
fn void RingBuffer.write(&self, Type[] buffer)

std::collections::triple(<Type1, Type2, Type3>)

struct Triple

std::collections::tuple(<Type1, Type2>)

struct Tuple

std::core::array

macro concat_new(arr1, arr2, Allocator allocator = allocator::heap())
macro index_of(array, element)
macro rindex_of(array, element)
macro slice2d(array, x = 0, xlen = 0, y = 0, ylen = 0)
macro tconcat(arr1, arr2)

std::core::array::slice(<Type>)

struct Slice2d
macro void Slice2d.@each(&self; @body(usz[<2>], Type))
macro void Slice2d.@each_ref(&self; @body(usz[<2>], Type*))
fn usz Slice2d.count(&self)
macro Type[] Slice2d.get(self, usz idy) @operator([])
fn usz Slice2d.len(&self) @operator(len)
fn Slice2d Slice2d.slice(&self, isz x = 0, isz xlen = 0, isz y = 0, isz ylen = 0)

std::core::bitorder

macro bool is_array_or_slice_of_char(bytes)
macro bool is_arrayptr_or_slice_of_char(bytes)
macro is_bitorder($Type)
macro read(bytes, $Type)
macro write(x, bytes, $Type)

std::core::builtin

enum PrefetchLocality
fault CastResult
fault IteratorResult
fault SearchResult
macro char[] @as_char_view(&value) @builtin
macro anyfault @catch(#expr) @builtin
macro @expect(#value, expected, $probability = 1.0) @builtin
macro bool @likely(bool #value, $probability = 1.0) @builtin
macro bool @ok(#expr) @builtin
macro @prefetch(void* ptr, PrefetchLocality $locality = VERY_NEAR, bool $write = false) @builtin
macro void @scope(&variable; @body) @builtin
macro void @swap(&a, &b) @builtin
macro bool @unlikely(bool #value, $probability = 1.0) @builtin
macro uint String.hash(String c)
macro any.as_inner(&self)
macro any.retype_to(&self, typeid type)
macro any_make(void* ptr, typeid type) @builtin
macro anycast(any v, $Type) @builtin
macro bitcast(expr, $Type) @builtin
macro uint bool.hash(bool b)
macro uint char.hash(char c)
macro uint char[].hash(char[] c)
macro int compare_to(a, b) @builtin
fn void default_panic(String message, String file, String function, uint line) @if(!env::NATIVE_STACKTRACE)
fn void default_panic(String message, String file, String function, uint line) @if(env::NATIVE_STACKTRACE)
macro enum_by_name($Type, String enum_name) @builtin
macro bool equals(a, b) @builtin
macro void* get_frameaddress(int n)
macro void* get_returnaddress(int n)
macro greater(a, b) @builtin
macro greater_eq(a, b) @builtin
macro uint ichar.hash(ichar c)
macro uint int.hash(int i)
macro uint int128.hash(int128 i)
macro less(a, b) @builtin
macro less_eq(a, b) @builtin
macro uint long.hash(long i)
macro max(x, ...) @builtin
macro min(x, ...) @builtin
fn void panicf(String fmt, String file, String function, uint line, args...)
fn bool print_backtrace(String message, int backtraces_to_ignore) @if(env::NATIVE_STACKTRACE)
macro uint short.hash(short s)
macro swizzle(v, ...) @builtin
macro swizzle2(v, v2, ...) @builtin
macro uint typeid.hash(typeid t)
macro uint uint.hash(uint i)
macro uint uint128.hash(uint128 i)
macro uint ulong.hash(ulong i)
macro void unreachable(String string = "Unreachable statement reached.", ...) @builtin @noreturn
macro void unsupported(String string = "Unsupported function invoked") @builtin @noreturn
macro uint ushort.hash(ushort s)
macro uint void*.hash(void* ptr)

std::core::builtin @if((env::LINUX || env::DARWIN) && env::COMPILER_SAFE_MODE && env::DEBUG_SYMBOLS)

fn void sig_bus_error(CInt i)
fn void sig_panic(String message)
fn void sig_segmentation_fault(CInt i)

std::core::dstring

distinct DString (OutStream) = void*;
macro void DString.append(&self, value)
fn void DString.append_char(&self, char c)
fn void DString.append_char32(&self, Char32 c)
fn void DString.append_chars(&self, String str)
fn void DString.append_repeat(&self, char c, usz times)
fn void DString.append_string(&self, DString str)
fn void DString.append_utf32(&self, Char32[] chars)
fn usz! DString.appendf(&self, String format, args...) @maydiscard
fn usz! DString.appendfn(&self, String format, args...) @maydiscard
fn usz DString.capacity(self)
fn void DString.chop(self, usz new_size)
fn void DString.clear(self)
fn DString DString.copy(self, Allocator allocator = null)
fn String DString.copy_str(self, Allocator allocator = allocator::heap())
fn Char32[] DString.copy_utf32(&self, Allocator allocator = allocator::heap())
fn ZString DString.copy_zstr(self, Allocator allocator = allocator::heap())
fn void DString.delete(&self, usz start, usz len = 1)
fn void DString.delete_range(&self, usz start, usz end)
fn bool DString.equals(self, DString other_string)
fn void DString.free(&self)
fn void DString.insert_at(&self, usz index, String s)
fn usz DString.len(&self) @dynamic
fn bool DString.less(self, DString other_string)
fn DString DString.new_concat(self, DString b, Allocator allocator = allocator::heap())
fn DString DString.new_init(&self, usz capacity = MIN_CAPACITY, Allocator allocator = allocator::heap())
fn usz! DString.read_from_stream(&self, InStream reader)
fn void DString.reserve(&self, usz addition)
fn void DString.set(self, usz index, char c)
fn String DString.str_view(self)
fn DString DString.tcopy(&self)
fn String DString.tcopy_str(self)
fn DString DString.temp_concat(self, DString b)
fn DString DString.temp_init(&self, usz capacity = MIN_CAPACITY)
fn usz! DString.write(&self, char[] buffer) @dynamic
fn void! DString.write_byte(&self, char c) @dynamic
fn ZString DString.zstr_view(&self)
fn DString new(String c = "", Allocator allocator = allocator::heap())
fn DString new_join(String[] s, String joiner, Allocator allocator = allocator::heap())
fn DString new_with_capacity(usz capacity, Allocator allocator = allocator::heap())
fn DString temp_new(String s = "")
fn DString temp_with_capacity(usz capacity)

std::core::env

enum ArchType
enum CompilerOptLevel
enum MemoryEnvironment
enum OsType
macro bool os_is_darwin()
macro bool os_is_posix()

std::core::mem

enum AtomicOrdering : int
struct TempState
macro @atomic_load(&x, AtomicOrdering $ordering = SEQ_CONSISTENT, $volatile = false) @builtin
macro void @atomic_store(&x, value, AtomicOrdering $ordering = SEQ_CONSISTENT, $volatile = false) @builtin
macro @clone(value) @builtin @nodiscard
macro @gather_aligned(ptrvec, bool[<*>] mask, passthru, usz $alignment)
macro @masked_load_aligned(ptr, bool[<*>] mask, passthru, usz $alignment)
macro @masked_store_aligned(ptr, value, bool[<*>] mask, usz $alignment)
macro void @pool(TempAllocator* #other_temp = null; @body) @builtin
macro void @report_heap_allocs_in_scope(;@body())
macro @scatter_aligned(ptrvec, value, bool[<*>] mask, usz $alignment)
macro void @scoped(Allocator allocator; @body())
macro void @stack_mem(usz $size; @body(Allocator mem)) @builtin
macro void @stack_pool(usz $size; @body) @builtin
macro @tclone(value) @builtin @nodiscard
macro @volatile_load(&x) @builtin
macro @volatile_store(&x, y) @builtin
fn usz aligned_offset(usz offset, usz alignment)
macro void* aligned_pointer(void* ptr, usz alignment)
macro alloc($Type) @nodiscard
macro alloc_aligned($Type) @nodiscard
macro alloc_array($Type, usz elements) @nodiscard
macro alloc_array_aligned($Type, usz elements) @nodiscard
fn void* calloc(usz size) @builtin @inline @nodiscard
fn void* calloc_aligned(usz size, usz alignment) @builtin @inline @nodiscard
macro void clear(void* dst, usz len, usz $dst_align = 0, bool $is_volatile = false, bool $inlined = false)
macro void clear_inline(void* dst, usz $len, usz $dst_align = 0, bool $is_volatile = false)
macro compare_exchange(ptr, compare, value, AtomicOrdering $success = SEQ_CONSISTENT, AtomicOrdering $failure = SEQ_CONSISTENT, bool $volatile = true, bool $weak = false, usz $alignment = 0)
macro compare_exchange_volatile(ptr, compare, value, AtomicOrdering $success = SEQ_CONSISTENT, AtomicOrdering $failure = SEQ_CONSISTENT)
macro void copy(void* dst, void* src, usz len, usz $dst_align = 0, usz $src_align = 0, bool $is_volatile = false, bool $inlined = false)
macro void copy_inline(void* dst, void* src, usz $len, usz $dst_align = 0, usz $src_align = 0, bool $is_volatile = false)
macro bool equals(a, b, isz len = -1, usz $align = 0)
fn void free(void* ptr) @builtin @inline
fn void free_aligned(void* ptr) @builtin @inline
macro gather(ptrvec, bool[<*>] mask, passthru)
macro TrackingEnv* get_tracking_env()
fn void* malloc(usz size) @builtin @inline @nodiscard
macro masked_load(ptr, bool[<*>] mask, passthru)
macro masked_store(ptr, value, bool[<*>] mask)
macro void move(void* dst, void* src, usz len, usz $dst_align = 0, usz $src_align = 0, bool $is_volatile = false)
macro new($Type, ...) @nodiscard
macro new_aligned($Type, ...) @nodiscard
macro new_array($Type, usz elements) @nodiscard
macro new_array_aligned($Type, usz elements) @nodiscard
fn bool ptr_is_aligned(void* ptr, usz alignment) @inline
fn void* realloc(void *ptr, usz new_size) @builtin @inline @nodiscard
fn void* realloc_aligned(void *ptr, usz new_size, usz alignment) @builtin @inline @nodiscard
macro scatter(ptrvec, value, bool[<*>] mask)
macro void set(void* dst, char val, usz len, usz $dst_align = 0, bool $is_volatile = false)
macro void set_inline(void* dst, char val, usz $len, usz $dst_align = 0, bool $is_volatile = false)
fn void* tcalloc(usz size, usz alignment = 0) @builtin @inline @nodiscard
macro temp_alloc($Type) @nodiscard
macro temp_alloc_array($Type, usz elements) @nodiscard
macro temp_new($Type, ...) @nodiscard
macro temp_new_array($Type, usz elements) @nodiscard
fn void temp_pop(TempState old_state)
fn TempState temp_push(TempAllocator* other = null)
fn void* tmalloc(usz size, usz alignment = 0) @builtin @inline @nodiscard
fn void* trealloc(void* ptr, usz size, usz alignment = mem::DEFAULT_MEM_ALIGNMENT) @builtin @inline @nodiscard
macro type_alloc_must_be_aligned($Type)

std::core::mem::allocator

distinct LibcAllocator (Allocator) = uptr;
enum AllocInitType
fault AllocationFailure
interface Allocator
struct AlignedBlock
struct Allocation
struct ArenaAllocator (Allocator)
struct DynamicArenaAllocator (Allocator)
struct OnStackAllocator (Allocator)
struct OnStackAllocatorHeader
struct SimpleHeapAllocator (Allocator)
struct TempAllocator (Allocator)
struct TempAllocatorPage
struct TrackingAllocator (Allocator)
struct TrackingEnv
struct WasmMemory
macro void*! @aligned_alloc(#alloc_fn, usz bytes, usz alignment)
macro void! @aligned_free(#free_fn, void* old_pointer)
macro void*! @aligned_realloc(#calloc_fn, #free_fn, void* old_pointer, usz bytes, usz alignment)
fn void*! ArenaAllocator.acquire(&self, usz size, AllocInitType init_type, usz alignment) @dynamic
fn void ArenaAllocator.clear(&self)
fn void ArenaAllocator.init(&self, char[] data)
fn usz ArenaAllocator.mark(&self) @dynamic
fn void ArenaAllocator.release(&self, void* ptr, bool) @dynamic
fn void ArenaAllocator.reset(&self, usz mark) @dynamic
fn void*! ArenaAllocator.resize(&self, void *old_pointer, usz size, usz alignment) @dynamic
fn void*! DynamicArenaAllocator.acquire(&self, usz size, AllocInitType init_type, usz alignment) @dynamic
fn void DynamicArenaAllocator.free(&self)
fn void DynamicArenaAllocator.init(&self, usz page_size, Allocator allocator)
fn void DynamicArenaAllocator.release(&self, void* ptr, bool) @dynamic
fn void DynamicArenaAllocator.reset(&self, usz mark = 0) @dynamic
fn void*! DynamicArenaAllocator.resize(&self, void* old_pointer, usz size, usz alignment) @dynamic
fn void*! OnStackAllocator.acquire(&self, usz size, AllocInitType init_type, usz alignment) @dynamic
fn void OnStackAllocator.free(&self)
fn void OnStackAllocator.init(&self, char[] data, Allocator allocator)
fn void OnStackAllocator.release(&self, void* old_pointer, bool aligned) @dynamic
fn void*! OnStackAllocator.resize(&self, void* old_pointer, usz size, usz alignment) @dynamic
fn void*! SimpleHeapAllocator.acquire(&self, usz size, AllocInitType init_type, usz alignment) @dynamic
fn void SimpleHeapAllocator.init(&self, MemoryAllocFn allocator)
fn void SimpleHeapAllocator.release(&self, void* old_pointer, bool aligned) @dynamic
fn void*! SimpleHeapAllocator.resize(&self, void* old_pointer, usz size, usz alignment) @dynamic
fn void*! TempAllocator.acquire(&self, usz size, AllocInitType init_type, usz alignment) @dynamic
fn usz TempAllocator.mark(&self) @dynamic
fn void! TempAllocator.print_pages(&self, File* f)
fn void TempAllocator.release(&self, void* old_pointer, bool) @dynamic
fn void TempAllocator.reset(&self, usz mark) @dynamic
fn void*! TempAllocator.resize(&self, void* pointer, usz size, usz alignment) @dynamic
macro bool TempAllocatorPage.is_aligned(&self)
macro usz TempAllocatorPage.pagesize(&self)
fn void*! TrackingAllocator.acquire(&self, usz size, AllocInitType init_type, usz alignment) @dynamic
fn usz TrackingAllocator.allocated(&self)
fn usz TrackingAllocator.allocation_count(&self)
fn Allocation[] TrackingAllocator.allocations_tlist(&self, Allocator allocator)
fn void TrackingAllocator.clear(&self)
fn void! TrackingAllocator.fprint_report(&self, OutStream out)
fn void TrackingAllocator.free(&self)
fn void TrackingAllocator.init(&self, Allocator allocator)
fn void TrackingAllocator.print_report(&self)
fn void TrackingAllocator.release(&self, void* old_pointer, bool is_aligned) @dynamic
fn void*! TrackingAllocator.resize(&self, void* old_pointer, usz size, usz alignment) @dynamic
fn usz TrackingAllocator.total_allocated(&self)
fn usz TrackingAllocator.total_allocation_count(&self)
fn char[]! WasmMemory.allocate_block(&self, usz bytes)
macro alloc(Allocator allocator, $Type) @nodiscard
macro alloc_array(Allocator allocator, $Type, usz elements) @nodiscard
macro alloc_array_aligned(Allocator allocator, $Type, usz elements) @nodiscard
macro alloc_array_try(Allocator allocator, $Type, usz elements) @nodiscard
macro alloc_try(Allocator allocator, $Type) @nodiscard
macro alloc_with_padding(Allocator allocator, $Type, usz padding) @nodiscard
macro void* calloc(Allocator allocator, usz size) @nodiscard
macro void*! calloc_aligned(Allocator allocator, usz size, usz alignment) @nodiscard
macro void*! calloc_try(Allocator allocator, usz size) @nodiscard
macro clone(Allocator allocator, value) @nodiscard
fn any clone_any(Allocator allocator, any value) @nodiscard
macro void free(Allocator allocator, void* ptr)
macro void free_aligned(Allocator allocator, void* ptr)
macro Allocator heap()
macro void* malloc(Allocator allocator, usz size) @nodiscard
macro void*! malloc_aligned(Allocator allocator, usz size, usz alignment) @nodiscard
macro void*! malloc_try(Allocator allocator, usz size) @nodiscard
macro new(Allocator allocator, $Type, ...) @nodiscard
macro new_array(Allocator allocator, $Type, usz elements) @nodiscard
macro new_array_aligned(Allocator allocator, $Type, usz elements) @nodiscard
macro new_array_try(Allocator allocator, $Type, usz elements) @nodiscard
fn TempAllocator*! new_temp_allocator(usz size, Allocator allocator)
macro new_try(Allocator allocator, $Type, ...) @nodiscard
macro new_with_padding(Allocator allocator, $Type, usz padding) @nodiscard
macro void* realloc(Allocator allocator, void* ptr, usz new_size) @nodiscard
macro void*! realloc_aligned(Allocator allocator, void* ptr, usz new_size, usz alignment) @nodiscard
macro void*! realloc_try(Allocator allocator, void* ptr, usz new_size) @nodiscard
macro TempAllocator* temp()

std::core::mem::allocator @if(!env::WIN32 && !env::POSIX)

fn void*! LibcAllocator.acquire(&self, usz bytes, AllocInitType init_type, usz alignment) @dynamic
fn void LibcAllocator.release(&self, void* old_ptr, bool aligned) @dynamic
fn void*! LibcAllocator.resize(&self, void* old_ptr, usz new_bytes, usz alignment) @dynamic

std::core::mem::allocator @if(env::POSIX)

fn void*! LibcAllocator.acquire(&self, usz bytes, AllocInitType init_type, usz alignment) @dynamic
fn void LibcAllocator.release(&self, void* old_ptr, bool aligned) @dynamic
fn void*! LibcAllocator.resize(&self, void* old_ptr, usz new_bytes, usz alignment) @dynamic

std::core::mem::allocator @if(env::WIN32)

fn void*! LibcAllocator.acquire(&self, usz bytes, AllocInitType init_type, usz alignment) @dynamic
fn void LibcAllocator.release(&self, void* old_ptr, bool aligned) @dynamic
fn void*! LibcAllocator.resize(&self, void* old_ptr, usz new_bytes, usz alignment) @dynamic

std::core::runtime

struct AnyRaw
struct BenchmarkUnit
struct SliceRaw
struct TestContext
struct TestUnit
fn BenchmarkUnit[] benchmark_collection_create(Allocator allocator = allocator::heap())
fn int cmp_test_unit(TestUnit a, TestUnit b)
fn bool default_benchmark_runner()
fn bool default_test_runner()
fn bool run_benchmarks(BenchmarkUnit[] benchmarks)
fn bool run_tests(TestUnit[] tests)
fn void set_benchmark_max_iterations(uint value) @builtin
fn void set_benchmark_warmup_iterations(uint value) @builtin
fn TestUnit[] test_collection_create(Allocator allocator = allocator::heap())
fn void test_panic(String message, String file, String function, uint line)

std::core::runtime @if(WASM_NOLIBC)

fn void wasm_initialize() @extern("_initialize") @wasm

std::core::string

distinct WString = inline Char16*;
distinct ZString = inline char*;
fault NumberConversion
fault UnicodeResult
struct Splitter
fn String! Splitter.next(&self)
fn void Splitter.reset(&self)
fn String String.concat(s1, String s2, Allocator allocator = allocator::heap())
fn bool String.contains(s, String needle)
fn void String.convert_ascii_to_lower(s)
fn void String.convert_ascii_to_upper(s)
fn String String.copy(s, Allocator allocator = allocator::heap())
fn bool String.ends_with(string, String needle)
fn void String.free(&s, Allocator allocator = allocator::heap())
fn usz! String.index_of(s, String needle)
fn usz! String.index_of_char(s, char needle)
fn StringIterator String.iterator(s)
fn String String.new_ascii_to_lower(s, Allocator allocator = allocator::heap())
fn String String.new_ascii_to_upper(s, Allocator allocator = allocator::heap())
fn usz! String.rindex_of(s, String needle)
fn usz! String.rindex_of_char(s, char needle)
fn String[] String.split(s, String needle, usz max = 0, Allocator allocator = allocator::heap())
fn Splitter String.splitter(self, String split)
fn bool String.starts_with(string, String needle)
fn String String.strip(string, String needle)
fn String String.strip_end(string, String needle)
fn String String.tconcat(s1, String s2)
fn String String.tcopy(s)
fn String String.temp_ascii_to_lower(s, Allocator allocator = allocator::heap())
fn String String.temp_ascii_to_upper(s)
fn double! String.to_double(s)
fn float! String.to_float(s)
fn ichar! String.to_ichar(s, int base = 10)
fn int! String.to_int(s, int base = 10)
fn int128! String.to_int128(s, int base = 10)
macro String.to_integer(string, $Type, int base = 10)
fn long! String.to_long(s, int base = 10)
fn Char16[]! String.to_new_utf16(s, Allocator allocator = allocator::heap())
fn Char32[]! String.to_new_utf32(s, Allocator allocator = allocator::heap())
fn WString! String.to_new_wstring(s, Allocator allocator = allocator::heap())
fn short! String.to_short(s, int base = 10)
fn Char16[]! String.to_temp_utf16(s)
fn Char32[]! String.to_temp_utf32(s)
fn WString! String.to_temp_wstring(s)
fn char! String.to_uchar(s, int base = 10)
fn uint! String.to_uint(s, int base = 10)
fn uint128! String.to_uint128(s, int base = 10)
fn ulong! String.to_ulong(s, int base = 10)
fn ushort! String.to_ushort(s, int base = 10)
fn String String.trim(string, String to_trim = "\t\n\r ")
fn String[] String.tsplit(s, String needle, usz max = 0)
fn usz String.utf8_codepoints(s)
fn ZString String.zstr_copy(s, Allocator allocator = allocator::heap())
fn ZString String.zstr_tcopy(s)
fn usz ZString.char_len(str)
fn String ZString.copy(z, Allocator allocator = allocator::temp())
fn usz ZString.len(str)
fn String ZString.str_view(str)
fn String ZString.tcopy(z)
macro bool char_in_set(char c, String set)
macro double! decfloat(char[] chars, int $bits, int $emin, int sign)
macro double! hexfloat(char[] chars, int $bits, int $emin, int sign)
fn String join_new(String[] s, String joiner, Allocator allocator = allocator::heap())
macro String new_format(String fmt, ..., Allocator allocator = allocator::heap())
fn String! new_from_utf16(Char16[] utf16, Allocator allocator = allocator::heap())
fn String! new_from_utf32(Char32[] utf32, Allocator allocator = allocator::heap())
fn String! new_from_wstring(WString wstring, Allocator allocator = allocator::heap())
fn String! temp_from_utf16(Char16[] utf16)
fn String! temp_from_wstring(WString wstring)
macro String tformat(String fmt, ...)

std::core::string::conv

fn void! char16_to_utf8_unsafe(Char16 *ptr, usz *available, char** output)
fn void char32_to_utf16_unsafe(Char32 c, Char16** output)
fn usz! char32_to_utf8(Char32 c, char[] output)
fn usz char32_to_utf8_unsafe(Char32 c, char** output)
fn usz utf16len_for_utf32(Char32[] utf32)
fn usz utf16len_for_utf8(String utf8)
fn void! utf16to8_unsafe(Char16[] utf16, char* utf8_buffer)
fn usz! utf32to8(Char32[] utf32, char[] utf8_buffer)
fn void utf32to8_unsafe(Char32[] utf32, char* utf8_buffer)
fn usz utf8_codepoints(String utf8)
fn Char32! utf8_to_char32(char* ptr, usz* size)
fn usz utf8len_for_utf16(Char16[] utf16)
fn usz utf8len_for_utf32(Char32[] utf32)
fn void! utf8to16_unsafe(String utf8, Char16* utf16_buffer)
fn usz! utf8to32(String utf8, Char32[] utf32_buffer)
fn void! utf8to32_unsafe(String utf8, Char32* utf32_buffer)

std::core::string::iterator

struct StringIterator
fn Char32! StringIterator.next(&self)
fn void StringIterator.reset(&self)

std::core::types

enum TypeKind : char
fault ConversionResult
struct TypeEnum
macro bool @has_same(#a, #b, ...)
fn bool TypeKind.is_int(kind) @inline
macro any_to_int(any v, $Type)
macro bool implements_copy($Type)
macro TypeKind inner_kind($Type)
macro bool is_bool($Type)
macro bool is_comparable_value(value)
macro bool is_equatable_type($Type)
macro bool is_equatable_value(value)
macro bool is_float($Type)
macro bool is_floatlike($Type)
macro bool is_int($Type)
macro bool is_intlike($Type)
macro bool is_numerical($Type)
macro bool is_promotable_to_float($Type)
macro bool is_promotable_to_floatlike($Type)
macro bool is_same($TypeA, $TypeB)
macro bool is_same_vector_type($Type1, $Type2)
macro bool is_slice_convertable($Type)
macro bool is_subtype_of($Type, $OtherType)
macro bool is_underlying_int($Type)
macro bool is_vector($Type)
macro lower_to_atomic_compatible_type($Type)
macro bool may_load_atomic($Type)
fn bool typeid.is_subtype_of(self, typeid other)

std::core::values

macro bool @assign_to(#value1, #value2)
macro TypeKind @inner_kind(#value)
macro bool @is_bool(#value)
macro bool @is_float(#value)
macro bool @is_floatlike(#value)
macro bool @is_int(#value)
macro bool @is_promotable_to_float(#value)
macro bool @is_promotable_to_floatlike(#value)
macro bool @is_same_type(#value1, #value2)
macro bool @is_same_vector_type(#value1, #value2)
macro bool @is_vector(#value)
macro typeid @typeid(#value) @builtin
macro bool @typeis(#value, $Type) @builtin
macro TypeKind @typekind(#value) @builtin
macro promote_int(x)

std::crypto::rc4

struct Rc4
fn void Rc4.crypt(&self, char[] in, char[] out)
fn void Rc4.destroy(&self)
fn void Rc4.init(&self, char[] key)

std::encoding::base64

fault Base64Error
struct Base64Decoder
struct Base64Encoder
fn usz! Base64Decoder.decode(&self, char[] src, char[] dst)
fn usz! Base64Decoder.decode_len(&self, usz n)
fn void! Base64Decoder.init(&self, String alphabet, int padding = '=')
fn usz! Base64Encoder.encode(&self, char[] src, char[] dst)
fn usz Base64Encoder.encode_len(&self, usz n)
fn void! Base64Encoder.init(&self, String alphabet, int padding = '=')

std::encoding::csv

struct CsvReader
macro CsvReader.@each_row(self, int rows = int.max; @body(String[] row))
fn void CsvReader.init(&self, InStream stream, String separator = ",")
fn String[]! CsvReader.read_new_row(self, Allocator allocator = allocator::heap())
fn String[]! CsvReader.read_new_row_with_allocator(self, Allocator allocator = allocator::heap())
fn String[]! CsvReader.read_temp_row(self)
fn void! CsvReader.skip_row(self) @maydiscard

std::encoding::json

fault JsonParsingError
fn JsonTokenType! lex_string(JsonContext* context)
fn Object*! parse(InStream s, Allocator allocator = allocator::heap())

std::hash::adler32

struct Adler32
fn uint Adler32.final(&self)
fn void Adler32.init(&self)
fn void Adler32.update(&self, char[] data)
fn void Adler32.updatec(&self, char c)
fn uint encode(char[] data)

std::hash::crc32

struct Crc32
fn uint Crc32.final(&self)
fn void Crc32.init(&self, uint seed = 0)
fn void Crc32.update(&self, char[] data)
fn void Crc32.updatec(&self, char c)
fn uint encode(char[] data)

std::hash::crc64

struct Crc64
fn ulong Crc64.final(&self)
fn void Crc64.init(&self, uint seed = 0)
fn void Crc64.update(&self, char[] data)
fn void Crc64.updatec(&self, char c)
fn ulong encode(char[] data)

std::hash::fnv32a

distinct Fnv32a = uint;
fn void Fnv32a.init(&self)
fn void Fnv32a.update(&self, char[] data)
macro void Fnv32a.update_char(&self, char c)
fn uint encode(char[] data)

std::hash::fnv64a

distinct Fnv64a = ulong;
fn void Fnv64a.init(&self)
fn void Fnv64a.update(&self, char[] data)
macro void Fnv64a.update_char(&self, char c)
fn ulong encode(char[] data)

std::hash::sha1

struct Sha1
fn char[20] Sha1.final(&self)
fn void Sha1.init(&self)
fn void Sha1.update(&self, char[] data)

std::io

enum Seek
fault FormattingFault
fault IoError
fault PrintFault
interface InStream
interface OutStream
interface Printable
struct BitReader
struct BitWriter
struct ByteBuffer (InStream, OutStream)
struct ByteReader (InStream)
struct ByteWriter (OutStream)
struct File (InStream, OutStream)
struct Formatter
struct LimitReader (InStream)
struct ReadBuffer (InStream)
struct Scanner (InStream)
struct WriteBuffer (OutStream)
macro bool @is_instream(#expr)
macro bool @is_outstream(#expr)
macro void! @pushback_using_seek(&s)
macro char! @read_byte_using_read(&s)
macro usz! @read_using_read_byte(&s, char[] buffer)
macro void! @write_byte_using_write(&s, char c)
macro usz! @write_using_write_byte(&s, char[] bytes)
fn void BitReader.clear(&self) @inline
fn void BitReader.init(&self, InStream byte_reader)
fn char! BitReader.read_bits(&self, uint nbits)
fn void! BitWriter.flush(&self)
fn void BitWriter.init(&self, OutStream byte_writer)
fn void! BitWriter.write_bits(&self, uint bits, uint nbits)
fn usz! ByteBuffer.available(&self) @inline @dynamic
fn void ByteBuffer.free(&self)
fn void! ByteBuffer.grow(&self, usz n)
fn ByteBuffer*! ByteBuffer.init_with_buffer(&self, char[] buf)
fn ByteBuffer*! ByteBuffer.new_init(&self, usz max_read, usz initial_capacity = 16, Allocator allocator = allocator::heap())
fn void! ByteBuffer.pushback_byte(&self) @dynamic
fn usz! ByteBuffer.read(&self, char[] bytes) @dynamic
fn char! ByteBuffer.read_byte(&self) @dynamic
fn usz! ByteBuffer.seek(&self, isz offset, Seek seek) @dynamic
macro ByteBuffer.shrink(&self)
fn ByteBuffer*! ByteBuffer.temp_init(&self, usz max_read, usz initial_capacity = 16)
fn usz! ByteBuffer.write(&self, char[] bytes) @dynamic
fn void! ByteBuffer.write_byte(&self, char c) @dynamic
fn usz! ByteReader.available(&self) @inline @dynamic
fn ByteReader* ByteReader.init(&self, char[] bytes)
fn usz ByteReader.len(&self) @dynamic
fn void! ByteReader.pushback_byte(&self) @dynamic
fn usz! ByteReader.read(&self, char[] bytes) @dynamic
fn char! ByteReader.read_byte(&self) @dynamic
fn usz! ByteReader.seek(&self, isz offset, Seek seek) @dynamic
fn usz! ByteReader.write_to(&self, OutStream writer) @dynamic
fn void! ByteWriter.destroy(&self) @dynamic
fn void! ByteWriter.ensure_capacity(&self, usz len) @inline
fn ByteWriter* ByteWriter.init_with_buffer(&self, char[] data)
fn ByteWriter* ByteWriter.new_init(&self, Allocator allocator = allocator::heap())
fn usz! ByteWriter.read_from(&self, InStream reader) @dynamic
fn String ByteWriter.str_view(&self) @inline
fn ByteWriter* ByteWriter.temp_init(&self)
fn usz! ByteWriter.write(&self, char[] bytes) @dynamic
fn void! ByteWriter.write_byte(&self, char c) @dynamic
fn void Formatter.init(&self, OutputFn out_fn, void* data = null)
fn usz! Formatter.print(&self, String str)
fn usz! Formatter.print_with_function(&self, Printable arg)
fn usz! Formatter.printf(&self, String format, args...)
fn usz! Formatter.vprintf(&self, String format, any[] anys)
fn usz! LimitReader.available(&self) @inline @dynamic
fn void! LimitReader.close(&self) @dynamic
fn LimitReader* LimitReader.init(&self, InStream wrapped_stream, usz limit)
fn usz! LimitReader.read(&self, char[] bytes) @dynamic
fn char! LimitReader.read_byte(&self) @dynamic
fn void! ReadBuffer.close(&self) @dynamic
fn ReadBuffer* ReadBuffer.init(&self, InStream wrapped_stream, char[] bytes)
fn usz! ReadBuffer.read(&self, char[] bytes) @dynamic
fn char! ReadBuffer.read_byte(&self) @dynamic
fn String ReadBuffer.str_view(&self) @inline
fn void! Scanner.close(&self) @dynamic
fn char[] Scanner.flush(&self) @dynamic
fn void Scanner.init(&self, InStream stream, char[] buffer)
fn usz! Scanner.read(&self, char[] bytes) @dynamic
fn char! Scanner.read_byte(&self) @dynamic
fn char[]! Scanner.scan(&self, String pattern = "\n")
fn void! WriteBuffer.close(&self) @dynamic
fn void! WriteBuffer.flush(&self) @dynamic
fn WriteBuffer* WriteBuffer.init(&self, OutStream wrapped_stream, char[] bytes)
fn String WriteBuffer.str_view(&self) @inline
fn usz! WriteBuffer.write(&self, char[] bytes) @dynamic
fn void! WriteBuffer.write_byte(&self, char c) @dynamic
fn usz! available(InStream s)
fn char[]! bprintf(char[] buffer, String format, args...) @maydiscard
fn usz! copy_to(InStream in, OutStream dst, char[] buffer = {})
macro void eprint(x)
fn usz! eprintf(String format, args...) @maydiscard
fn usz! eprintfn(String format, args...) @maydiscard
macro void eprintn(x)
macro usz! fprint(out, x)
fn usz! fprintf(OutStream out, String format, args...)
fn usz! fprintfn(OutStream out, String format, args...) @maydiscard
macro usz! fprintn(out, x = "")
macro void print(x)
fn usz! printf(String format, args...) @maydiscard
fn usz! printfn(String format, args...) @maydiscard
macro void printn(x = "")
macro usz! read_all(stream, char[] buffer)
macro usz! read_any(stream, any ref)
macro usz! read_varint(stream, x_ptr)
macro String! readline(stream = io::stdin(), Allocator allocator = allocator::heap())
macro String! treadline(stream = io::stdin())
macro usz! write_all(stream, char[] buffer)
macro usz! write_any(stream, any ref)
macro usz! write_varint(stream, x)

std::io @if (env::LIBC)

fn void putchar(char c) @inline
fn File* stderr()
fn File* stdin()
fn File* stdout()

std::io @if(!env::LIBC)

fn void putchar(char c) @inline
fn File* stderr()
fn File* stdin()
fn File* stdout()

std::io::file

fn void! File.close(&self) @inline @dynamic
fn bool File.eof(&self) @inline
fn void! File.flush(&self) @dynamic
fn void! File.memopen(File* file, char[] data, String mode)
fn usz! File.read(&self, char[] buffer) @dynamic
fn char! File.read_byte(&self) @dynamic
fn void! File.reopen(&self, String filename, String mode)
fn usz! File.seek(&self, isz offset, Seek seek_mode = Seek.SET) @dynamic
fn usz! File.write(&self, char[] buffer) @dynamic
fn void! File.write_byte(&self, char c) @dynamic
fn void! delete(String filename)
fn File from_handle(CFile file)
fn usz! get_size(String path)
fn bool is_file(String path)
fn char[]! load_buffer(String filename, char[] buffer)
fn char[]! load_new(String filename, Allocator allocator = allocator::heap())
fn char[]! load_temp(String filename)
fn File! open(String filename, String mode)
fn File! open_path(Path path, String mode)

std::io::os

macro String! getcwd(Allocator allocator = allocator::heap())
macro void! native_chdir(Path path)
fn bool native_file_or_dir_exists(String path)
fn usz! native_file_size(String path) @if(!env::WIN32 && !env::DARWIN)
fn usz! native_file_size(String path) @if(env::DARWIN)
fn usz! native_file_size(String path) @if(env::WIN32)
fn bool native_is_dir(String path)
fn bool native_is_file(String path)
macro bool! native_mkdir(Path path, MkdirPermissions permissions)
macro bool! native_rmdir(Path path)
fn void! native_stat(Stat* stat, String path) @if(env::DARWIN || env::LINUX)

std::io::os @if(env::LIBC)

fn void*! native_fopen(String filename, String mode) @inline
fn usz! native_fread(CFile file, char[] buffer) @inline
fn void*! native_freopen(void* file, String filename, String mode) @inline
fn void! native_fseek(void* file, isz offset, Seek seek_mode) @inline
fn usz! native_ftell(CFile file) @inline
fn usz! native_fwrite(CFile file, char[] buffer) @inline
fn void! native_remove(String filename)
fn Path! native_temp_directory(Allocator allocator = allocator::heap()) @if(!env::WIN32)
fn Path! native_temp_directory(Allocator allocator = allocator::heap()) @if(env::WIN32)

std::io::os @if(env::NO_LIBC)

fn void*! native_fopen(String filename, String mode) @inline
fn usz! native_fread(CFile file, char[] buffer) @inline
fn void*! native_freopen(void* file, String filename, String mode) @inline
fn void! native_fseek(void* file, isz offset, Seek seek_mode) @inline
fn usz! native_ftell(CFile file) @inline
fn usz! native_fwrite(CFile file, char[] buffer) @inline
fn void! native_remove(String filename) @inline
macro Path! native_temp_directory(Allocator allocator = allocator::heap())

std::io::os @if(env::POSIX)

fn PathList! native_ls(Path dir, bool no_dirs, bool no_symlinks, String mask, Allocator allocator)
fn void! native_rmtree(Path dir)

std::io::os @if(env::WIN32)

fn PathList! native_ls(Path dir, bool no_dirs, bool no_symlinks, String mask, Allocator allocator)
fn void! native_rmtree(Path path)

std::io::path

enum MkdirPermissions
enum PathEnv
fault PathResult
struct Path (Printable)
fn Path! Path.absolute(self, Allocator allocator = allocator::heap())
fn Path! Path.append(self, String filename, Allocator allocator = allocator::heap())
fn ZString Path.as_zstr(self)
fn String Path.basename(self)
fn String Path.dirname(self)
fn bool Path.equals(self, Path p2)
fn String! Path.extension(self)
fn void Path.free(self)
fn bool Path.has_suffix(self, String str)
fn bool! Path.is_absolute(self)
fn Path! Path.parent(self)
fn String Path.root_directory(self)
fn String Path.str_view(self) @inline
fn Path! Path.tappend(self, String filename)
fn usz! Path.to_format(&self, Formatter* formatter) @dynamic
fn String Path.to_new_string(&self, Allocator allocator = allocator::heap()) @dynamic
fn String Path.volume_name(self)
fn bool! Path.walk(self, PathWalker w, void* data)
fn void! chdir(Path path)
fn void! delete(Path path)
fn bool exists(Path path)
fn usz! file_size(Path path)
fn Path! getcwd(Allocator allocator = allocator::heap())
fn bool is_dir(Path path)
fn bool is_file(Path path)
macro bool is_posix_separator(char c)
macro bool is_reserved_path_char(char c, PathEnv path_env = DEFAULT_PATH_ENV)
macro bool is_reserved_win32_path_char(char c)
macro bool is_separator(char c, PathEnv path_env = DEFAULT_PATH_ENV)
macro bool is_win32_separator(char c)
fn PathList! ls(Path dir, bool no_dirs = false, bool no_symlinks = false, String mask = "", Allocator allocator = allocator::heap())
fn bool! mkdir(Path path, bool recursive = false, MkdirPermissions permissions = NORMAL)
fn Path! new(String path, Allocator allocator = allocator::heap(), PathEnv path_env = DEFAULT_PATH_ENV)
fn Path! new_posix(String path, Allocator allocator = allocator::heap())
fn Path! new_win32_wstring(WString path, Allocator allocator = allocator::heap())
fn Path! new_windows(String path, Allocator allocator = allocator::heap())
fn String! normalize(String path_str, PathEnv path_env = DEFAULT_PATH_ENV)
fn bool! rmdir(Path path)
fn void! rmtree(Path path)
fn Path! temp_directory(Allocator allocator = allocator::heap())
fn Path! temp_new(String path, PathEnv path_env = DEFAULT_PATH_ENV)
fn Path! tgetcwd()

std::math

enum RoundingMode : int
fault MathError
fault MatrixError
fn int128 __ashlti3(int128 a, uint b) @extern("__ashlti3") @weak @nostrip
fn int128 __ashrti3(int128 a, uint b) @extern("__ashrti3") @weak @nostrip
fn int128 __divti3(int128 a, int128 b) @extern("__divti3") @weak @nostrip
fn int128 __fixdfti(double a) @weak @extern("__fixdfti") @nostrip
fn int128 __fixsfti(float a) @weak @extern("__fixsfti") @nostrip
fn uint128 __fixunsdfti(double a) @weak @extern("__fixunsdfti") @nostrip
fn uint128 __fixunssfti(float a) @weak @extern("__fixunssfti") @nostrip
fn double __floattidf(int128 a) @extern("__floattidf") @weak @nostrip
fn float __floattisf(int128 a) @extern("__floattisf") @weak @nostrip
fn double __floatuntidf(uint128 a) @extern("__floatuntidf") @weak @nostrip
fn float __floatuntisf(uint128 a) @extern("__floatuntisf") @weak @nostrip
fn uint128 __lshrti3(uint128 a, uint b) @extern("__lshrti3") @weak @nostrip
fn int128 __modti3(int128 a, int128 b) @extern("__modti3") @weak @nostrip
fn int128 __multi3(int128 a, int128 b) @extern("__multi3") @weak @nostrip
fn double __roundeven(double d) @extern("roundeven") @weak @nostrip
fn float __roundevenf(float f) @extern("roundevenf") @weak @nostrip
fn uint128 __udivti3(uint128 n, uint128 d) @extern("__udivti3") @weak @nostrip
fn uint128 __umodti3(uint128 n, uint128 d) @extern("__umodti3") @weak @nostrip
fn double _frexp(double x, int* e)
fn float _frexpf(float x, int* e)
macro abs(x)
macro acos(x)
macro acosh(x)
macro asin(x)
macro asinh(x)
macro atan(x)
macro atan2(x, y)
macro atanh(x)
macro bool bool[<*>].and(bool[<*>] x)
macro bool[<*>] bool[<*>].comp_eq(bool[<*>] x, bool[<*>] y)
macro bool[<*>] bool[<*>].comp_ge(bool[<*>] x, bool[<*>] y)
macro bool[<*>] bool[<*>].comp_gt(bool[<*>] x, bool[<*>] y)
macro bool[<*>] bool[<*>].comp_le(bool[<*>] x, bool[<*>] y)
macro bool[<*>] bool[<*>].comp_lt(bool[<*>] x, bool[<*>] y)
macro bool[<*>] bool[<*>].comp_ne(bool[<*>] x, bool[<*>] y)
macro bool bool[<*>].max(bool[<*>] x)
macro bool bool[<*>].min(bool[<*>] x)
macro bool bool[<*>].or(bool[<*>] x)
macro bool bool[<*>].product(bool[<*>] x)
macro bool bool[<*>].sum(bool[<*>] x)
macro bool bool[<*>].xor(bool[<*>] x)
macro ceil(x)
macro bool char.is_even(char x)
macro bool char.is_odd(char x)
macro char! char.overflow_add(char x, char y)
macro char! char.overflow_mul(char x, char y)
macro char! char.overflow_sub(char x, char y)
macro char char.sat_add(char x, char y)
macro char char.sat_mul(char x, char y)
macro char char.sat_shl(char x, char y)
macro char char.sat_sub(char x, char y)
macro char char[<*>].and(char[<*>] x)
macro bool[<*>] char[<*>].comp_eq(char[<*>] x, char[<*>] y)
macro bool[<*>] char[<*>].comp_ge(char[<*>] x, char[<*>] y)
macro bool[<*>] char[<*>].comp_gt(char[<*>] x, char[<*>] y)
macro bool[<*>] char[<*>].comp_le(char[<*>] x, char[<*>] y)
macro bool[<*>] char[<*>].comp_lt(char[<*>] x, char[<*>] y)
macro bool[<*>] char[<*>].comp_ne(char[<*>] x, char[<*>] y)
macro char char[<*>].max(char[<*>] x)
macro char char[<*>].min(char[<*>] x)
macro char char[<*>].or(char[<*>] x)
macro char char[<*>].product(char[<*>] x)
macro char char[<*>].sum(char[<*>] x)
macro char char[<*>].xor(char[<*>] x)
macro clamp(x, lower, upper)
macro copysign(mag, sgn)
macro cos(x)
macro cosec(x)
macro cosech(x)
macro cosh(x)
macro cotan(x)
macro cotanh(x)
macro deg_to_rad(x)
macro double double.ceil(double x)
macro double double.clamp(double x, double lower, double upper)
macro double double.copysign(double mag, double sgn)
macro double double.floor(double x)
macro double double.fma(double a, double b, double c)
macro uint double.high_word(double d)
macro uint double.low_word(double d)
macro double double.muladd(double a, double b, double c)
macro double double.nearbyint(double x)
macro double double.pow(double x, exp)
macro double double.rint(double x)
macro double double.round(double x)
macro double double.roundeven(double x)
macro double double.trunc(double x)
macro double[<*>] double[<*>].ceil(double[<*>] x)
macro double[<*>] double[<*>].clamp(double[<*>] x, double[<*>] lower, double[<*>] upper)
macro bool[<*>] double[<*>].comp_eq(double[<*>] x, double[<*>] y)
macro bool[<*>] double[<*>].comp_ge(double[<*>] x, double[<*>] y)
macro bool[<*>] double[<*>].comp_gt(double[<*>] x, double[<*>] y)
macro bool[<*>] double[<*>].comp_le(double[<*>] x, double[<*>] y)
macro bool[<*>] double[<*>].comp_lt(double[<*>] x, double[<*>] y)
macro bool[<*>] double[<*>].comp_ne(double[<*>] x, double[<*>] y)
macro double[<*>] double[<*>].copysign(double[<*>] mag, double[<*>] sgn)
macro double double[<*>].distance(double[<*>] x, double[<*>] y)
macro double double[<*>].dot(double[<*>] x, double[<*>] y)
macro bool double[<*>].equals(double[<*>] x, double[<*>] y)
macro double[<*>] double[<*>].floor(double[<*>] x)
macro double[<*>] double[<*>].fma(double[<*>] a, double[<*>] b, double[<*>] c)
macro double double[<*>].length(double[<*>] x)
macro double[<*>] double[<*>].lerp(double[<*>] x, double[<*>] y, double amount)
macro double double[<*>].max(double[<*>] x)
macro double double[<*>].min(double[<*>] x)
macro double[<*>] double[<*>].nearbyint(double[<*>] x)
macro double[<*>] double[<*>].normalize(double[<*>] x)
macro double[<*>] double[<*>].pow(double[<*>] x, exp)
macro double double[<*>].product(double[<*>] x, double start = 1.0)
macro double[<*>] double[<*>].reflect(double[<*>] x, double[<*>] y)
macro double[<*>] double[<*>].rint(double[<*>] x)
macro double[<*>] double[<*>].round(double[<*>] x)
macro double[<*>] double[<*>].roundeven(double[<*>] x)
macro double double[<*>].sum(double[<*>] x, double start = 0.0)
macro double[<*>] double[<*>].trunc(double[<*>] x)
macro exp(x)
macro exp2(x)
macro float float.ceil(float x)
macro float float.clamp(float x, float lower, float upper)
macro float float.copysign(float mag, float sgn)
macro float float.floor(float x)
macro float float.fma(float a, float b, float c)
macro float float.muladd(float a, float b, float c)
macro float float.nearbyint(float x)
macro float float.pow(float x, exp)
macro float float.rint(float x)
macro float float.round(float x)
macro float float.roundeven(float x)
macro float float.trunc(float x)
macro uint float.word(float d)
macro float[<*>] float[<*>].ceil(float[<*>] x)
macro float[<*>] float[<*>].clamp(float[<*>] x, float[<*>] lower, float[<*>] upper)
macro bool[<*>] float[<*>].comp_eq(float[<*>] x, float[<*>] y)
macro bool[<*>] float[<*>].comp_ge(float[<*>] x, float[<*>] y)
macro bool[<*>] float[<*>].comp_gt(float[<*>] x, float[<*>] y)
macro bool[<*>] float[<*>].comp_le(float[<*>] x, float[<*>] y)
macro bool[<*>] float[<*>].comp_lt(float[<*>] x, float[<*>] y)
macro bool[<*>] float[<*>].comp_ne(float[<*>] x, float[<*>] y)
macro float[<*>] float[<*>].copysign(float[<*>] mag, float[<*>] sgn)
macro float float[<*>].distance(float[<*>] x, float[<*>] y)
macro float float[<*>].dot(float[<*>] x, float[<*>] y)
macro bool float[<*>].equals(float[<*>] x, float[<*>] y)
macro float[<*>] float[<*>].floor(float[<*>] x)
macro float[<*>] float[<*>].fma(float[<*>] a, float[<*>] b, float[<*>] c)
macro float float[<*>].length(float[<*>] x)
macro float[<*>] float[<*>].lerp(float[<*>] x, float[<*>] y, float amount)
macro float float[<*>].max(float[<*>] x)
macro float float[<*>].min(float[<*>] x)
macro float[<*>] float[<*>].nearbyint(float[<*>] x)
macro float[<*>] float[<*>].normalize(float[<*>] x)
macro float[<*>] float[<*>].pow(float[<*>] x, exp)
macro float float[<*>].product(float[<*>] x, float start = 1.0)
macro float[<*>] float[<*>].reflect(float[<*>] x, float[<*>] y)
macro float[<*>] float[<*>].rint(float[<*>] x)
macro float[<*>] float[<*>].round(float[<*>] x)
macro float[<*>] float[<*>].roundeven(float[<*>] x)
macro float float[<*>].sum(float[<*>] x, float start = 0.0)
macro float[<*>] float[<*>].trunc(float[<*>] x)
macro floor(x)
macro fma(a, b, c)
macro frexp(x, int* e)
macro hypot(x, y)
macro bool ichar.is_even(ichar x)
macro bool ichar.is_odd(ichar x)
macro ichar! ichar.overflow_add(ichar x, ichar y)
macro ichar! ichar.overflow_mul(ichar x, ichar y)
macro ichar! ichar.overflow_sub(ichar x, ichar y)
macro ichar ichar.sat_add(ichar x, ichar y)
macro ichar ichar.sat_mul(ichar x, ichar y)
macro ichar ichar.sat_shl(ichar x, ichar y)
macro ichar ichar.sat_sub(ichar x, ichar y)
macro ichar ichar[<*>].and(ichar[<*>] x)
macro bool[<*>] ichar[<*>].comp_eq(ichar[<*>] x, ichar[<*>] y)
macro bool[<*>] ichar[<*>].comp_ge(ichar[<*>] x, ichar[<*>] y)
macro bool[<*>] ichar[<*>].comp_gt(ichar[<*>] x, ichar[<*>] y)
macro bool[<*>] ichar[<*>].comp_le(ichar[<*>] x, ichar[<*>] y)
macro bool[<*>] ichar[<*>].comp_lt(ichar[<*>] x, ichar[<*>] y)
macro bool[<*>] ichar[<*>].comp_ne(ichar[<*>] x, ichar[<*>] y)
macro ichar ichar[<*>].max(ichar[<*>] x)
macro ichar ichar[<*>].min(ichar[<*>] x)
macro ichar ichar[<*>].or(ichar[<*>] x)
macro ichar ichar[<*>].product(ichar[<*>] x)
macro ichar ichar[<*>].sum(ichar[<*>] x)
macro ichar ichar[<*>].xor(ichar[<*>] x)
macro bool int.is_even(int x)
macro bool int.is_odd(int x)
macro int! int.overflow_add(int x, int y)
macro int! int.overflow_mul(int x, int y)
macro int! int.overflow_sub(int x, int y)
macro int int.sat_add(int x, int y)
macro int int.sat_mul(int x, int y)
macro int int.sat_shl(int x, int y)
macro int int.sat_sub(int x, int y)
macro bool int128.is_even(int128 x)
macro bool int128.is_odd(int128 x)
macro int128! int128.overflow_add(int128 x, int128 y)
macro int128! int128.overflow_mul(int128 x, int128 y)
macro int128! int128.overflow_sub(int128 x, int128 y)
macro int128 int128.sat_add(int128 x, int128 y)
macro int128 int128.sat_mul(int128 x, int128 y)
macro int128 int128.sat_shl(int128 x, int128 y)
macro int128 int128.sat_sub(int128 x, int128 y)
macro int128 int128[<*>].and(int128[<*>] x)
macro bool[<*>] int128[<*>].comp_eq(int128[<*>] x, int128[<*>] y)
macro bool[<*>] int128[<*>].comp_ge(int128[<*>] x, int128[<*>] y)
macro bool[<*>] int128[<*>].comp_gt(int128[<*>] x, int128[<*>] y)
macro bool[<*>] int128[<*>].comp_le(int128[<*>] x, int128[<*>] y)
macro bool[<*>] int128[<*>].comp_lt(int128[<*>] x, int128[<*>] y)
macro bool[<*>] int128[<*>].comp_ne(int128[<*>] x, int128[<*>] y)
macro int128 int128[<*>].max(int128[<*>] x)
macro int128 int128[<*>].min(int128[<*>] x)
macro int128 int128[<*>].or(int128[<*>] x)
macro int128 int128[<*>].product(int128[<*>] x)
macro int128 int128[<*>].sum(int128[<*>] x)
macro int128 int128[<*>].xor(int128[<*>] x)
macro int int[<*>].and(int[<*>] x)
macro bool[<*>] int[<*>].comp_eq(int[<*>] x, int[<*>] y)
macro bool[<*>] int[<*>].comp_ge(int[<*>] x, int[<*>] y)
macro bool[<*>] int[<*>].comp_gt(int[<*>] x, int[<*>] y)
macro bool[<*>] int[<*>].comp_le(int[<*>] x, int[<*>] y)
macro bool[<*>] int[<*>].comp_lt(int[<*>] x, int[<*>] y)
macro bool[<*>] int[<*>].comp_ne(int[<*>] x, int[<*>] y)
macro int int[<*>].max(int[<*>] x)
macro int int[<*>].min(int[<*>] x)
macro int int[<*>].or(int[<*>] x)
macro int int[<*>].product(int[<*>] x)
macro int int[<*>].sum(int[<*>] x)
macro int int[<*>].xor(int[<*>] x)
macro bool is_even(x)
macro bool is_finite(x)
macro is_inf(x)
macro is_nan(x)
macro bool is_odd(x)
macro bool is_power_of_2(x)
macro ln(x)
macro log(x, base)
macro log10(x)
macro log2(x)
macro bool long.is_even(long x)
macro bool long.is_odd(long x)
macro long! long.overflow_add(long x, long y)
macro long! long.overflow_mul(long x, long y)
macro long! long.overflow_sub(long x, long y)
macro long long.sat_add(long x, long y)
macro long long.sat_mul(long x, long y)
macro long long.sat_shl(long x, long y)
macro long long.sat_sub(long x, long y)
macro long long[<*>].and(long[<*>] x)
macro bool[<*>] long[<*>].comp_eq(long[<*>] x, long[<*>] y)
macro bool[<*>] long[<*>].comp_ge(long[<*>] x, long[<*>] y)
macro bool[<*>] long[<*>].comp_gt(long[<*>] x, long[<*>] y)
macro bool[<*>] long[<*>].comp_le(long[<*>] x, long[<*>] y)
macro bool[<*>] long[<*>].comp_lt(long[<*>] x, long[<*>] y)
macro bool[<*>] long[<*>].comp_ne(long[<*>] x, long[<*>] y)
macro long long[<*>].max(long[<*>] x)
macro long long[<*>].min(long[<*>] x)
macro long long[<*>].or(long[<*>] x)
macro long long[<*>].product(long[<*>] x)
macro long long[<*>].sum(long[<*>] x)
macro long long[<*>].xor(long[<*>] x)
macro max(x, y, ...)
macro min(x, y, ...)
macro muladd(a, b, c)
macro nearbyint(x)
macro next_power_of_2(x)
macro pow(x, exp)
macro rint(x)
macro round(x)
macro round_to_decimals(x, int decimal_places)
macro roundeven(x)
macro double scalbn(double x, int n)
macro sec(x)
macro sech(x)
macro select(bool[<*>] mask, then_value, else_value)
macro bool short.is_even(short x)
macro bool short.is_odd(short x)
macro short! short.overflow_add(short x, short y)
macro short! short.overflow_mul(short x, short y)
macro short! short.overflow_sub(short x, short y)
macro short short.sat_add(short x, short y)
macro short short.sat_mul(short x, short y)
macro short short.sat_shl(short x, short y)
macro short short.sat_sub(short x, short y)
macro short short[<*>].and(short[<*>] x)
macro bool[<*>] short[<*>].comp_eq(short[<*>] x, short[<*>] y)
macro bool[<*>] short[<*>].comp_ge(short[<*>] x, short[<*>] y)
macro bool[<*>] short[<*>].comp_gt(short[<*>] x, short[<*>] y)
macro bool[<*>] short[<*>].comp_le(short[<*>] x, short[<*>] y)
macro bool[<*>] short[<*>].comp_lt(short[<*>] x, short[<*>] y)
macro bool[<*>] short[<*>].comp_ne(short[<*>] x, short[<*>] y)
macro short short[<*>].max(short[<*>] x)
macro short short[<*>].min(short[<*>] x)
macro short short[<*>].or(short[<*>] x)
macro short short[<*>].product(short[<*>] x)
macro short short[<*>].sum(short[<*>] x)
macro short short[<*>].xor(short[<*>] x)
macro sign(x)
macro int signbit(x)
macro sin(x)
macro sincos(x, y)
macro sinh(x)
macro sqr(x)
macro sqrt(x)
macro tan(x)
macro tanh(x)
macro trunc(x)
macro bool uint.is_even(uint x)
macro bool uint.is_odd(uint x)
macro uint! uint.overflow_add(uint x, uint y)
macro uint! uint.overflow_mul(uint x, uint y)
macro uint! uint.overflow_sub(uint x, uint y)
macro uint uint.sat_add(uint x, uint y)
macro uint uint.sat_mul(uint x, uint y)
macro uint uint.sat_shl(uint x, uint y)
macro uint uint.sat_sub(uint x, uint y)
macro bool uint128.is_even(uint128 x)
macro bool uint128.is_odd(uint128 x)
macro uint128! uint128.overflow_add(uint128 x, uint128 y)
macro uint128! uint128.overflow_mul(uint128 x, uint128 y)
macro uint128! uint128.overflow_sub(uint128 x, uint128 y)
macro uint128 uint128.sat_add(uint128 x, uint128 y)
macro uint128 uint128.sat_mul(uint128 x, uint128 y)
macro uint128 uint128.sat_shl(uint128 x, uint128 y)
macro uint128 uint128.sat_sub(uint128 x, uint128 y)
macro uint128 uint128[<*>].and(uint128[<*>] x)
macro bool[<*>] uint128[<*>].comp_eq(uint128[<*>] x, uint128[<*>] y)
macro bool[<*>] uint128[<*>].comp_ge(uint128[<*>] x, uint128[<*>] y)
macro bool[<*>] uint128[<*>].comp_gt(uint128[<*>] x, uint128[<*>] y)
macro bool[<*>] uint128[<*>].comp_le(uint128[<*>] x, uint128[<*>] y)
macro bool[<*>] uint128[<*>].comp_lt(uint128[<*>] x, uint128[<*>] y)
macro bool[<*>] uint128[<*>].comp_ne(uint128[<*>] x, uint128[<*>] y)
macro uint128 uint128[<*>].max(uint128[<*>] x)
macro uint128 uint128[<*>].min(uint128[<*>] x)
macro uint128 uint128[<*>].or(uint128[<*>] x)
macro uint128 uint128[<*>].product(uint128[<*>] x)
macro uint128 uint128[<*>].sum(uint128[<*>] x)
macro uint128 uint128[<*>].xor(uint128[<*>] x)
macro uint uint[<*>].and(uint[<*>] x)
macro bool[<*>] uint[<*>].comp_eq(uint[<*>] x, uint[<*>] y)
macro bool[<*>] uint[<*>].comp_ge(uint[<*>] x, uint[<*>] y)
macro bool[<*>] uint[<*>].comp_gt(uint[<*>] x, uint[<*>] y)
macro bool[<*>] uint[<*>].comp_le(uint[<*>] x, uint[<*>] y)
macro bool[<*>] uint[<*>].comp_lt(uint[<*>] x, uint[<*>] y)
macro bool[<*>] uint[<*>].comp_ne(uint[<*>] x, uint[<*>] y)
macro uint uint[<*>].max(uint[<*>] x)
macro uint uint[<*>].min(uint[<*>] x)
macro uint uint[<*>].or(uint[<*>] x)
macro uint uint[<*>].product(uint[<*>] x)
macro uint uint[<*>].sum(uint[<*>] x)
macro uint uint[<*>].xor(uint[<*>] x)
macro bool ulong.is_even(ulong x)
macro bool ulong.is_odd(ulong x)
macro ulong! ulong.overflow_add(ulong x, ulong y)
macro ulong! ulong.overflow_mul(ulong x, ulong y)
macro ulong! ulong.overflow_sub(ulong x, ulong y)
macro ulong ulong.sat_add(ulong x, ulong y)
macro ulong ulong.sat_mul(ulong x, ulong y)
macro ulong ulong.sat_shl(ulong x, ulong y)
macro ulong ulong.sat_sub(ulong x, ulong y)
macro ulong ulong[<*>].and(ulong[<*>] x)
macro bool[<*>] ulong[<*>].comp_eq(ulong[<*>] x, ulong[<*>] y)
macro bool[<*>] ulong[<*>].comp_ge(ulong[<*>] x, ulong[<*>] y)
macro bool[<*>] ulong[<*>].comp_gt(ulong[<*>] x, ulong[<*>] y)
macro bool[<*>] ulong[<*>].comp_le(ulong[<*>] x, ulong[<*>] y)
macro bool[<*>] ulong[<*>].comp_lt(ulong[<*>] x, ulong[<*>] y)
macro bool[<*>] ulong[<*>].comp_ne(ulong[<*>] x, ulong[<*>] y)
macro ulong ulong[<*>].max(ulong[<*>] x)
macro ulong ulong[<*>].min(ulong[<*>] x)
macro ulong ulong[<*>].or(ulong[<*>] x)
macro ulong ulong[<*>].product(ulong[<*>] x)
macro ulong ulong[<*>].sum(ulong[<*>] x)
macro ulong ulong[<*>].xor(ulong[<*>] x)
macro bool ushort.is_even(ushort x)
macro bool ushort.is_odd(ushort x)
macro ushort! ushort.overflow_add(ushort x, ushort y)
macro ushort! ushort.overflow_mul(ushort x, ushort y)
macro ushort! ushort.overflow_sub(ushort x, ushort y)
macro ushort ushort.sat_add(ushort x, ushort y)
macro ushort ushort.sat_mul(ushort x, ushort y)
macro ushort ushort.sat_shl(ushort x, ushort y)
macro ushort ushort.sat_sub(ushort x, ushort y)
macro ushort ushort[<*>].and(ushort[<*>] x)
macro bool[<*>] ushort[<*>].comp_eq(ushort[<*>] x, ushort[<*>] y)
macro bool[<*>] ushort[<*>].comp_ge(ushort[<*>] x, ushort[<*>] y)
macro bool[<*>] ushort[<*>].comp_gt(ushort[<*>] x, ushort[<*>] y)
macro bool[<*>] ushort[<*>].comp_le(ushort[<*>] x, ushort[<*>] y)
macro bool[<*>] ushort[<*>].comp_lt(ushort[<*>] x, ushort[<*>] y)
macro bool[<*>] ushort[<*>].comp_ne(ushort[<*>] x, ushort[<*>] y)
macro ushort ushort[<*>].max(ushort[<*>] x)
macro ushort ushort[<*>].min(ushort[<*>] x)
macro ushort ushort[<*>].or(ushort[<*>] x)
macro ushort ushort[<*>].product(ushort[<*>] x)
macro ushort ushort[<*>].sum(ushort[<*>] x)
macro ushort ushort[<*>].xor(ushort[<*>] x)

std::math::complex(<Real>)

macro Complex Complex.add(self, Complex b)
macro Complex Complex.add_each(self, Real b)
macro Complex Complex.div(self, Complex b)
macro Complex Complex.mul(self, Complex b)
macro Complex Complex.scale(self, Real s)
macro Complex Complex.sub(self, Complex b)
macro Complex Complex.sub_each(self, Real b)

std::math::easing

fn float back_in(float t, float b, float c, float d, float s = 1.70158f) @inline
fn float back_inout(float t, float b, float c, float d, float s = 1.70158f) @inline
fn float back_out(float t, float b, float c, float d, float s = 1.70158f) @inline
fn float bounce_in(float t, float b, float c, float d) @inline
fn float bounce_inout(float t, float b, float c, float d) @inline
fn float bounce_out(float t, float b, float c, float d) @inline
fn float circ_in(float t, float b, float c, float d) @inline
fn float circ_inout(float t, float b, float c, float d) @inline
fn float circ_out(float t, float b, float c, float d) @inline
fn float cubic_in(float t, float b, float c, float d) @inline
fn float cubic_inout(float t, float b, float c, float d) @inline
fn float cubic_out(float t, float b, float c, float d) @inline
fn float elastic_in(float t, float b, float c, float d) @inline
fn float elastic_inout(float t, float b, float c, float d) @inline
fn float elastic_out(float t, float b, float c, float d) @inline
fn float expo_in(float t, float b, float c, float d) @inline
fn float expo_inout(float t, float b, float c, float d) @inline
fn float expo_out(float t, float b, float c, float d) @inline
fn float linear_in(float t, float b, float c, float d) @inline
fn float linear_inout(float t, float b, float c, float d) @inline
fn float linear_none(float t, float b, float c, float d) @inline
fn float linear_out(float t, float b, float c, float d) @inline
fn float quad_in(float t, float b, float c, float d) @inline
fn float quad_inout(float t, float b, float c, float d) @inline
fn float quad_out(float t, float b, float c, float d) @inline
fn float sine_in(float t, float b, float c, float d) @inline
fn float sine_inout(float t, float b, float c, float d) @inline
fn float sine_out(float t, float b, float c, float d) @inline

std::math::matrix(<Real>)

struct Matrix2x2
struct Matrix3x3
struct Matrix4x4
fn Matrix2x2 Matrix2x2.add(&self, Matrix2x2 mat2)
fn Matrix2x2 Matrix2x2.adjoint(&self)
fn Real[<2>] Matrix2x2.apply(&self, Real[<2>] vec)
fn Matrix2x2 Matrix2x2.component_mul(&self, Real s)
fn Real Matrix2x2.determinant(&self)
fn Matrix2x2! Matrix2x2.inverse(&self)
fn Matrix2x2 Matrix2x2.mul(&self, Matrix2x2 b)
fn Matrix2x2 Matrix2x2.sub(&self, Matrix2x2 mat2)
fn Real Matrix2x2.trace(&self)
fn Matrix2x2 Matrix2x2.transpose(&self)
fn Matrix3x3 Matrix3x3.add(&self, Matrix3x3 mat2)
fn Matrix3x3 Matrix3x3.adjoint(&self)
fn Real[<3>] Matrix3x3.apply(&self, Real[<3>] vec)
fn Matrix3x3 Matrix3x3.component_mul(&self, Real s)
fn Real Matrix3x3.determinant(&self)
fn Matrix3x3! Matrix3x3.inverse(&self)
fn Matrix3x3 Matrix3x3.mul(&self, Matrix3x3 b)
fn Matrix3x3 Matrix3x3.rotate(&self, Real r)
fn Matrix3x3 Matrix3x3.scale(&self, Real[<2>] v)
fn Matrix3x3 Matrix3x3.sub(&self, Matrix3x3 mat2)
fn Real Matrix3x3.trace(&self)
fn Matrix3x3 Matrix3x3.translate(&self, Real[<2>] v)
fn Matrix3x3 Matrix3x3.transpose(&self)
fn Matrix4x4 Matrix4x4.add(&self, Matrix4x4 mat2)
fn Matrix4x4 Matrix4x4.adjoint(&self)
fn Real[<4>] Matrix4x4.apply(&self, Real[<4>] vec)
fn Matrix4x4 Matrix4x4.component_mul(&self, Real s)
fn Real Matrix4x4.determinant(&self)
fn Matrix4x4! Matrix4x4.inverse(&self)
fn Matrix4x4 Matrix4x4.mul(Matrix4x4* a, Matrix4x4 b)
fn Matrix4x4 Matrix4x4.rotate_x(&self, Real r)
fn Matrix4x4 Matrix4x4.rotate_y(&self, Real r)
fn Matrix4x4 Matrix4x4.rotate_z(&self, Real r)
fn Matrix4x4 Matrix4x4.scale(&self, Real[<3>] v)
fn Matrix4x4 Matrix4x4.sub(&self, Matrix4x4 mat2)
fn Real Matrix4x4.trace(&self)
fn Matrix4x4 Matrix4x4.translate(&self, Real[<3>] v)
fn Matrix4x4 Matrix4x4.transpose(&self)
fn Matrix4x4 ortho(Real left, Real right, Real top, Real bottom, Real near, Real far)
fn Matrix4x4 perspective(Real fov, Real aspect_ratio, Real near, Real far)

std::math::nolibc

macro double __math_oflow(ulong sign)
macro float __math_oflowf(uint sign)
macro double __math_uflow(ulong sign)
macro float __math_uflowf(uint sign)
macro __math_xflow(sign, v)
macro force_eval_add(x, v)

std::math::nolibc @if(env::NO_LIBC)

fn double __cos(double x, double y) @extern("__cos") @weak @nostrip
fn float __cosdf(double x) @extern("__cosdf") @weak @nostrip
fn int __rem_pio2(double x, double *y)
fn int __rem_pio2_large(double* x, double* y, int e0, int nx, int prec)
fn int __rem_pio2f(float x, double *y)
fn double __sin(double x, double y, int iy) @extern("__sin") @weak @nostrip
fn float __sindf(double x) @extern("__sindf") @weak @nostrip
fn double __tan(double x, double y, int odd) @extern("__tan") @weak @nostrip
fn float __tandf(double x, int odd) @extern("__tandf") @weak @nostrip
fn double _atan(double x) @weak @extern("atan") @nostrip
fn double _atan2(double y, double x) @weak @extern("atan2") @nostrip
fn float _atan2f(float y, float x) @weak @extern("atan2f") @nostrip
fn float _atanf(float x) @weak @extern("atanf") @nostrip
fn double _ceil(double x) @weak @extern("ceil") @nostrip
fn float _ceilf(float x) @weak @extern("ceilf") @nostrip
fn double _cos(double x) @weak @nostrip
fn float _cosf(float x) @extern("cosf") @weak @nostrip
fn double _exp2(double x) @extern("exp2") @weak @nostrip
fn float _exp2f(float x) @extern("exp2f") @weak @nostrip
fn double _floor(double x) @weak @extern("floor") @nostrip
fn float _floorf(float x) @weak @extern("floorf") @nostrip
fn double _round(double x) @extern("round") @weak @nostrip
fn float _roundf(float x) @extern("roundf") @weak @nostrip
fn double _scalbn(double x, int n) @weak @extern("scalbn") @nostrip
fn float _sinf(float x) @weak @extern("sinf") @nostrip
fn double _trunc(double x) @weak @extern("trunc") @nostrip
fn float _truncf(float x) @weak @extern("truncf") @nostrip
fn double pow_broken(double x, double y) @extern("pow") @weak @nostrip
fn float powf_broken(float x, float f) @extern("powf") @weak @nostrip
fn double sin(double x) @extern("sin") @weak @nostrip
fn void sincos(double x, double *sin, double *cos) @extern("sincos") @weak @nostrip
fn double sincos_broken(double x) @extern("sincos") @weak @nostrip
fn void sincosf(float x, float *sin, float *cos) @extern("sincosf") @weak @nostrip
fn double tan(double x) @extern("tan") @weak @nostrip
fn float tanf(float x) @extern("tanf") @weak @nostrip

std::math::quaternion(<Real>)

macro Quaternion Quaternion.add(Quaternion a, Quaternion b)
macro Quaternion Quaternion.add_each(Quaternion a, Real b)
fn Quaternion Quaternion.invert(q)
macro Real Quaternion.length(Quaternion q)
macro Quaternion Quaternion.lerp(Quaternion q1, Quaternion q2, Real amount)
fn Quaternion Quaternion.mul(a, Quaternion b)
fn Quaternion Quaternion.nlerp(Quaternion q1, Quaternion q2, Real amount)
macro Quaternion Quaternion.normalize(Quaternion q)
macro Quaternion Quaternion.scale(Quaternion a, Real s)
fn Quaternion Quaternion.slerp(q1, Quaternion q2, Real amount)
macro Quaternion Quaternion.sub(Quaternion a, Quaternion b)
macro Quaternion Quaternion.sub_each(Quaternion a, Real b)
macro Matrix4 Quaternion.to_matrix(Quaternion* q)
macro Matrix4f Quaternion.to_matrixf(Quaternion* q)

std::math::random

distinct Lcg128Random (Random) = uint128;
distinct Lcg16Random (Random) = ushort;
distinct Lcg32Random (Random) = uint;
distinct Lcg64Random (Random) = ulong;
distinct Mcg128Random (Random) = uint128;
distinct Mcg16Random (Random) = ushort;
distinct Mcg32Random (Random) = uint;
distinct Mcg64Random (Random) = ulong;
distinct Pcg128Random (Random) = uint128;
distinct Pcg16Random (Random) = ushort;
distinct Pcg32Random (Random) = uint;
distinct Pcg64Random (Random) = ulong;
distinct Sfc128Random (Random) = uint128[4];
distinct Sfc16Random (Random) = ushort[4];
distinct Sfc32Random (Random) = uint[4];
distinct Sfc64Random (Random) = ulong[4];
distinct Sfc8Random (Random) = char[4];
distinct SimpleRandom (Random) = ulong;
interface Random
struct Msws128Random (Random)
struct Msws16Random (Random)
struct Msws32Random (Random)
struct Msws64Random (Random)
struct Msws8Random (Random)
fn void Msws16Random.set_seed(&self, char[] input) @dynamic
fn void Msws32Random.set_seed(&self, char[] input) @dynamic
fn void Msws64Random.set_seed(&self, char[] input) @dynamic
fn void Msws8Random.set_seed(&self, char[] input) @dynamic
fn void Pcg128Random.set_seed(&self, char[] input) @dynamic
fn void Sfc128Random.set_seed(&self, char[] input) @dynamic
fn void Sfc16Random.set_seed(&self, char[] input) @dynamic
fn void Sfc32Random.set_seed(&self, char[] input) @dynamic
fn void Sfc64Random.set_seed(&self, char[] input) @dynamic
fn void Sfc8Random.set_seed(&self, char[] input) @dynamic
fn char[8 * 4] entropy()
macro ushort @char_to_short(#function)
macro ulong @int_to_long(#function)
macro uint128 @long_to_int128(#function)
macro @random_value_to_bytes(#function, char[] bytes)
macro uint @short_to_int(#function)
fn char Lcg128Random.next_byte(&self) @dynamic
fn void Lcg128Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Lcg128Random.next_int(&self) @dynamic
fn uint128 Lcg128Random.next_int128(&self) @dynamic
fn ulong Lcg128Random.next_long(&self) @dynamic
fn ushort Lcg128Random.next_short(&self) @dynamic
fn void Lcg128Random.set_seed(&self, char[] input) @dynamic
fn char Lcg16Random.next_byte(&self) @dynamic
fn void Lcg16Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Lcg16Random.next_int(&self) @dynamic
fn uint128 Lcg16Random.next_int128(&self) @dynamic
fn ulong Lcg16Random.next_long(&self) @dynamic
fn ushort Lcg16Random.next_short(&self) @dynamic
fn void Lcg16Random.set_seed(&self, char[] seed) @dynamic
fn char Lcg32Random.next_byte(&self) @dynamic
fn void Lcg32Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Lcg32Random.next_int(&self) @dynamic
fn uint128 Lcg32Random.next_int128(&self) @dynamic
fn ulong Lcg32Random.next_long(&self) @dynamic
fn ushort Lcg32Random.next_short(&self) @dynamic
fn void Lcg32Random.set_seed(&self, char[] seed) @dynamic
fn char Lcg64Random.next_byte(&self) @dynamic
fn void Lcg64Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Lcg64Random.next_int(&self) @dynamic
fn uint128 Lcg64Random.next_int128(&self) @dynamic
fn ulong Lcg64Random.next_long(&self) @dynamic
fn ushort Lcg64Random.next_short(&self) @dynamic
fn void Lcg64Random.set_seed(&self, char[] seed) @dynamic
fn char Mcg128Random.next_byte(&self) @dynamic
fn void Mcg128Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Mcg128Random.next_int(&self) @dynamic
fn uint128 Mcg128Random.next_int128(&self) @dynamic
fn ulong Mcg128Random.next_long(&self) @dynamic
fn ushort Mcg128Random.next_short(&self) @dynamic
fn void Mcg128Random.set_seed(&self, char[] seed) @dynamic
fn char Mcg16Random.next_byte(&self) @dynamic
fn void Mcg16Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Mcg16Random.next_int(&self) @dynamic
fn uint128 Mcg16Random.next_int128(&self) @dynamic
fn ulong Mcg16Random.next_long(&self) @dynamic
fn ushort Mcg16Random.next_short(&self) @dynamic
fn void Mcg16Random.set_seed(&self, char[] seed) @dynamic
fn char Mcg32Random.next_byte(&self) @dynamic
fn void Mcg32Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Mcg32Random.next_int(&self) @dynamic
fn uint128 Mcg32Random.next_int128(&self) @dynamic
fn ulong Mcg32Random.next_long(&self) @dynamic
fn ushort Mcg32Random.next_short(&self) @dynamic
fn void Mcg32Random.set_seed(&self, char[] seed) @dynamic
fn char Mcg64Random.next_byte(&self) @dynamic
fn void Mcg64Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Mcg64Random.next_int(&self) @dynamic
fn uint128 Mcg64Random.next_int128(&self) @dynamic
fn ulong Mcg64Random.next_long(&self) @dynamic
fn ushort Mcg64Random.next_short(&self) @dynamic
fn void Mcg64Random.set_seed(&self, char[] seed) @dynamic
fn char Msws128Random.next_byte(&self) @dynamic
fn void Msws128Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Msws128Random.next_int(&self) @dynamic
fn uint128 Msws128Random.next_int128(&self) @dynamic
fn ulong Msws128Random.next_long(&self) @dynamic
fn ushort Msws128Random.next_short(&self) @dynamic
fn void Msws128Random.set_seed(&self, char[] input) @dynamic
fn char Msws16Random.next_byte(&self) @dynamic
fn void Msws16Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Msws16Random.next_int(&self) @dynamic
fn uint128 Msws16Random.next_int128(&self) @dynamic
fn ulong Msws16Random.next_long(&self) @dynamic
fn ushort Msws16Random.next_short(&self) @dynamic
fn char Msws32Random.next_byte(&self) @dynamic
fn void Msws32Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Msws32Random.next_int(&self) @dynamic
fn uint128 Msws32Random.next_int128(&self) @dynamic
fn ulong Msws32Random.next_long(&self) @dynamic
fn ushort Msws32Random.next_short(&self) @dynamic
fn char Msws64Random.next_byte(&self) @dynamic
fn void Msws64Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Msws64Random.next_int(&self) @dynamic
fn uint128 Msws64Random.next_int128(&self) @dynamic
fn ulong Msws64Random.next_long(&self) @dynamic
fn ushort Msws64Random.next_short(&self) @dynamic
fn char Msws8Random.next_byte(&self) @dynamic
fn void Msws8Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Msws8Random.next_int(&self) @dynamic
fn uint128 Msws8Random.next_int128(&self) @dynamic
fn ulong Msws8Random.next_long(&self) @dynamic
fn ushort Msws8Random.next_short(&self) @dynamic
fn char Pcg128Random.next_byte(&self) @dynamic
fn void Pcg128Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Pcg128Random.next_int(&self) @dynamic
fn uint128 Pcg128Random.next_int128(&self) @dynamic
fn ulong Pcg128Random.next_long(&self) @dynamic
fn ushort Pcg128Random.next_short(&self) @dynamic
fn char Pcg16Random.next_byte(&self) @dynamic
fn void Pcg16Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Pcg16Random.next_int(&self) @dynamic
fn uint128 Pcg16Random.next_int128(&self) @dynamic
fn ulong Pcg16Random.next_long(&self) @dynamic
fn ushort Pcg16Random.next_short(&self) @dynamic
fn void Pcg16Random.set_seed(&self, char[] input) @dynamic
fn char Pcg32Random.next_byte(&self) @dynamic
fn void Pcg32Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Pcg32Random.next_int(&self) @dynamic
fn uint128 Pcg32Random.next_int128(&self) @dynamic
fn ulong Pcg32Random.next_long(&self) @dynamic
fn ushort Pcg32Random.next_short(&self) @dynamic
fn void Pcg32Random.set_seed(&self, char[] input) @dynamic
fn char Pcg64Random.next_byte(&self) @dynamic
fn void Pcg64Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Pcg64Random.next_int(&self) @dynamic
fn uint128 Pcg64Random.next_int128(&self) @dynamic
fn ulong Pcg64Random.next_long(&self) @dynamic
fn ushort Pcg64Random.next_short(&self) @dynamic
fn void Pcg64Random.set_seed(&self, char[] input) @dynamic
fn char Sfc128Random.next_byte(&self) @dynamic
fn void Sfc128Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Sfc128Random.next_int(&self) @dynamic
fn uint128 Sfc128Random.next_int128(&self) @dynamic
fn ulong Sfc128Random.next_long(&self) @dynamic
fn ushort Sfc128Random.next_short(&self) @dynamic
fn char Sfc16Random.next_byte(&self) @dynamic
fn void Sfc16Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Sfc16Random.next_int(&self) @dynamic
fn uint128 Sfc16Random.next_int128(&self) @dynamic
fn ulong Sfc16Random.next_long(&self) @dynamic
fn ushort Sfc16Random.next_short(&seed) @dynamic
fn char Sfc32Random.next_byte(&self) @dynamic
fn void Sfc32Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Sfc32Random.next_int(&sfc) @dynamic
fn uint128 Sfc32Random.next_int128(&self) @dynamic
fn ulong Sfc32Random.next_long(&self) @dynamic
fn ushort Sfc32Random.next_short(&self) @dynamic
fn char Sfc64Random.next_byte(&self) @dynamic
fn void Sfc64Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Sfc64Random.next_int(&self) @dynamic
fn uint128 Sfc64Random.next_int128(&self) @dynamic
fn ulong Sfc64Random.next_long(&self) @dynamic
fn ushort Sfc64Random.next_short(&self) @dynamic
fn char Sfc8Random.next_byte(&self) @dynamic
fn void Sfc8Random.next_bytes(&self, char[] bytes) @dynamic
fn uint Sfc8Random.next_int(&self) @dynamic
fn uint128 Sfc8Random.next_int128(&self) @dynamic
fn ulong Sfc8Random.next_long(&self) @dynamic
fn ushort Sfc8Random.next_short(&self) @dynamic
fn char SimpleRandom.next_byte(&self) @dynamic
fn void SimpleRandom.next_bytes(&self, char[] bytes) @dynamic
fn uint SimpleRandom.next_int(&self) @dynamic
fn uint128 SimpleRandom.next_int128(&self) @dynamic
fn ulong SimpleRandom.next_long(&self) @dynamic
fn ushort SimpleRandom.next_short(&self) @dynamic
fn void SimpleRandom.set_seed(&self, char[] seed) @dynamic
macro bool is_random(random)
macro make_seed($Type, char[] input)
macro int next(random, int max)
macro void next_bool(random)
macro double next_double(random)
macro float next_float(random)
fn int rand(int max) @builtin
macro void seed(random, seed)
macro void seed_entropy(random)
fn void seeder(char[] input, char[] out_buffer)

std::math::vector

macro Vec2.angle(self, Vec2 v2)
macro Vec2.clamp_mag(self, double min, double max)
macro Vec2.distance_sq(self, Vec2 v2)
macro Vec2.length_sq(self)
macro Vec2.rotate(self, double angle)
fn Vec2 Vec2.towards(self, Vec2 target, double max_distance)
macro Vec2.transform(self, Matrix4 mat)
macro Vec2f.angle(self, Vec2f v2)
macro Vec2f.clamp_mag(self, float min, float max)
macro Vec2f.distance_sq(self, Vec2f v2)
macro Vec2f.length_sq(self)
macro Vec2f.rotate(self, float angle)
fn Vec2f Vec2f.towards(self, Vec2f target, float max_distance)
macro Vec2f.transform(self, Matrix4f mat)
fn double Vec3.angle(self, Vec3 v2)
fn Vec3 Vec3.barycenter(self, Vec3 a, Vec3 b, Vec3 c)
macro Vec3.clamp_mag(self, double min, double max)
fn Vec3 Vec3.cross(self, Vec3 v2)
macro Vec3.distance_sq(self, Vec3 v2)
macro Vec3.length_sq(self)
fn Vec3 Vec3.perpendicular(self)
fn Vec3 Vec3.refract(self, Vec3 n, double r)
fn Vec3 Vec3.rotate_axis(self, Vec3 axis, double angle)
fn Vec3 Vec3.rotate_quat(self, Quaternion q)
fn Vec3 Vec3.towards(self, Vec3 target, double max_distance)
fn Vec3 Vec3.transform(self, Matrix4 mat)
fn Vec3 Vec3.unproject(self, Matrix4 projection, Matrix4 view)
fn float Vec3f.angle(self, Vec3f v2)
fn Vec3f Vec3f.barycenter(self, Vec3f a, Vec3f b, Vec3f c)
macro Vec3f.clamp_mag(self, float min, float max)
fn Vec3f Vec3f.cross(self, Vec3f v2)
macro Vec3f.distance_sq(self, Vec3f v2)
macro Vec3f.length_sq(self)
fn Vec3f Vec3f.perpendicular(self)
fn Vec3f Vec3f.refract(self, Vec3f n, float r)
fn Vec3f Vec3f.rotate_axis(self, Vec3f axis, float angle)
fn Vec3f Vec3f.rotate_quat(self, Quaternionf q)
fn Vec3f Vec3f.towards(self, Vec3f target, float max_distance)
fn Vec3f Vec3f.transform(self, Matrix4f mat)
fn Vec3f Vec3f.unproject(self, Matrix4f projection, Matrix4f view)
macro Vec4.clamp_mag(self, double min, double max)
macro Vec4.distance_sq(self, Vec4 v2)
macro Vec4.length_sq(self)
fn Vec4 Vec4.towards(self, Vec4 target, double max_distance)
macro Vec4f.clamp_mag(self, float min, float max)
macro Vec4f.distance_sq(self, Vec4f v2)
macro Vec4f.length_sq(self)
fn Vec4f Vec4f.towards(self, Vec4f target, float max_distance)
fn Matrix4 matrix4_look_at(Vec3 eye, Vec3 target, Vec3 up)
fn Matrix4f matrix4f_look_at(Vec3f eye, Vec3f target, Vec3f up)
fn void ortho_normalize(Vec3f* v1, Vec3f* v2)
fn void ortho_normalized(Vec3* v1, Vec3* v2)

std::net

enum IpProtocol : char (AIFamily ai_family)
fault NetError
struct InetAddress (Printable)
fn bool InetAddress.is_any_local(InetAddress* addr)
fn bool InetAddress.is_link_local(InetAddress* addr)
fn bool InetAddress.is_loopback(InetAddress* addr)
fn bool InetAddress.is_multicast(InetAddress* addr)
fn bool InetAddress.is_multicast_global(InetAddress* addr)
fn bool InetAddress.is_multicast_link_local(InetAddress* addr)
fn bool InetAddress.is_multicast_node_local(InetAddress* addr)
fn bool InetAddress.is_multicast_org_local(InetAddress* addr)
fn bool InetAddress.is_multicast_site_local(InetAddress* addr)
fn bool InetAddress.is_site_local(InetAddress* addr)
fn usz! InetAddress.to_format(InetAddress* addr, Formatter* formatter) @dynamic
fn String InetAddress.to_new_string(InetAddress* addr, Allocator allocator = allocator::heap()) @dynamic
fn AddrInfo*! addrinfo(String host, uint port, AIFamily ai_family, AISockType ai_socktype) @if(os::SUPPORTS_INET)
fn String! int_to_new_ipv4(uint val, Allocator allocator = allocator::heap())
fn String! int_to_temp_ipv4(uint val)
fn InetAddress! ipv4_from_str(String s)
fn uint! ipv4toint(String s)
fn InetAddress! ipv6_from_str(String s)

std::net @if(os::SUPPORTS_INET)

distinct PollEvents = ushort;
distinct PollSubscribes = ushort;
enum SocketOption : char (CInt value)
struct Poll
struct Socket (InStream, OutStream)
macro void @loop_over_ai(AddrInfo* ai; @body(NativeSocket fd, AddrInfo* ai))
fn void! Socket.close(&self) @inline @dynamic
fn void! Socket.destroy(&self) @dynamic
fn bool! Socket.get_broadcast(&self)
fn bool! Socket.get_dontroute(&self)
fn bool! Socket.get_keepalive(&self)
fn bool! Socket.get_oobinline(&self)
fn bool! Socket.get_option(&self, SocketOption option)
fn bool! Socket.get_reuseaddr(&self)
fn usz! Socket.read(&self, char[] bytes) @dynamic
fn char! Socket.read_byte(&self) @dynamic
fn void! Socket.set_broadcast(&self, bool value)
fn void! Socket.set_dontroute(&self, bool value)
fn void! Socket.set_keepalive(&self, bool value)
fn void! Socket.set_oobinline(&self, bool value)
fn void! Socket.set_option(&self, SocketOption option, bool value)
fn void! Socket.set_reuseaddr(&self, bool value)
fn usz! Socket.write(&self, char[] bytes) @dynamic
fn void! Socket.write_byte(&self, char byte) @dynamic
macro Socket new_socket(fd, ai)
fn ulong! poll(Poll[] polls, Duration timeout)
fn ulong! poll_ms(Poll[] polls, long timeout_ms)

std::net::os

distinct AIFamily = CInt;
distinct AIFlags = CInt;
distinct AIProtocol = CInt;
distinct AISockType = CInt;
distinct SockAddrPtr = void*;
struct AddrInfo

std::net::os @if(env::POSIX && SUPPORTS_INET)

distinct NativeSocket = inline Fd;
struct Posix_pollfd
macro void! NativeSocket.close(self)
macro bool NativeSocket.is_non_blocking(self)
macro void! NativeSocket.set_non_blocking(self, bool non_blocking)
fn anyfault convert_error(Errno error)
fn anyfault socket_error()

std::net::os @if(env::WIN32)

distinct NativeSocket = uptr;
macro void! NativeSocket.close(self)
fn void! NativeSocket.set_non_blocking(self, bool non_blocking)
fn anyfault convert_error(WSAError error)
fn anyfault socket_error()

std::net::tcp @if(os::SUPPORTS_INET)

distinct TcpServerSocket = inline Socket;
distinct TcpSocket = inline Socket;
fn TcpSocket! accept(TcpServerSocket* server_socket)
fn TcpSocket! connect(String host, uint port, Duration timeout = 0, SocketOption... options, IpProtocol ip_protocol = UNSPECIFIED)
fn TcpSocket! connect_async(String host, uint port, SocketOption... options, IpProtocol ip_protocol = UNSPECIFIED)
fn TcpSocket! connect_async_to(AddrInfo* ai, SocketOption... options)
fn TcpSocket! connect_to(AddrInfo* ai, SocketOption... options)
fn TcpServerSocket! listen(String host, uint port, uint backlog, SocketOption... options, IpProtocol ip_protocol = UNSPECIFIED)
fn TcpServerSocket! listen_to(AddrInfo* ai, uint backlog, SocketOption... options)

std::net::udp @if(os::SUPPORTS_INET)

distinct UdpSocket = inline Socket;
fn UdpSocket! connect(String host, uint port, SocketOption... options, IpProtocol ip_protocol = UNSPECIFIED)
fn UdpSocket! connect_async(String host, uint port, SocketOption... options, IpProtocol ip_protocol = UNSPECIFIED)
fn UdpSocket! connect_async_to(AddrInfo* ai, SocketOption... options)
fn UdpSocket! connect_to(AddrInfo* ai, SocketOption... options)

std::os @if(env::DARWIN)

fn uint num_cpu()

std::os @if(env::LINUX)

fn uint num_cpu()

std::os @if(env::WIN32)

fn uint num_cpu()

std::os::backtrace

fault BacktraceFault
struct Backtrace (Printable)
fn void Backtrace.free(&self)
fn bool Backtrace.has_file(&self)
fn Backtrace* Backtrace.init(&self, uptr offset, String function, String object_file, String file = "", uint line = 0, Allocator allocator)
fn bool Backtrace.is_unknown(&self)
fn usz! Backtrace.to_format(&self, Formatter* formatter) @dynamic
fn void*[] capture_current(void*[] buffer)
fn BacktraceList! symbolize_backtrace(void*[] backtrace, Allocator allocator) @if(!env::NATIVE_STACKTRACE)

std::os::darwin @if(env::DARWIN)

struct Darwin_Dl_info
struct Darwin_segment_command_64
fn String! executable_path(Allocator allocator)
fn BacktraceList! symbolize_backtrace(void*[] backtrace, Allocator allocator)

std::os::env

fn bool clear_var(String name)
fn String! executable_path(Allocator allocator = allocator::heap())
fn Path! get_config_dir(Allocator allocator = allocator::heap())
fn String! get_home_dir(Allocator using = allocator::heap())
fn String! get_var(String name, Allocator allocator = allocator::heap())
fn String! get_var_temp(String name)
fn bool set_var(String name, String value, bool overwrite = true)

std::os::linux @if(env::LINUX)

struct Elf32_Ehdr
struct Elf32_Phdr
struct Elf64_Ehdr
struct Elf64_Phdr
struct Linux_Dl_info
fn BacktraceList! symbolize_backtrace(void*[] backtrace, Allocator allocator)

std::os::macos::cf @if(env::DARWIN) @link(env::DARWIN, “CoreFoundation.framework”)

distinct CFAllocatorContextRef = void*;
distinct CFAllocatorRef = void*;
distinct CFArrayCallBacksRef = void*;
distinct CFArrayRef = void*;
distinct CFMutableArrayRef = void*;
distinct CFTypeRef = void*;
struct CFRange
macro void* CFAllocatorRef.alloc(CFAllocatorRef allocator, usz size)
macro void CFAllocatorRef.dealloc(CFAllocatorRef allocator, void* ptr)
macro usz CFAllocatorRef.get_preferred_size(CFAllocatorRef allocator, usz req_size)
macro void CFAllocatorRef.set_default(CFAllocatorRef allocator)
macro CFAllocatorRef default_allocator()

std::os::macos::objc @if(env::DARWIN) @link(env::DARWIN, “CoreFoundation.framework”)

distinct Class = void*;
distinct Ivar = void*;
distinct Method = void*;
distinct Selector = void*;
fault ObjcFailure
macro bool Class.equals(Class a, Class b)
macro Method Class.method(Class cls, Selector name)
macro ZString Class.name(Class cls)
macro bool Class.responds_to(Class cls, Selector sel)
macro Class Class.superclass(Class cls)
macro bool Selector.equals(Selector a, Selector b)
macro Class! class_by_name(ZString c)
macro Class[] class_get_list(Allocator allocator = allocator::heap())

std::os::posix @if(env::POSIX)

distinct DIRPtr = void*;
distinct Pthread_t = void*;
struct Posix_dirent
struct Posix_spawn_file_actions_t
struct Posix_spawnattr_t
fn CInt backtrace(void** buffer, CInt size)
macro CInt wEXITSTATUS(CInt status)
macro bool wIFCONTINUED(CInt status)
macro bool wIFEXITED(CInt status)
macro bool wIFSIGNALED(CInt status)
macro bool wIFSTOPPED(CInt status)
macro CInt wSTOPSIG(CInt status)
macro CInt wTERMSIG(CInt status)
macro CInt wWCOREDUMP(CInt status)
macro CInt w_EXITCODE(CInt ret, CInt sig)
macro CInt w_STOPCODE(CInt sig)

std::os::process @if(env::WIN32 || env::POSIX)

fault SubProcessResult
struct SubProcess
fn bool SubProcess.destroy(&self)
fn bool! SubProcess.is_running(&self)
fn CInt! SubProcess.join(&self) @if(env::POSIX)
fn CInt! SubProcess.join(&self) @if(env::WIN32)
fn usz! SubProcess.read_stderr(&self, char* buffer, usz size)
fn usz! SubProcess.read_stdout(&self, char* buffer, usz size)
fn File SubProcess.stdout(&self)
fn void! SubProcess.terminate(&self)
fn SubProcess! create(String[] command_line, SubProcessOptions options = {}, String[] environment = {}) @if(env::POSIX)
fn SubProcess! create(String[] command_line, SubProcessOptions options = {}, String[] environment = {}) @if(env::WIN32)
fn String! execute_stdout_to_buffer(char[] buffer, String[] command_line, SubProcessOptions options = {}, String[] environment = {})

std::os::win32

distinct Win32_CRITICAL_SECTION = ulong[5];
enum Win32_ADDRESS_MODE
enum Win32_SYM_TYPE
struct Win32_ADDRESS64
struct Win32_AMD64_CONTEXT @align(16)
struct Win32_ARM64_NT_CONTEXT @align(16)
struct Win32_ARM64_NT_NEON128
struct Win32_FILETIME
struct Win32_GUID
struct Win32_IMAGEHLP_LINE64
struct Win32_IMAGEHLP_MODULE64
struct Win32_IMAGE_DATA_DIRECTORY
struct Win32_IMAGE_FILE_HEADER
struct Win32_IMAGE_NT_HEADERS
struct Win32_IMAGE_OPTIONAL_HEADER64
struct Win32_KDHELP64
struct Win32_M128A @align(16)
struct Win32_MODLOAD_DATA
struct Win32_MODULEINFO
struct Win32_OVERLAPPED
struct Win32_PROCESS_INFORMATION
struct Win32_SECURITY_ATTRIBUTES
struct Win32_STACKFRAME64
struct Win32_STARTUPINFOEXW
struct Win32_STARTUPINFOW
struct Win32_SYMBOL_INFO
struct Win32_SYSTEM_INFO
struct Win32_UNICODE_STRING
struct Win32_XMM_SAVE_AREA32

std::os::win32 @if(env::WIN32)

distinct WSAError = int;
enum Win32_GET_FILEEX_INFO_LEVELS
struct Symbol
struct Win32_FILE_ATTRIBUTE_DATA
struct Win32_WIN32_FIND_DATAW
struct Win32_pollfd
fn Win32_DWORD! load_modules()
fn Backtrace! resolve_backtrace(void* addr, Win32_HANDLE process, Allocator allocator)
fn BacktraceList! symbolize_backtrace(void*[] backtrace, Allocator allocator)

std::sort

macro bool @is_comparer(#cmp, #list)
macro usz @len_from_list(&list)
macro usz binarysearch(list, x, cmp = null) @builtin
macro quicksort(list, cmp = null) @builtin

std::sort::qs(<Type, Comparer>)

fn void qsort(Type list, isz low, isz high, Comparer cmp)

std::thread

distinct ConditionVariable = NativeConditionVariable;
distinct Mutex = NativeMutex;
distinct MutexType = int;
distinct OnceFlag = NativeOnceFlag;
distinct RecursiveMutex = inline Mutex;
distinct Thread = NativeThread;
distinct TimedMutex = inline Mutex;
distinct TimedRecursiveMutex = inline Mutex;
fault ThreadFault
macro void! ConditionVariable.broadcast(&cond)
macro void! ConditionVariable.destroy(&cond)
macro void! ConditionVariable.init(&cond)
macro void! ConditionVariable.signal(&cond)
macro void! ConditionVariable.wait(&cond, Mutex* mutex)
macro void! ConditionVariable.wait_timeout(&cond, Mutex* mutex, ulong timeout)
macro void! Mutex.destroy(&mutex)
macro void! Mutex.init(&mutex)
macro void! Mutex.lock(&mutex)
macro bool Mutex.try_lock(&mutex)
macro void! Mutex.unlock(&mutex)
macro void OnceFlag.call(&flag, OnceFn func)
macro void! RecursiveMutex.init(&mutex)
macro void! Thread.create(&thread, ThreadFn thread_fn, void* arg)
macro void! Thread.detach(thread)
macro bool Thread.equals(thread, Thread other)
macro int! Thread.join(thread)
macro void! TimedMutex.init(&mutex)
macro void! TimedMutex.lock_timeout(&mutex, ulong ms)
macro void! TimedRecursiveMutex.init(&mutex)
macro void! TimedRecursiveMutex.lock_timeout(&mutex, ulong ms)
macro Thread current()
macro void exit(int result)
macro void! sleep(Duration d) @maydiscard
macro void! sleep_ms(ulong ms) @maydiscard
macro void! sleep_ns(NanoDuration ns) @maydiscard
macro void yield()

std::thread::cpu @if(env::DARWIN)

fn uint native_cpu()

std::thread::cpu @if(env::LINUX)

fn uint native_cpu()

std::thread::cpu @if(env::WIN32)

fn uint native_cpu()

std::thread::os @if (!env::POSIX && !env::WIN32)

distinct NativeConditionVariable = int;
distinct NativeMutex = int;
distinct NativeOnceFlag = int;
distinct NativeThread = int;

std::thread::os @if(env::LINUX)

distinct Pthread_attr_t = ulong[7]; // 24 on 32bit
distinct Pthread_cond_t = ulong[6];
distinct Pthread_condattr_t = uint;
distinct Pthread_key_t = uint;
distinct Pthread_mutex_t = ulong[5]; // 24 on 32 bit
distinct Pthread_mutexattr_t = uint;
distinct Pthread_once_t = int;
distinct Pthread_rwlock_t = ulong[7]; // 32 on 3bit
distinct Pthread_rwlockattr_t = uint;
distinct Pthread_sched_param = uint;

std::thread::os @if(env::POSIX && !env::LINUX)

distinct Pthread_attr_t = ulong[8];
distinct Pthread_cond_t = ulong[6];
distinct Pthread_condattr_t = ulong[8];
distinct Pthread_key_t = ulong;
distinct Pthread_mutex_t = ulong[8];
distinct Pthread_mutexattr_t = ulong[2];
distinct Pthread_once_t = ulong[2];
distinct Pthread_rwlock_t = ulong[25];
distinct Pthread_rwlockattr_t = ulong[3];
distinct Pthread_sched_param = ulong;

std::thread::os @if(env::POSIX)

struct NativeMutex
fn void! NativeConditionVariable.broadcast(&cond)
fn void! NativeConditionVariable.destroy(&cond)
fn void! NativeConditionVariable.init(&cond)
fn void! NativeConditionVariable.signal(&cond)
fn void! NativeConditionVariable.wait(&cond, NativeMutex* mtx)
fn void! NativeConditionVariable.wait_timeout(&cond, NativeMutex* mtx, ulong ms)
fn void! NativeMutex.destroy(&self)
fn void! NativeMutex.init(&self, MutexType type)
fn bool NativeMutex.is_initialized(&self)
fn void! NativeMutex.lock(&self)
fn void! NativeMutex.lock_timeout(&self, ulong ms)
fn bool NativeMutex.try_lock(&self)
fn void! NativeMutex.unlock(&self)
fn void NativeOnceFlag.call_once(&flag, OnceFn func)
fn void! NativeThread.create(&thread, ThreadFn thread_fn, void* arg)
fn void! NativeThread.detach(thread)
fn bool NativeThread.equals(thread, NativeThread other)
fn int! NativeThread.join(thread)
fn void! native_sleep_nano(NanoDuration nano)
fn NativeThread native_thread_current()
fn void native_thread_exit(int result)
fn void native_thread_yield()

std::thread::os @if(env::WIN32)

distinct NativeThread = inline Win32_HANDLE;
struct NativeConditionVariable
struct NativeMutex
struct NativeOnceFlag
fn void! NativeConditionVariable.broadcast(&cond)
fn void! NativeConditionVariable.destroy(&cond) @maydiscard
fn void! NativeConditionVariable.init(&cond)
fn void! NativeConditionVariable.signal(&cond)
fn void! NativeConditionVariable.wait(&cond, NativeMutex* mtx) @inline
fn void! NativeConditionVariable.wait_timeout(&cond, NativeMutex* mtx, uint time) @inline
fn void! NativeMutex.destroy(&mtx)
fn void! NativeMutex.init(&mtx, MutexType type)
fn void! NativeMutex.lock(&mtx)
fn void! NativeMutex.lock_timeout(&mtx, usz ms)
fn bool NativeMutex.try_lock(&mtx)
fn void! NativeMutex.unlock(&mtx)
fn void NativeOnceFlag.call_once(&flag, OnceFn func)
fn void! NativeThread.create(&thread, ThreadFn func, void* args)
fn void! NativeThread.detach(thread) @inline
fn bool NativeThread.equals(thread, NativeThread other)
fn int! NativeThread.join(thread)
fn void! native_sleep_nano(NanoDuration ns)
fn NativeThread native_thread_current()
fn void native_thread_exit(int result) @inline
fn void native_thread_yield()

std::thread::pool(<SIZE>)

struct QueueItem
struct ThreadPool
fn void! ThreadPool.destroy(&self)
fn void! ThreadPool.init(&self)
fn void! ThreadPool.push(&self, ThreadFn func, void* arg)
fn void! ThreadPool.stop_and_destroy(&self)

std::time

distinct Clock = ulong;
distinct Duration = long;
distinct NanoDuration (Printable) = long;
distinct Time = long;
enum Month : char
enum Weekday : char
struct DateTime
struct TzDateTime
fn long Duration.to_ms(td)
fn NanoDuration Duration.to_nano(td)
fn Duration NanoDuration.to_duration(nd)
fn usz! NanoDuration.to_format(&self, Formatter* formatter) @dynamic
fn long NanoDuration.to_ms(nd)
fn double NanoDuration.to_sec(nd)
fn Time Time.add_days(time, long days)
fn Time Time.add_duration(time, Duration duration)
fn Time Time.add_hours(time, long hours)
fn Time Time.add_minutes(time, long minutes)
fn Time Time.add_seconds(time, long seconds)
fn Time Time.add_weeks(time, long weeks)
fn double Time.diff_days(time, Time other)
fn double Time.diff_hour(time, Time other)
fn double Time.diff_min(time, Time other)
fn double Time.diff_sec(time, Time other)
fn Duration Time.diff_us(time, Time other)
fn double Time.diff_weeks(time, Time other)
fn double Time.to_seconds(time)
fn Duration from_float(double s) @inline
fn Duration hour(long l) @inline
fn Duration min(long l) @inline
fn Duration ms(long l) @inline
fn Time now()
fn Duration sec(long l) @inline

std::time::clock

fn NanoDuration Clock.mark(&self)
fn NanoDuration Clock.to_now(self)
fn Clock now()

std::time::datetime @if(env::LIBC)

fn DateTime DateTime.add_days(&self, int days)
fn DateTime DateTime.add_hours(&self, int hours)
fn DateTime DateTime.add_minutes(&self, int minutes)
fn DateTime DateTime.add_months(&self, int months)
fn DateTime DateTime.add_seconds(&self, int seconds)
fn DateTime DateTime.add_weeks(&self, int weeks)
fn DateTime DateTime.add_years(&self, int years)
fn bool DateTime.after(&self, DateTime compare) @inline
fn bool DateTime.before(&self, DateTime compare) @inline
fn int DateTime.compare_to(&self, DateTime compare)
fn double DateTime.diff_sec(self, DateTime from)
fn Duration DateTime.diff_us(self, DateTime from)
fn int DateTime.diff_years(&self, DateTime from)
fn void DateTime.set_date(&self, int year, Month month = JANUARY, int day = 1, int hour = 0, int min = 0, int sec = 0, int us = 0)
fn void DateTime.set_time(&self, Time time)
fn TzDateTime DateTime.to_local(&self)
fn Time DateTime.to_time(&self) @inline
fn DateTime from_date(int year, Month month = JANUARY, int day = 1, int hour = 0, int min = 0, int sec = 0, int us = 0)
fn DateTime from_time(Time time)
fn DateTime now()

std::time::os @if(env::DARWIN)

struct Darwin_mach_timebase_info
fn Clock native_clock()

std::time::os @if(env::POSIX)

fn Clock native_clock() @if(!env::DARWIN)
fn Time native_timestamp()

std::time::os @if(env::WIN32)

fn Clock native_clock()
fn Time native_timestamp()