New Features
- LLVM C API integration for Windows through
-llvm-api - Experimental Support for
-llvm-apifor Linux and MacOS union #maybedirective- Built-in
Maybetype, e.g.Maybe(int)orMaybe(^T) - Selector Call Expressions
x->y(123) == x.y(x, 123)(useful for COM APIs) - Allow
.?to unwrap any union depending on the inferred context - Remove
using import not_inreplacednotin- Relative pointers
#relative(i16) ^Foo - Relative slices
#relative (i16) []Foo - Add
"pure"procedure types - Add new ternary expressions:
x if cond else yand `x when cond else y - Support by-reference semantics for
for value_ref, i in &some_arrayandfor key, value_ref in &some_map - Allow map indices to be references
&m[key]and return a valid pointer if exists otherwisenil - Allow referencing a compound literal
&Foo{} - Slice literals will use stack memory within a procedure and global memory in a global scope
- Add
-subsystemflag for Windows - Allow shadowing for
-vetwith immutable parameters @(force)/@(require)attributes forforeign import(they are equivalent)- Endian specific floats, i.e.
f32lef64be #optional_okfor procedures- Improved
odin <command> help -ignore-vs-search- Support
--flagas redundancy for-flag - Add
-extra-linker-flags:<string> - Add
#configto replace#defined - Restrict
#definedwithin procedure bodies to remove possible race conditions - Remove the need for
type_of,size_of,align_of, andoffset_ofto be keywords (now regular identifiers) - Strip
\rfrom raw string literals - Experimental Support for WASM
- Add
-target:<string>with fuzzy checking
Library Improvements
- Improve package os
- Add
package unicodewith basic letter querying - Add
utf8.string_to_runesandutf8.runes_to_string - Add more intrinsics (
cpu_relax,alloca,type_*, etc) - Add
#constto enforce constant procedure parameters to variable parameters - Add
package sys/windowswhich will replacepackage sys/win32in the future - Add more helpers to
package reflect - Remove
context.stdout/stderr - Add
package container - Add more hashes
- More
package syncfeatures - More
package threadfeatures - New
mem.Allocator_ModesQuery_FeaturesandQuery_Info
Bug Fixes
- Numerous core library bug fixes
- Fix
deferrelated bugs - Fix
__dynamic_array_reserveedge cases with zero sized types - Improve System V ABI
- Fix name mangling for
@(private)entities - Fix
time.now()being one day out on leap years after the leap month