Skip to content

Releases: odin-lang/Odin

dev-2024-11

04 Nov 22:58
e6475fe
Compare
Choose a tag to compare

New Language Features

Compiler Improvements

  • General bug fixes
  • Fix 128-bit ABI issues caused by LLVM changes
  • Fix #load_directory containing directories
  • Add warning for unsigned >= 0 like conditions in a for loop

New Packages

  • core:time/timezone

Package Improvements

  • Numerous bug fixes
  • core:sys/posix Linux Support
  • Improvements to core:sys/darwin
  • Add missing bindings to rlgl
  • rand.choice_bit_set
  • slice.to_type
  • Improvements to js target APIs

dev-2024-10

01 Oct 10:52
af9ae48
Compare
Choose a tag to compare

New Language Features

  • Replace //+ syntax with #+
    • Used in cases like #+build windows
  • #min_field_align and #max_field_align
    • deprecate #field_align in favour of #min_field_align
    • #max_field_align used in places where #pragma pack was used in some C compilers
  • #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_major and matrix_flatten behaviour
  • Allow transmute(Bit_Set)~T(0)
  • Move many of the vendor:wasm/js package to core:sys/wasm/js
    • Rename runtime.js to odin.js to be consistent

New Packages

Package Improvements

  • General improvement to documentation across the core library
  • core:sys/info: more CPU feature detection for RISC-V
  • core:time time.time_to_datetime
  • Add #any_int directive 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

02 Sep 15:33
16c5c69
Compare
Choose a tag to compare

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.bat about 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 context error message
  • Fix inline transmutation of [16]i8 to i128
  • 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 sdl2glue to vendor:wgpu package
  • Fix os.read_dir with symlinks
  • os.Error to replace os.Errno
  • core:image/common.odin Fixes
  • Prevent SIGPIPE on Darwin when writing to a closed core:net socket
  • Add reflect.struct_field_count that 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:net to FreeBSD
  • Allow testing for intentional leaks in test runner
  • Various core:encoding/cbor fixes
  • Various core:crypto improvements
  • Vectorize index_byte
  • Use intrinsics.reverse_bits in core:compress/zlib
  • Fix type_info_union_is_pure_maybe only working with regular pointers
  • Add support for field tags on bit_field fields to core:odin
  • Loop os.write_entire_file to write more than MAX_RW
  • [fmt] Add bit fields to the pointer printing logic
  • Fix os.read_dir closing 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 xFixes
  • vendor:egl: Added a few more egl procedures and constants
  • core:time WASI implementation
  • core:sys/linux: Add binding to ioctl syscall + standard fd constants.
  • Update mem doc example formatting
  • Error if assigning to rodata variable with index
  • Report error when a variadic procedure parameter has a default value
  • core:sys/posix and core:os/os2 based 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_CREATE on Darwin before forcing chmod
  • Fix open bindings
  • Fix log unnecessary allocations
  • (raygui) Restores vertical text alignment broken after 4.0 migration
  • Implement lshrti3 on wasm
  • Add core:math.count_digits_of_base
  • Remove deprecated log procs from core: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:time and core:log
  • Fix ambiguous generic type names
  • Added missing slice advancing.
  • Fix binding: Make rl.LoadImageAnim take 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 -vet and -strict-style failures in tests
  • [os2/process]: Don't free process info fields in partial success scenarios
  • Add API for freeing thread_local state
  • 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 sysconf for 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:io test 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

02 Aug 13:53
Compare
Choose a tag to compare

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 #soa assignment 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.open for WASI
  • Support vendor:stb/truetype and vendor:fontstash on WASM
  • Fix linker errors with empty project for vendor:wgpu
  • Fix SDL constants
  • Fix alignment bug in mem.dynamic_pool and add tests for it
  • Fix reflect.as_pointer
  • Remove implicit allocator usage in core:dynlib
  • Fix utf8_to_wstring given zero bytes.
  • Add setenv and unsetenv for 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_with and strings.ends_with as aliases
  • Allow overriding random generator in rand calls
  • Add documentation and example for core:container/intrusive/list
  • Update stb_truetype.odin
  • Add support of ignore tag for json.marshal
  • Allow json maps with int keys in marshal and unmarshal
  • Add Intel AES-NI support to core:crypto/aes
  • Improve rand.shuffle
  • Fix leak in core:encoding/ini and add tests for it
  • Document core:time, core:time/datetime, core:thread and core:sync
  • Add example and tests for vendor:lua
  • Many core:sys/windows improvements
  • Add json reporting to core:testing
  • Add time.to_string* formatters.
  • Clamp dot in linalg.angle_between to avoid precision errors.
  • Update RayGui procedures

dev-2024-07

01 Jul 17:28
b4ca044
Compare
Choose a tag to compare

New Language Features

  • Allow for constant strings in foreign imports
  • #exists(<string>) -> bool
  • @(rodata)
  • context.random_generator
    • Brand new runtime.Random_Generator interface

Compiler Improvements

  • Brand new Multithreaded Test Runner
  • Improvements to error line rendering
    • Full support for Unicode grapheme clusters
  • NetBSD ARM64 support
  • -show-defineables and -export-defineables
  • -vet-cast
    • Looks for redundant casts or transmutes, and transmutes that should be casts
  • -strict-style now enforces a lot more regarding the official Odin code base style
    • -vet-style is a much weaker form that does not have all of the same enforced options as -strict-style
    • Enforces -vet-cast
    • Enforces case statements to be in the same column as their switch token
    • 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 for and label: #partial switch
  • Allow #soa arrays to be used directly with make, 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 f32 operations when doing complex32 and quaternion64 operations to improve accuracy and performance
  • Allow for when x in y { (minor oversight in syntax)
  • Keep bit_field accesses 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:flags
  • core:encoding/uuid
  • core:mem/tlsf
    • "Two-Level Segregated Fit" memory allocator
  • core:image/bmp

Package Improvements

  • core:text/table now supports Unicode grapheme clusters correctly
  • core:math/rand now uses the new context.random_generator interface instead of the implementation specific rand.Rand
  • core:crypto has 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:raylib declarations
  • Move rlgl to vendor:raylib/rlgl
  • Fixes to core:math/big and add numerous other utility procedures
  • Fix code generation for vendor:vulkan on ^[3]f32 parameters
  • Numerous improvements to core:odin/parser
  • Make runtime.heap_alloc et al "contextless"
  • Add #no_broadcast to append_soa calls
  • Add no_zero_* variants for #soa dynamic arrays
  • More test suites

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