Skip to content
Clay Murray edited this page Aug 20, 2020 · 15 revisions

Index

  • builtin
  • c
  • container
  • dynlib
  • encoding
  • fmt
  • hash
  • intrinsics
  • log
  • math
  • mem
  • odin
  • os
  • path
  • reflect
  • runtime
  • sort
  • strconv
  • strings
  • sync
  • thread
  • time
  • unicode

Builtin

Core Odin procs that are available to use without any imports.

Platform constants

ODIN_OS

Current compiler platform os. windows darwin (MacOS) linux

ODIN_ARCH

ODIN_ENDIAN

ODIN_VENDOR

ODIN_VERSION

ODIN_ROOT

ODIN_DEBUG

Types

byte

Boolean

bool

b8

`b16

b32

b64

Integer

i8

u8

i16

u16

i32

u32

i64

u64

i128

u128

rune

Floating Point

f16

f32

f64

Complex

complex32

complex64

complex128

quaternion128

quaternion256

int

uint

uintptr

rawptr

Pointer to memory address. Same function as void * in c. Prefer ^T where possible in odin.

string

cstring

C style string with null terminator \0

any

typeid

Endian Specific Types

i16le

u16le

i32le

u32le

i64le

u64le

i128le

u128le

i16be

u16be

i32be

u32be

i64be

u64be

i128be

u128be

Procedures

len :: proc(array: Array_Type) -> int ---

cap :: proc(array: Array_Type) -> int ---

size_of :: proc($T: typeid) -> int ---

align_of :: proc($T: typeid) -> int ---

offset_of :: proc($T: typeid) -> uintptr ---

type_of :: proc(x: expr) -> type ---

type_info_of :: proc($T: typeid) -> ^runtime.Type_Info ---

typeid_of :: proc($T: typeid) -> typeid ---

swizzle :: proc(x: [N]T, indices: ..int) -> [len(indices)]T ---

complex :: proc(real, imag: Float) -> Complex_Type ---

quaternion :: proc(real, imag, jmag, kmag: Float) -> Quaternion_Type ---

real :: proc(value: Complex_Or_Quaternion) -> Float ---

imag :: proc(value: Complex_Or_Quaternion) -> Float ---

jmag :: proc(value: Quaternion) -> Float ---

kmag :: proc(value: Quaternion) -> Float ---

conj :: proc(value: Complex_Or_Quaternion) -> Complex_Or_Quaternion ---

expand_to_tuple :: proc(value: Struct_Or_Array) -> (A, B, C, ...) ---

min :: proc(values: ..T) -> T ---

max :: proc(values: ..T) -> T ---

abs :: proc(value: T) -> T ---

clamp :: proc(value, minimum, maximum: T) -> T ---

Clone this wiki locally