Releases: odin-lang/Odin
Releases · odin-lang/Odin
dev-2025-03
New Language Features
New Compiler Improvements
- Name Canonicalization
- Deterministic Name Mangling Rules for Symbols (Procedures, Variables, Debug Types, etc)
typeidlayout change- Always 8-bytes in size
- Represents a hash of the canonical name for the type
- Improved generation times for
odin doc - Allow
-show-timingsforodin doc - Very minor parser improvements to catch weird edges cases
intrinsics.simd_extract_msbsintrinsics.simd_extract_lsbsfor x in bit_setwill use a count leading zeros intrinsics internally rather than checking each bit manually- General bug fixes for LLVM backend
New Packages
vendor:sdl3/image
Package Improvements
- Update
vendor:wgputov24 - Improved documentation for
core:simd - Minor fixes to SDL3 bindings
- Support use of
*in format strings without an index NS.SavePanel_URLfix- Support
%bforrune os2fixes- Recursive directory walker
- Fix race conditions on Linux
os2.random_stringto usecontext.random_generator
dev-2025-02
New Language Features
- Support
#unroll(N) forwith arrays
Compiler Improvements
- Enable
-use-separate-moduleas default for all platforms (except wasm based ones) - General Bug Fixes
- Remove erroneous warnings regarding stack overflow in range loops "by reference"
- Allow broadcasting of untyped values to
#simdarrays - Improvements to
-obfuscate-source-code-locations - Remove duplicates of .framework/.dynlib/.so in linker
- Darwin: Sort frameworks to link first
New Packages
vendor:sdl3(3.2.2)vendor:windows/GameInput
Package Improvements
- Improvements to D3D12 package
- Improvements for Haiku
- Add missing procedures to GLFW
runtime.map_entry- XInput bindings for
core:sys/windows - More work on
core:os/os2development - More Objective-C bindings
- Additional bindings and constants for
core:sys/windows mem.Tracking_Allocatordefaults to panicking on bad frees
dev-2025-01
New Language Features
#+feature dynamic-literals- All dynamic literals (maps and dynamic arrays) are disallowed by default to remove implicit allocations from Odin
- If the user wants to allow this, it can be enabled on a per-file basis by adding the above "build tag"
- Dynamic literals like the following:
[dynamic]int{1, 4, 9, 16}map[string]int{"Apple" = 759, "Pear" = 128, "Gorilla" = 533}
Compiler Improvements
ensure/ensure_contextless- Identical to
assert/assert_contextlessbut is not removed with-disable-assert
- Identical to
- Remove viral
#force_inlineand#force_no_inline- Declaring a procedure with these tags would previously virally apply them to procedures called inside the subject procedure too, it now just affects the procedure it is applied to
- Fix bug with comparisons with big endian types
- Improve zeroing rules for
resize_dynamic_array - Add implicit broadcasting for
#simdarrays map_entry(Docs)
New Packages
N/A
Package Improvements
- Fixes to
vendor:raylib- Fixes to foreign imports after update to 5.5
- Allow for custom WASM link libraries
- Allow custom WASM link libraries for
vendor:box2d - Add
trunctocore:math/linalg/glsl - Improvements to
core:encoding/base32 - Update
vendor:cgltfto 1.14 - Add xinput bindings to
core:sys/windows - Fix to matrix adjugate procedure
dev-2024-12
New Language Features
N/A
Compiler Improvements
- Fix windows args parser problem from issue #4393.
- Suggestion when assigning
enumtobit_set. - Suggest
-microarch:nativeifpopcntinstruction is missing. - List the supported targets using
odin build . -targets:?. - Fix:
build_odin.shalways runs demo regardless of argument. - Report error when builtin
min/maxhas only one numeric parameter. - Add which to
shell.nixto build with--pure. - Only error with
-vet-castwhen it is actually castable. - Fix #4508 for
abs,min,max. - Rework macos version retrieval for
odin report. - Updated NetBSD CI to pkgsrc Q3 release.
- Check
type_exprincheck_procedure_param_polymorphic_type. - Add support for LLVM v19
- Fix PowerShell version incompatibility in
build.batby addingmisc\get-date.cutility.
New Packages
N/A
Package Improvements
- Update
vendor:raylibto v5.5. - Add
vendor:raylibaliases forIs*Ready->Is*Valid. - Add new test, better fail-check, and non-transitioning tz fix.
- Fix random sequence bindings in
vendor:raylib. - Added Unlinking Section to Posix Socket Binding Documentation.
- Update
scanner.odin. - Fix relative links in
examples/README.md. - Correct
zlibusage in doc. - Add
core:slice.size. - reflect: add
enum_value_has_nameproc. - Increased the size of Javascript keyboard event key/code buffer size.
- Add NSApplication bindings for
mainWindowandkeyWindow. - Add
STICKYKEYS,TOGGLEKEYS, andFILTERKEYStocore:sys/windows. - Implemented inotify in
core:sys/linux. - Fix integer type in
UXThemebindings. os2: fix leak indir_windows, fix netbsd, and add a test for dir reading.- [runtime]
make(map[K]V)should not allocate any capacity. - Fix typo in the Quaternion dot product implementation.
- Fix
#configtypo in Lua bindings. - Parsing fix for timezones that have an uneven number of utc / st tags.
- Fix #4509
- Fix unhandled
unmarshalerror. - Rework macos version retrieval for
core:sys/info. core:net: FixDNS_RECORD.Dataalignment error on Windows i386.- Fix math binomial proc giving wrong result.
- Make
O_RDONLYdefault foros.openon all platforms. core:dynlib: Unload library before loading again & addLIBRARY_FILE_EXTENSIONconstant.- Correct handling newlines between build tags in
core:odin. - Pass allocator to implicitly (de)allocating procs in
core:log. - Use a proper
Queueincore:thread.Pool - Fix
core:text/regex'smatch_with_preallocated_capturereturningnum_groups. - Add
linalg.clamp_length(vector, max_length) -> clamped_vector. - Improve
strings.index_multi. - Add regression test for #4553.
core:encoding/json: Move struct field zipping outside of loop.
dev-2024-11
New Language Features
Compiler Improvements
- General bug fixes
- Fix 128-bit ABI issues caused by LLVM changes
- Fix
#load_directorycontaining directories - Add warning for
unsigned >= 0like conditions in aforloop
New Packages
core:time/timezone
Package Improvements
- Numerous bug fixes
core:sys/posixLinux Support- Improvements to
core:sys/darwin - Add missing bindings to
rlgl rand.choice_bit_setslice.to_type- Improvements to
jstarget APIs
dev-2024-10
New Language Features
- Replace
//+syntax with#+- Used in cases like
#+build windows
- Used in cases like
#min_field_alignand#max_field_align- deprecate
#field_alignin favour of#min_field_align #max_field_alignused in places where#pragma packwas used in some C compilers
- deprecate
#caller_expression
Compiler Improvements
- ABI BREAKING CHANGE: How SysV handles multiple return values
- Matches the same behaviour as other platforms to pass multiple return values separately
- Fix ABI for 128-bit integers since the breaking changes in LLVM 18 for WASM and AMD64
-vet-packages:<command-separated-string_array>-vet-unused-procedures- Add
-no-rpath - Simplify
#row_majorandmatrix_flattenbehaviour - Allow
transmute(Bit_Set)~T(0) - Move many of the
vendor:wasm/jspackage tocore:sys/wasm/js- Rename
runtime.jstoodin.jsto be consistent
- Rename
New Packages
Package Improvements
- General improvement to documentation across the
corelibrary core:sys/info: more CPU feature detection for RISC-Vcore:timetime.time_to_datetime- Add
#any_intdirective to built-in procedures that were missing it, to be consistent - More Objective-C Runtime Bindings
- Improvements to
core:container/bit_array - Improvements to C vararg behaviour and definitions and
va_list - Improvements to atomic/sync/thread related operations
- Improvements to
core:sync/chan
dev-2024-09
New Language Features
- Add support for linux_riscv64 and freestanding_riscv64
Compiler Improvements
- Support RISC-V for the compiler itself
- Fix crash if referencing import "aliased" in other file
- Added a hint at end of
build.batabout release mode when building in debug mode - Allow symlink test to work irrespective of git settings
- Use another BSD URL for pkgsrc on CI
- Fix type switching over internal pointer union
- Fix c_vararg bit_set
- Add table-driven (in)definite article to some errors.
- Fix alias handling of procedures
- riscv: add an error when atomics are used without the atomics extension
- Remove extra format item at end of
contexterror message - Fix inline transmutation of
[16]i8toi128 - Fix 'odin [run|test] --' giving a compiler out of bounds
- UL_COMPARE_AND_WAIT_SHARED is macOS 10.15+
- query brew for llvm-config location if possible
New Packages
- Add
vendor:box2d - Add
core:text/regex
Package Improvements
- Add
sdl2gluetovendor:wgpupackage - Fix os.read_dir with symlinks
os.Errorto replaceos.Errnocore:image/common.odinFixes- Prevent
SIGPIPEon Darwin when writing to a closedcore:netsocket - Add
reflect.struct_field_countthat returns the number of fields in a struct type - Fix missing closing brace for Bit_Field in
core:odin/parser - Fix SIMD intrinsics wording
- Core sys windows rawinput code
- Port
core:netto FreeBSD - Allow testing for intentional leaks in test runner
- Various
core:encoding/cborfixes - Various
core:cryptoimprovements - Vectorize
index_byte - Use
intrinsics.reverse_bitsincore:compress/zlib - Fix
type_info_union_is_pure_maybeonly working with regular pointers - Add support for field tags on bit_field fields to
core:odin - Loop
os.write_entire_fileto write more than MAX_RW - [fmt] Add bit fields to the pointer printing logic
- Fix
os.read_dirclosing the given file descriptor - Fix type hint propagation for shift
- Let memory failures be errors in the test runner
- Check if procedure parameter type declares polymorphic args
vendor:x11: Added a few procedures for xrandr, xinput, and xFixesvendor:egl: Added a few more egl procedures and constantscore:timeWASI implementationcore:sys/linux: Add binding to ioctl syscall + standard fd constants.- Update mem doc example formatting
- Error if assigning to
rodatavariable with index - Report error when a variadic procedure parameter has a default value
core:sys/posixandcore:os/os2based on it (for darwin, netbsd, freebsd and openbsd)- Fix error handling in os2.read_entire_file_from_file()
- add shm_open and shm_unlink syscalls for darwin
- More Foundation bindings.
- Add autogenerated orca bindings and macros from laytan
- os2 process linux implementation
- Improve benchmarks.
- Check if file open-mode is
O_CREATEon Darwin before forcing chmod - Fix
openbindings - Fix log unnecessary allocations
- (raygui) Restores vertical text alignment broken after 4.0 migration
- Implement
lshrti3on wasm - Add
core:math.count_digits_of_base - Remove deprecated
logprocs fromcore:testing - Fix SIMD var typo
- Fix wiki link in the
README.md - Add support for Linux on os/sys/posix termios.
- A couple of foundation binding. Vet tabs.
- core:sys/linux - implement clock_settime, clock_getres and clock_nanosleep
- os2: process API for Darwin and most of it for BSDs
- orca: implement
core:timeandcore:log - Fix ambiguous generic type names
- Added missing slice advancing.
- Fix binding: Make
rl.LoadImageAnimtake a pointer instead of a multi-pointer. - Fix
core:reflect/iterator.odin - Fix binding to cmark_node_get_fence_info
- Fix win32 dwmapi DWMWINDOWATTRIBUTE enum.
- os2: propagate errors from execv
- Free the arenas allocated in
test_core_runtime - Fix use-after-free in
thread.Pool - Fix error for uuid to require 36 bytes instead 32 (4 bytes for dashes)
- Fix
-vetand-strict-stylefailures in tests - [os2/process]: Don't free process info fields in partial success scenarios
- Add API for freeing
thread_localstate - wgpu: update to v22.1.0.1
- Delay lexical checking for foreign blocks that are in file scope
- -vet -strict-style -disallow-do in tests
- Win32 clipboard procedures
- os2: disable custom heap allocator
- mem/virtual: use
sysconffor retrieving page size and actually use these init procs - mem/virtual: make sure the given size is used for subsequent blocks
- Add missing lexer checking delay for foreign blocks
- Add
core:iotest suite - Add a file tag parser to core:odin/parser
- Fix some issues with the "bad import name" errors
- Add math.remap_clamped, which clamps the result in range [new_min, new_max]
dev-2024-08
New Language Features
Compiler Improvements
- Update to LLVM 18.1.8
- Force compiler source to be parsed as UTF-8 (Windows)
- Improve various compiler-internal asserts
- Fix
#soaassignment bug - Add error for
type_of(value of untyped type) - Remove
*_test.odin; always compile it for all targets - Add
-print-linker-flags - Allow
x :: y when cond else proc(...){...} - Allow using a precompiled Windows resource file with
-resource:foo.res - Fix problem where the initial package's directory name ended in .odin
- Fix check for whether executable output path is a directory
New Packages
Package Improvements
- Add bindings for WOW64 API
- Improve
os.openfor WASI - Support
vendor:stb/truetypeandvendor:fontstashon WASM - Fix linker errors with empty project for
vendor:wgpu - Fix SDL constants
- Fix alignment bug in
mem.dynamic_pooland add tests for it - Fix
reflect.as_pointer - Remove implicit allocator usage in
core:dynlib - Fix
utf8_to_wstringgiven zero bytes. - Add
setenvandunsetenvfor Darwin - Improve
core:encoding/cbor - Remove syscall usage on Darwin to comply with Apple guidelines
- Add some XKB extension procedures and constants to
vendor:x11 - Fix
@(optimization_mode)usage in builtin collections - Add synonyms
strings.starts_withandstrings.ends_withas aliases - Allow overriding random generator in
randcalls - Add documentation and example for
core:container/intrusive/list - Update stb_truetype.odin
- Add support of
ignoretag forjson.marshal - Allow json maps with int keys in
marshalandunmarshal - Add Intel AES-NI support to
core:crypto/aes - Improve
rand.shuffle - Fix leak in
core:encoding/iniand add tests for it - Document
core:time,core:time/datetime,core:threadandcore:sync - Add example and tests for
vendor:lua - Many
core:sys/windowsimprovements - Add json reporting to
core:testing - Add
time.to_string*formatters. - Clamp
dotinlinalg.angle_betweento avoid precision errors. - Update RayGui procedures
dev-2024-07
New Language Features
- Allow for constant strings in
foreign imports #exists(<string>) -> bool@(rodata)context.random_generator- Brand new
runtime.Random_Generatorinterface
- Brand new
Compiler Improvements
- Brand new Multithreaded Test Runner
- Improvements to error line rendering
- Full support for Unicode grapheme clusters
- NetBSD ARM64 support
-show-defineablesand-export-defineables-vet-cast- Looks for redundant
casts ortransmutes, andtransmutes that should becasts
- Looks for redundant
-strict-stylenow enforces a lot more regarding the official Odin code base style-vet-styleis a much weaker form that does not have all of the same enforced options as-strict-style- Enforces
-vet-cast - Enforces
casestatements to be in the same column as theirswitchtoken - Enforces 1TBS style
-vet-tabs- Enforces tabs to be used for indentation with statements/declarations
-custom-attribute:<string>-custom-attribute:attr1-custom-attribute:attr1,attr2-custom-attribute:attr1 -custom-attribute:attr2
- Improve parsing for
label: #reverse forandlabel: #partial switch - Allow
#soaarrays to be used directly withmake,reserve,append, etc. intrinsics.procedure_of(call(...))intrinsics.syscall_bsd- Fixes to debug information generation for LLVM < 13
- Add
#directory(complements#file) - Remove
@(warning)and#warning - Allow
- constant_array - Support
@(extra_linker_flags)on WASM targets - Use
f32operations when doingcomplex32andquaternion64operations to improve accuracy and performance - Allow for
when x in y {(minor oversight in syntax) - Keep
bit_fieldaccesses happy with-santitize:address - Fix for
bit_set[$T]not setting the bounds correctly (#3842) intrinsics.type_struct_has_implicit_padding- Remove quite a few possible race conditions in the compiler
- Numerous big fixes
New Packages
vendor:wgpu(WebGPU)core:flagscore:encoding/uuidcore:mem/tlsf- "Two-Level Segregated Fit" memory allocator
core:image/bmp
Package Improvements
core:text/tablenow supports Unicode grapheme clusters correctlycore:math/randnow uses the newcontext.random_generatorinterface instead of the implementation specificrand.Randcore:cryptohas a Random_Generator interface for entropic cryptographic random number generators- Improvements to
core:strconv- Support complex/quaternion parsing
- Partial parsing of infinity
- Improvements to
vendor:raylibdeclarations - Move
rlgltovendor:raylib/rlgl - Fixes to
core:math/bigand add numerous other utility procedures - Fix code generation for
vendor:vulkanon^[3]f32parameters - Numerous improvements to
core:odin/parser - Make
runtime.heap_allocet al"contextless" - Add
#no_broadcasttoappend_soacalls - Add
no_zero_*variants for#soadynamic arrays - More test suites
dev-2024-06
New Language Features
intrinsics.type_is_matrix_row_major+intrinsics.type_is_matrix_column_major#hash(<string>[, algo])@(link_suffix=<string>)
Compiler Improvements
- New NetBSD target support
- Experimental
orca_wasm32target support - Documentation tests fixed and re-enabled
- Fix
>=for strings, add test for string comparisons - Suggest
-all-packagesif testing an empty directory core:intrinsics->base:intrinsics..range is now an error. Use..<or..=- Reimplement
-build-mode:static/-build-mode:lib - Strictly enforce
switch &x in ysemantics and fixfor &v in &fixed_array - Fix
intrinsics.ptr_sub - Fix indexing type when using a
#row_majormatrix - Remove constant indexing for
matrixvalue propagation - Improve error messages and their suggestions
- Delay checking
foreign importpaths until the global scope is checked
New Packages
core:container/rbtreecore:encoding/inicore:crypto/aes
Package Improvements
- Fix some edge cases and oversights for
bit_field - Fix
read_directoryskipping directories on Unix-likes - Add default heap/general purpose allocator for WASM
- Fix and improve
i18n.mo plurals - Correctly load/store uint & int for wasm64p32
- Fix bug in
QOIencoder + decoder - Fix the way
%32band other prefixed numbers are written` - Improve
fmtparsing of struct field tags vendor:microuigained textbox selection, cut, copy and paste- Add a custom iterator to
CSVpackage. - Allow space as allowed separator to RFC 3339 parser
- Add abbreviated ISO 8601 parser
- Lots and lots of bugfixes
Packages deprecated
core:odin/printerandcore:odin/formathave been removed in favor of using OLS
Full Changelog: dev-2024-05...dev-2024-06