Odin Programming Language
None
#by_ptr
procedure attribute to enforce a parameter to be passed by pointer internally^x
instead of &x
for addressable variablesx->y()
behaviour to minimize duplicate evaluationproc do stmt
and only allow proc() { stmt }
struct
s without -vet
None
strings.Buffer
related proceduresvendor:raylib
to support macos-arm64append
of zero sized elementsshrink
for dynamic maps and arraysodin test
runner.memmove
if possible when emitting store over a certain sizecore:slice/heap
- A max heap implementationsimd_rem
; Disallow simd_dev
for integersstrings
dependency from core:sys/windows
core:fmt
[]u16
and [^]u16
strings.prefix_length
and slice.prefix_length
runtime.dll_forward_reason
for WindowsGeneric #simd
type and intrinsics
sse
, sse2
, sse41
, sse42
, ssse3
cmpxchg16b
, fxsr
, lzcnt
, pclmulqdq
, popcnt
, sha
Merge functionality of #maybe
with standard union
functionality
Maybe :: union($T: typeid) {T}
No need for #maybe
any moreDeprecation of a..b
range syntax to prefer a..=b
New intrinsics:
non_temporal_load
non_temporal_store
fused_mul_add
Generic #simd
intrinsics:
simd_add
simd_sub
simd_mul
simd_div
simd_shl
simd_shr
simd_shl_masked
simd_shr_masked
simd_add_sat
simd_sub_sat
simd_and
simd_or
simd_xor
simd_and_not
simd_neg
simd_abs
simd_min
simd_max
simd_clamp
simd_lanes_eq
simd_lanes_ne
simd_lanes_lt
simd_lanes_le
simd_lanes_gt
simd_lanes_ge
simd_extract
simd_replace
simd_reduce_add_ordered
simd_reduce_mul_ordered
simd_reduce_min
simd_reduce_max
simd_reduce_and
simd_reduce_or
simd_reduce_xor
simd_shuffle
simd_select
simd_ceil
simd_floor
simd_trunc
simd_nearest
simd_to_bits
simd_lanes_reverse
simd_lanes_rotate_left
simd_lanes_rotate_right
Platform specific intrinsics:
x86_cpuid
x86_xgetbv
@(priority_index=<int>)
for foreign import
transmute
on constant expressionsjs_wasm32
target
import _ "foo"
to allow for @(init)
procedures without producing an import name@(require_results)
on parapoly procedurescore:simd
core:simd/x86
core:encoding/endian
vendor:ggpo
vendor:openexr
raw_data
in core:mem
with core:runtime
raw_data
return [^]T
typescore:image
generic interface improvements
image.which
#optional_ok
to dynlib.symbol_address
mem.DEFAULT_PAGE_SIZE
rand.init_as_system
to allow for system-level based random number generationcore:
packagesNone
intrinsics.type_is_multi_pointer
intrinsics.type_field_type
-file
is suppliedcontainer_of
core:compress/shoco
A short string (de)compressorcore:container/intrusive/list
An intrusive linked listcore:encoding/varint
LEB128 encode and decodecore:encoding/xml
An XML parsercore:image/netpbm
A reader/writer for the NetPBM image formatscore:image/qoi
A reader/writer for the QOI image formatcore:image/tga
A writer for a common subset of the TGA formatcore:text/i18n
An easy way to translate your software using GetText or Qt Linguist translationsSema
and Atomic_Sema
behaviourcore:container/lru
Reduce allocations, fixescore:encoding/json
Unmarshal fixescore:hash/xxhash
Fixescore:path/filepath
Add file stem and long-extension procedurescore:slice
More helperscore:strings
Add Levenshtein distancecore:sync
Improvementscore:thread
New thread pool implementationvendor:metal
and vendor:darwin
numerous additions and fixesAtomic_Memory_Order
enumatomic_type_is_lock_free
atomic_thread_fence
atomic_signal_fence
atomic_store
atomic_store_explicit
atomic_load
atomic_load_explicit
atomic_add
atomic_add_explicit
atomic_sub
atomic_sub_explicit
atomic_and
atomic_and_explicit
atomic_nand
atomic_nand_explicit
atomic_or
atomic_or_explicit
atomic_xor
atomic_xor_explicit
atomic_exchange
atomic_exchange_explicit
atomic_compare_exchange_strong
atomic_compare_exchange_strong_explicit
atomic_compare_exchange_weak
atomic_compare_exchange_weak_explicit
union #shared_nil
union
which requires all the variants to have a nil
value and on assign to the union, checks whether that value is nil
or not. If the value is nil
, the union will be nil
(thus sharing the nil
value)-help
messages for define/configcore:sync
Mutex
RW_Mutex
Recursive_Mutex
Cond
Sema
Futex
Wait_Group
Barrier
Auto_Reset_Event
Ticket_Mutex
Benaphore
Recursive_Benaphore
Once
core:math/ease
core:thread
core:sys/windows
#caller_location
from certain calls in core:container/small_array
vendor:stb/easy_font
fixes/improvementsmem.nil_allocator
to match the same implementation in runtime
core:strings
nil
check on ast.walk
in core:odin/ast
[Enum]Type{...}
checks for missing enumerated fields in a compound literal by default
#partial [Enum]Type{...}
#sparse[Enum]Type
for non-contiguous enum fields used in an enumerated array type
#partial #sparse[Enum]Type{...}
can be combined to allow for missing fields in a sparse enumerated array compound literalintrinsics.objc_send
intrinsics.find_selector
intrinsics.find_class
intrinsics.register_selector
(only required when creating Objective-C classes at runtime)intrinsics.register_class
(only required when creating Objective-C classes at runtime)intrinsics.constant_utf16_cstring
//+private file
supportcontext.user_data
context.user_ptr
vendor:darwin/Metal
vendor:darwin/QuartzCore
vendor:darwin/Foundation
vendor:directx/d3d11
vendor:directx/d3d12
vendor:directx/d3d_compiler
vendor:directx/dxgi
core:container/topological_sort
core:mem/virtual
Linux Supportis_16_bit_from_memory
to vendor:stb/image
None
#no_type_assert
and #type_assert
to disable implicit type assertions with x.(T)
ODIN_ERROR_POS_STYLE
constant and -error-pos-style:<string>
option to allow for default or unix style error messagesodin doc
support the new https://pkg.odin-lang.org/
//+private
for odin doc
ODIN_ENDIAN
a constant enum value rather than a string386
to i386
core:container/lru
core:path
to core:path/slashpath
slice.stable_sort*
proceduresrand.perm
rand.exp_float64
strings.split_lines*
proceduresNone
None
odin doc
default parameter value init_string
generation-debug -o:minimal
@(static)
and @(thread_local)
within defer
statementswhen
handlingcore:container
with new packagescore:container/bit_array
core:container/priority_queue
core:container/queue
core:container/small_array
core:math/big
core:odin/parser
strconv
more robustcore:json/encoding
from unmarshall
to unmarshal
0
terminator from strings.clone
and bytes.clone
which was there for very old legacy reasons, prefer strings.clone_to_cstring
when that behaviour is neededstrings.fields_proc
and strings.index_any
math.prod
hash.djbx33a
sort.map_entries_by_key
and sort.map_entries_by_value
@(linkage=<string>)
for procedures and variables@(require)
for procedures#load_hash(<filepath>, <string-hash-kind>)
-target:js_wasm32
target (custom Web JavaScript runtime to run Odin executables)ODIN_NO_CRT
global boolean constantODIN_BUILD_MODE
global string constantnasm.exe
in conjunction with the foreign import
system (.asm
, .s
, .S
files)-extra-assembler-flags:<string>
-timings-export:<string>
-default-to-nil-allocator
for all platforms-no-crt
improvements on Windowsx in ptr
logicvendor:raylib
version 4.0core:math/linalg/glsl
- GLSL-like mathematics types and operationscore:math/linalg/hlsl
- HLSL-like mathematics types and operationsmath
procedures contextless
asinh
, acosh
, atanh
fmt
as expectedcontextless
package runtime
linkage improvementslinalg.matrix4_look_at_from_fru
math.ldexp
and math.frexp
in native Odinlog1p
, erf
, erfc
, ilogb
, logb
nextafter
, gamma
, lgamma
, signbit
to core:math
core:c/libc
core:crypto
packagesos.read_at_least
and os.read_full
utility proceduresmatrix
type
matrix[Rows, Columns]Element_Type
matrix
is a mathematical type built into Odin. It is a regular array of numbers, arranged in rows and columnstranspose
outer_product
hadamard_product
matrix_flatten
conj
determinant
adjugate
inverse
inverse_transpose
hermitian_adjoint
matrix_trace
matrix_minor
odin report
wasi_wasm32
supportcore:crypto
vendor:ENet
vendor:OpenGL
VertexAttribPointer
related calls to use uintptr
instead of rawptr
for the byte offset parameterGLboolean
to bool
core:sync/sync2
Futex
interface for each platformSema
implemented with Futex
core:mem/virtual
to make usage consistentcore:encoding/json
- add alias for MJSON
as Bitsquid
vendor:microui
vendor:raylib
runtime.memory_equal
and runtime.string_eq
logicid
to thread.Thread
slice.swap_between
big.Rat
intrinsics.unaligned_store
intrinsics.unaligned_load
intrinsics.mem_zero_volatile
offset_of_by_string
map
logic and code generationor_return
within defer
strip-semicolon
on some machines which didn't truncate correctly[^]T{}
to improve error messagesbit_set
semantics