github odin-lang/Odin dev-2026-02

8 hours ago

New Language Features

  • #+feature using-stmt
    • using as a statement and procedure parameter modifier is now an opt-in feature on a per-file basis rather than on by default
    • using on struct fields still works
  • struct #simple
    • force a struct to use simple comparison if all of the fields "nearly simply comparable"
    • This is a niche solution to a niche problem
    • "simply comparable" are types which can be compared with the equivalent of C's memcmp directly (e.g. integers, booleans, aggregates of them)
    • "nearly simply comparable" include the simply comparable types and floats, since floats have different rules for +0, -0, and NaN, and are NEARLY simply comparable if you don't care about those edge cases
    • This struct directive will force a struct to be "simply comparable" even if its fields would make it "nearly simply comparable"

New Compiler Improvements

  • Link-Time Optimization Support
    • -lto:thin and -lto:thin-files
  • #must_tail directive and preserve/none/preserve/most/preserve/all calling conventions
    • Enables the ability to state how optimize for tail calls
  • -disable-unwind
  • Improvements to the constant conversion checks
  • intrinsics.count_leading_ones and intrinsics.count_trailing_ones
  • Show -target flag usage example in help
  • Numerous debug info fixes
  • Static linking on non-Windows platforms
  • Add warning for size_of(&x) as it will always be size_of(rawptr) and probably a typo
  • -target:freestanding_amd64_mingw
    • Allowing for linking to MinGW on Windows but for freestanding purposes (not general)
  • Fix string16 issues on Mac and Linux
  • Fix in/not_in on constant bit_sets
  • Allow #+vet tags always work in addition to command line flag
  • General fixes to -vet
  • Type assertions now use the same context.assertion_failure_proc as assert and panic where possible
  • #+feature force-type-assert which overrides -no-type-assert on a per-file basis
  • Fix numerous data races in the compiler frontend
  • Fix numerous threading bugs in the compiler frontend

New Packages

  • core:nbio
    • Non-Blocking IO
  • core:container/handle_map
    • Utilizing core:container/xar for stable backing data

Package Improvements

  • core:thread
    • Add init and fini callback procedures to thread pools
  • core:crypto
    • Add initial support for short Weierstrass curves
    • General improvements and additions
  • core:testing
    • Use Windows API for SIG handling on Windows
  • core:image
    • Fix TGA header detections
    • .do_not_expand_grayscale for TGA
  • core:os/core:os/os2
    • Fix lookup_env_buf
    • Fix truncate-clamp op order when determining to_read size
  • core:encoding/base64
    • Add support URL variant
  • core:encoding/entity
    • Update handling of 2-codepoint based entities
  • core:encoding/xml
    • Correct how comment handling and entities
  • core:strings
    • Add loc := #caller_location to allocating procedures that would benefit for it
  • core:sys/windows
    • add a few procedure bindings
    • sync barriers
    • procedure-based "macros" for RawInput
  • core:text/regex
    • Pass given allocator on in create_iterator
  • vendor:x11/xlib
    • Binding fixes, correcting incorrect signatures
  • vendor:directx
    • Improve string type uses in DirectX bindings
  • vendor:compress/lz4
    • Fix linking on non-Windows platforms
  • vendor:curl
    • Fix linking on all unix-like OSes
  • vendor:sdl3
    • Add missing procedures GetGpueDeviceProperties
    • Fix signature of RenderTextureRotated
  • vendor:sdl3/image
    • Update to 3.4.0
  • Move vendor:libc to vendor:libc-shim
    • This is to clarify that it exists as a "shim" rather than a proper replacement
  • Update Orca bindings
  • General additions and improvements to core:sys/linux
  • Bulk-write to a slice in xoshiro/pcg_random_generator_proc
  • Fixes to darwin/Foundation bindings

Full Change Log

Full Changelog: dev-2026-01...dev-2026-02

Don't miss a new Odin release

NewReleases is sending notifications on new releases.