Skip to content

Releases: odin-lang/Odin

dev-2024-06

04 Jun 11:20
Compare
Choose a tag to compare

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_wasm32 target support
  • Documentation tests fixed and re-enabled
  • Fix >= for strings, add test for string comparisons
  • Suggest -all-packages if 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 y semantics and fix for &v in &fixed_array
  • Fix intrinsics.ptr_sub
  • Fix indexing type when using a #row_major matrix
  • Remove constant indexing for matrix value propagation
  • Improve error messages and their suggestions
  • Delay checking foreign import paths until the global scope is checked

New Packages

  • core:container/rbtree
  • core:encoding/ini
  • core:crypto/aes

Package Improvements

  • Fix some edge cases and oversights for bit_field
  • Fix read_directory skipping 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 QOI encoder + decoder
  • Fix the way %32b and other prefixed numbers are written`
  • Improve fmt parsing of struct field tags
  • vendor:microui gained textbox selection, cut, copy and paste
  • Add a custom iterator to CSV package.
  • Allow space as allowed separator to RFC 3339 parser
  • Add abbreviated ISO 8601 parser
  • Lots and lots of bugfixes

Packages deprecated

  • core:odin/printer and core:odin/format have been removed in favor of using OLS

Full Changelog: dev-2024-05...dev-2024-06

dev-2024-05

10 May 15:15
Compare
Choose a tag to compare

New Language Features

Compiler Improvements

  • odin root command
  • Normalize ODIN_ROOT path
  • Improvements to arm64 ABI for returning 0 sized types
  • Allow compiling with LLVM 18 (non-Windows targets)
  • Fix linking with clang-18
  • Fix wrote llvm-config in build script for FreeBSD
  • Change layout of compiler (not language) hash maps for minor performance improvements
  • Numerous improvements to catch the possible race conditions with the new error reporting system
  • Allow -default-to-nil-allocator on wasm targets
  • Allow @(init) procs to be @(disabled)
  • Performance improvements for access and storing fields from a bit_field type
  • Minimally support compiling Odin on FreeBSD arm64
  • Improved target feature support
  • Improved -microarch support with list of possible micro-architectures.=

New Packages

  • core:sys/darwin/CoreFoundation
  • core:sys/darwin/Security
  • core:encoding/cbor

Package Improvements

  • General bug fixes
  • General documentation improvement (typos and doc.odin fixes)
  • core:net Add support for URL fragments
  • Fix big.internal_random_prime with Second_MSB_On
  • Fix vendor:d3d12 calling convention mistakes
  • Fix to Fisher-Yates shuffle in core:rand
  • Fix core:text/i18n default number value in get_*_section
  • Fix #soa %#v formatting
  • Fix %e formatting
  • Fix %[N].*[M]v style formatting
  • Improvements to Negative_Read/Negative_Write logic for core:io
  • Fix omitempty in json.marshal
  • Improved statistics for core:mem/Tracking_Allocator
  • Require results for non-buffered print procs
  • core:sys/info: add arm feature detection, fix Linux implementation, show more CPU info on Darwin
  • Fix vendor dynamic libraries not working on Linux
  • Fixes to core:encoding/json invalid JSON when an error does not have a position
  • Add slice.enum_slice_to_bitset & slice.bitset_to_enum_slice
  • Add DXGI 1.5 & 1.6 APIs
  • Update d3d12 API
  • Refactor fmt.wprintf
  • Fix core:odin/parser crashing on empty and/or no package files

Full Changelog: dev-2024-04a...dev-2024-05

dev-2024-04a

11 Apr 15:19
Compare
Choose a tag to compare

Minor Update from dev-2024-04

For the full release notes of dev-2024-04, see its release

New Language Features

Compiler Improvements

  • nasm check fixes
  • Keep -vet happy
  • Fix bit_field access on implicit dereference
  • Fix typos in error messages
  • Improve and fix numerous warnings

New Packages

Package Improvements

  • Add bit_field to core:odin
  • core/crypto: Even more improvments by @Yawning in #3288

Full Changelog: dev-2024-04...dev-2024-04a

dev-2024-04

08 Apr 16:04
a00d96c
Compare
Choose a tag to compare

New Language Features

  • bit_field type
Foo :: bit_field u16 { // backing type must be an integer or array of integers
    x: i32     | 3, // signed integers will be signed extended on use
    y: u16     | 2 + 3, // general expressions
    z: My_Enum | foo.SOME_CONSTANT, // ability to define the bit-width elsewhere
    w: bool    | foo.SOME_CONSTANT > 10 ? 2 : 1,
}
Handle :: bit_field u32 {
    slot:       u32  | 16,
    generation: u32  | 15,
    in_use:     bool |  1,
}
  • name: type | bit_width

  • name: type | bit_width "field_tag" (similar to a struct field with a tag)

  • Iteration over bit_set

s: bit_set[Enum; u32]
for x in s { 
    ... 
}
// equivalent to
for x in Enum do if x in s {
    ...
}

Compiler Improvements

  • Improved Error Reporting System
    • Sorted printing based on error position
    • Ability to export error list to json -json-errors
    • -terse-errors are only a single line now
  • Error message suggestions for people making common C mistakes
    • Aiding newcomers from C/C++ to Odin
  • Loads of debug info refactors and improvements
  • Add Haiku OS support by @avanspector & @xslendix in #3230
  • Respect "smart linker" approaches
  • Respect -lld on non-Windows machines
  • Remove entry point when compiled with no-entry-point as shared library
  • Numerous fixes to wasm targets
  • Numerous fixes to ARM64 ABI on Darwin
  • Numerous fixes to SysV AMD64 ABI on Darwin and Linux
  • Speed up path_to_fullpath on Linux/macOS
  • Numerous compiler fixes and error messages

New Packages

  • Moved vendor:darwin/Foundation to core:sys/darwin/Foundation

Package Improvements

  • Improvements to core:crypto
  • Make raylib and stb_rect_pack be free of libc
  • Numerous improvements to core:encoding/json
    • Support writing enum value names
    • Support for using _: T fields
  • Fixes to core:math/big
  • Fixes to core:math/linalg
  • Fixes to core:slice
  • Fixes to core:odin/parser
  • General fixes to base:runtime
  • vendor:x11 fixes
  • Allow for the new futex API on darwin platforms if it is available
  • Fix os.read_entire_file for pipes and console

CI Improvements

  • Update LLVM to 17 for the CI/Releases

Full Changelog: dev-2024-03...dev-2024-04

dev-2024-03

04 Mar 12:57
Compare
Choose a tag to compare

Distribution Changes

  • MacOS ARM releases and CI support
  • MacOS releases self-contained / bundle LLVM

New Language Features

Compiler Improvements

  • General bug fixes in the compiler
  • Fix -no-crt on Darwin and Linux
  • Make odin run args take the first '--' as the start of the args, instead of the last '--'
  • Fix intstrumentation in debug mode
  • Add backend info to odin report
  • Change runtime.type_table to allow RTTI to be constantly initialized on all platforms
    • Removes the need for the start procedure initializing the RTTI table
    • Previous approach was due to limitations and bugs in LLVM
  • Promote types in #c_varargs according to C rules
  • Reduce dynamic library dependencies on macOS
    • We were previously linking with LLVM-C, LLVM, and libunwind, however only LLVM was needed since it contains LLVM-C, and libunwind comes with macOS already

New Packages

  • core:crypto/hash
    • General refactor of the cryptographic packages
  • core:container/avl
    • AVL Tree Container

Package Improvements

  • fmt.*printfln add to core:fmt
  • Fixes to the WebGL package
  • General improvements to package os for *nix platforms
  • Numerous documentation improvements
  • Fixes to core:mem/virtual arena_static_reset_to
  • Make spall able to be used in instrumentation procedures
  • Expose vendor:OpenGL shader procedures in
  • Add more Windows window procedures
  • Fix return in json unmarshal for enumerated arrays
  • Add ID3DUserDefinedAnnotation to direct3d package
  • Update miniaudio to 0.11.21
  • Change vendor:raylib to use non-universal binaries
  • Fix vendor:raylib's ModelAnimation alignment to match that of C's
  • Better error code for binding a privileged port without root access in core:net
  • vendor:glfw add RawMouseMotionSupported
  • Basic EGL support on Linux
  • Improved implementation of core:math round

Full Changelog: dev-2024-02...dev-2024-03

dev-2024-02

01 Feb 16:56
Compare
Choose a tag to compare

As part of the Journey to Odin 1.0, we are cleaning up the packages that Odin provides and making explicit delineations for what is needed. A new library collection has been added: base.

This means that there are now 3 official library collections as part of the official compiler:

  • base - packages which are required by the language itself, defined by the language specification, and all compilers must implement (implementations may different, but interface must be the same)
    • All platforms (including freestanding) will be supported in this library collection
  • core - packages which are core to most programming development and supported by most platforms.
    • Most platforms will be supported in this library collection
  • vendor - third-party packages with first-party support which are useful for numerous projects (graphics APIs, audio, window management, specialized networking, etc).
    • Many platforms will be supported in this library collection

Packages which have been moved to the new base library collection:

  • core:builtin -> base:builtin (previous is still valid as an alias)
  • core:intrinsics -> base:intrinsics (previous is still valid as an alias)
  • core:runtime -> base:runtime (previous is still valid as an alias)

New Language Features

  • builtin.quaternion call must name the elements with x y z w or real imag jmag kmag rather than be positional
  • struct #field_align(N)
    • It sets the minimum alignment for the fields within a struct. This cannot be used with #packed, but can be used with #align(N).
    • If #align(N) is less than #field_align(N), then a warning will be printed.
  • Removal of incl and excl built-in procedures. Prefer:
    • s += {.A,} for incl(&s, .A)
    • s -= {.A,} for excl(&s, .A)

Compiler Improvements

  • @(entry_point_only) attribute to mark a procedure which can only be called within main (the entry point procedure)
  • Move builtin matrix procedures to intrinsics
    • They can be either accessed from base:intrinsics or core:math/linalg etc packages
  • Fix calling conventions for the core:simd/x86 calling conventions
  • Expand -subsystem option on Windows
  • -default-to-panic-allocator
  • Numerous typo fixes

New Packages

Package Improvements

  • Use "system" calling convention everywhere "stdcall" was previous used
    • This allows cross platform use of packages which were originally Windows only but not any more
  • core:mem/virtual
    • virtual.map_file
  • core:dynlib
    • dynlib.initialize_symbols
    • dynlib.last_error
  • core:c/libc
    • libc.to_stream
  • core:math/fixed improvements
  • Fix vendor:raylib IsGestureDetected binding
  • Fixes for wasm targets
  • Remove any cyclic dependencies that base:runtime previously depended on (e.g. core:os)

dev-2024-01

05 Jan 13:24
5961d4b
Compare
Choose a tag to compare

New Language Features

Compiler Improvements

  • -obfuscate-source-code-locations flag to hash location strings
  • MacOS:
    • -no-crt now works
    • Fix the duplicate -lSystem linker warning
    • Default to SDK version for -minimum-os-version to avoid linker warnings
  • #load now works with absolute paths
  • Fix a bug that caused running tests twice
  • General compiler crash fixes

New Packages

Package Improvements

  • Fixes:
    • Default temp_allocator/arena edge cases
    • Dynamic array assign_at_elems bug
  • core:sys/linux: syscall additions
  • core:sys/windows: HIDPI, Error codes enum
  • vendor:raylib: update to version 5
  • core:slice: reduce_reverse, filter_reverse, repeat, unique, unique_proc
  • core:log: Allocator print formatted (kb, mb etc.) bytes
  • core:fmt: Make %g the default for floats
  • core:encoding/json: basic union unmarshalling

dev-2023-12

05 Dec 16:24
31b1aef
Compare
Choose a tag to compare

New Language Features

Compiler Improvements

  • -microarch:<string>
  • Default to static map look ups on Windows (still default to dynamic on other systems)
  • Lower map's minimum capacity to 8 from 64
  • Numerous Bug Fixes
  • Add new intrinsics for union_tag_* related stuff
  • Fix &x[i] of ^#soa types

New Packages

  • vendor:x11/xlib

Package Improvements

  • core:crypto

dev-2023-11

01 Nov 18:46
Compare
Choose a tag to compare

New Language Features

Compiler Improvements

  • LLVM 17 support for all platforms
  • Numerous code generation improvements with LLVM 17
  • -no-crt improvements to all platforms

New Packages

Package Improvements

  • Numerous improvements to core:sys/linux

dev-2023-10

02 Oct 20:26
Compare
Choose a tag to compare

New Language Features

  • or_break
  • or_continue
  • #relative [^]T (relative multi-pointers)
    • Replaced #relative []T (relative slices)
    • This data type might be removed in the future

Compiler Improvements

  • LLVM 17.0.1 for Windows
    • Linux and Darwin support coming very soon
  • -sanitize:<string> (can be applied together)
    • -sanitize:address (Windows, Linux, Darwin)
    • -sanitize:memory (Linux)
    • -sanitize:thread (Linux, Darwin)
  • raw_data(^matrix[R, C]T) -> [^]T
  • Remove for in and switch in in favour of for _ in and switch _ in
  • Disallow aliasing of any and typeid
  • ODIN_PLATFORM_SUBTARGET global constant
  • General Fixes

New Packages

Package Improvements

  • General Fixes