github odin-lang/Odin v0.7.0
Odin v0.7.0

latest releases: dev-2025-11, dev-2025-10, dev-2025-09...
7 years ago

New Features

  • New importation system
    • import using import export
  • Import collections
    • `import "core:fmt.odin"
    • import "shared:glfw.odin"
    • -collection=foo=path/to/foo
  • Improved foreign system
    • foreign import
    • foreign blocks
    • foreign export blocks
    • foreign import "system:kernel32.lib"
  • Global variable dependency initialization ordering
  • Attribute system
    • @(link_name="gb_foo") foo :: proc() {};
    • @(link_prefix="gb_") foo :: proc() {};
    • Please see wiki for more
  • Array Programming - arithmetic on fixed length arrays
a, b: [4]f32;
c := 2*(-a + b) / 3;
d := swizzle(c, 1, 0, 3, 2);
  • uintptr
  • Type aliases
    • My_Int :: #alias int;
  • inline and no_inline prefix keywords for procedure literals
    • foo :: inline proc() {}
  • Procedure calling convention syntax
    • proc "c" ()
    • proc "std" ()
    • proc "contextless" ()
  • Default arguments allowed after a variadic parameter
    • print :: proc(args: ...any, loc := #caller_location) {}
  • Polymorphic array lengths
    • proc(a: [$N]$T)

Syntax Changes

  • switch replaces match
  • context <- expr {} replaces push_context expr {}
  • push_allocator has been removed in favour of general procedures to generate contexts
  • -build-mode=dll replaces build-dll

Core library additions

  • mem.ptr_to_bytes
  • assert and panic use printf style parameters

Don't miss a new Odin release

NewReleases is sending notifications on new releases.