Releases: odin-lang/Odin
Releases · odin-lang/Odin
dev-2022-08
New Language Features
None
New Compiler Features
#by_ptrprocedure attribute to enforce a parameter to be passed by pointer internally
Compiler Improvements
- Improved build scripts for *nix systems
- Improved error message when doing
^xinstead of&xfor addressable variables - Improved debug symbol generation
- Fix and improve
x->y()behaviour to minimize duplicate evaluation - Disallow
proc do stmtand only allowproc() { stmt }- This removed an ambiguity with parsing
- Fix minor issue with a lack of a trailing comma in parsing
structs without-vet - Numerous bug fixes
New Packages
None
Package Improvements
- Improvements to
strings.Bufferrelated procedures - Update
vendor:raylibto support macos-arm64 - Minor improvements to mathematical procedures
- Minor clean up of the WASI API
- Simplify logic of
appendof zero sized elements
dev-2022-07
New Language Features
- Add builtin
shrinkfor dynamic maps and arrays
New Compiler Features
Compiler Improvements
- Fix
odin testrunner. - Use
memmoveif possible when emitting store over a certain size
New Packages
core:slice/heap- A max heap implementation
Package Improvements
- Tighter allocation of Arena allocator
- Remove
simd_rem; Disallowsimd_devfor integers - Remove
stringsdependency fromcore:sys/windows - Additional Win32 bindings
- Add new verbs and qualifiers to
core:fmt - Support utf-16 printing with
[]u16and[^]u16 - Add
strings.prefix_lengthandslice.prefix_length - Add
runtime.dll_forward_reasonfor Windows
dev-2022-06
New Language Features
-
Generic
#simdtype and intrinsics- Supports array programming semantics (operators)
- New generic intrinsics
- Platform specific intrinsics for the x86 family:
sse,sse2,sse41,sse42,ssse3cmpxchg16b,fxsr,lzcnt,pclmulqdq,popcnt,sha
- PR #1807
-
Merge functionality of
#maybewith standardunionfunctionalityMaybe :: union($T: typeid) {T}No need for#maybeany more
-
Deprecation of
a..brange syntax to prefera..=b
New Compiler Features
-
New intrinsics:
non_temporal_loadnon_temporal_storefused_mul_add
-
Generic
#simdintrinsics:simd_addsimd_subsimd_mulsimd_divsimd_shlsimd_shrsimd_shl_maskedsimd_shr_maskedsimd_add_satsimd_sub_satsimd_andsimd_orsimd_xorsimd_and_notsimd_negsimd_abssimd_minsimd_maxsimd_clampsimd_lanes_eqsimd_lanes_nesimd_lanes_ltsimd_lanes_lesimd_lanes_gtsimd_lanes_gesimd_extractsimd_replacesimd_reduce_add_orderedsimd_reduce_mul_orderedsimd_reduce_minsimd_reduce_maxsimd_reduce_andsimd_reduce_orsimd_reduce_xorsimd_shufflesimd_selectsimd_ceilsimd_floorsimd_truncsimd_nearestsimd_to_bitssimd_lanes_reversesimd_lanes_rotate_leftsimd_lanes_rotate_right
-
Platform specific intrinsics:
x86_cpuidx86_xgetbv
-
@(priority_index=<int>)forforeign import- Force certain things to be linked before others
- Required for the deterministic link order of foreign imports
Compiler Improvements
- Allow
transmuteon constant expressions - Heavily improved support for
js_wasm32target- Basic DOM UI procedures
- Event system including listeners
- Page Allocator
- Compiler flag error message improvements
- Improved ternary-if type inference
- Improved -vet shadowing with ternary-if expressions
- Allow
import _ "foo"to allow for@(init)procedures without producing an import name - Correct
@(require_results)on parapoly procedures
New Packages
core:simdcore:simd/x86core:encoding/endianvendor:ggpovendor:openexr
Package Improvements
- Unify
raw_dataincore:memwithcore:runtime- Make
raw_datareturn[^]Ttypes
- Make
core:imagegeneric interface improvementsimage.which- Generic loader
- Add
#optional_oktodynlib.symbol_address - Add
mem.DEFAULT_PAGE_SIZE - Add
rand.init_as_systemto allow for system-level based random number generation - Numerous minor fixes to
core:packages - Interface cleans up to numerous packages keeping platform specific code private
dev-2022-05
New Language Features
None
New Compiler Features
- New intrinsics:
intrinsics.type_is_multi_pointerintrinsics.type_field_type
Compiler Improvements
- Numerous bug fixes
- Refactored filename handling
- Error message if the output is a directory
- Packages are assumed to be directory-based unless
-fileis supplied
New Packages
- New builtin
container_of core:compress/shocoA short string (de)compressorcore:container/intrusive/listAn intrusive linked listcore:encoding/varintLEB128 encode and decodecore:encoding/xmlAn XML parsercore:image/netpbmA reader/writer for the NetPBM image formatscore:image/qoiA reader/writer for the QOI image formatcore:image/tgaA writer for a common subset of the TGA formatcore:text/i18nAn easy way to translate your software using GetText or Qt Linguist translations
Package Improvements
- Additional D3D and win32 bindings and constants
- Unified
SemaandAtomic_Semabehaviour - Fix quaternion implementation #1644
- Updated Vulkan generator and package
- Fixed static arena assertion fail #1740
core:container/lruReduce allocations, fixescore:encoding/jsonUnmarshal fixescore:hash/xxhashFixescore:path/filepathAdd file stem and long-extension procedurescore:sliceMore helperscore:stringsAdd Levenshtein distancecore:syncImprovementscore:threadNew thread pool implementationvendor:metalandvendor:darwinnumerous additions and fixes- Quicksort minor fix
dev-2022-04
New Language Features
- None
New Compiler Features
- Rework of the entire atomic intrinsics (similar to C11 in design)
Atomic_Memory_Orderenumatomic_type_is_lock_freeatomic_thread_fenceatomic_signal_fenceatomic_storeatomic_store_explicitatomic_loadatomic_load_explicitatomic_addatomic_add_explicitatomic_subatomic_sub_explicitatomic_andatomic_and_explicitatomic_nandatomic_nand_explicitatomic_oratomic_or_explicitatomic_xoratomic_xor_explicitatomic_exchangeatomic_exchange_explicitatomic_compare_exchange_strongatomic_compare_exchange_strong_explicitatomic_compare_exchange_weakatomic_compare_exchange_weak_explicit
union #shared_nil- This adds a feature to
unionwhich requires all the variants to have anilvalue and on assign to the union, checks whether that value isnilor not. If the value isnil, the union will benil(thus sharing thenilvalue)
- This adds a feature to
- Improved build script for the compiler
- Numerous bug fixes
Compiler Improvements
- Improve
-helpmessages for define/config
New Packages
- Completely redesigned
core:sync- Designed from the ground up with making the zero value useful (no need to initialize nor destroy values)
- Utilizes the abilities of modern OSes with native futex support
- Primitives:
MutexRW_MutexRecursive_MutexCondSemaFutex
- Extended:
Wait_GroupBarrierAuto_Reset_EventTicket_MutexBenaphoreRecursive_BenaphoreOnce
core:math/ease
Package Improvements
- Update Thread Pool in
core:thread - More additions to
core:sys/windows - Remove
#caller_locationfrom certain calls incore:container/small_array vendor:stb/easy_fontfixes/improvements- Update
mem.nil_allocatorto match the same implementation inruntime - Numerous improvements and additions to
core:strings - Add
nilcheck onast.walkincore:odin/ast - Numerous bug fixes
dev-2022-03
New Language Features
[Enum]Type{...}checks for missing enumerated fields in a compound literal by default- Opt-out with
#partial [Enum]Type{...}
- Opt-out with
#sparse[Enum]Typefor non-contiguous enum fields used in an enumerated array type#partial #sparse[Enum]Type{...}can be combined to allow for missing fields in a sparse enumerated array compound literal
New Compiler Features
- OpenBSD support
- Objective-C Runtime Intrinsics
intrinsics.objc_sendintrinsics.find_selectorintrinsics.find_classintrinsics.register_selector(only required when creating Objective-C classes at runtime)intrinsics.register_class(only required when creating Objective-C classes at runtime)
intrinsics.constant_utf16_cstring
Compiler Improvements
//+private filesupport- Numerous bug fixes
- Removal of
context.user_data- Prefer
context.user_ptr
- Prefer
New Packages
- Native Metal package:
- These directly call the Objective-C message sending runtime directly and does not use a wrapper
vendor:darwin/Metalvendor:darwin/QuartzCorevendor:darwin/Foundation
- DirectX packages
- Article: https://odin-lang.org/news/major-graphics-apis/
vendor:directx/d3d11vendor:directx/d3d12vendor:directx/d3d_compilervendor:directx/dxgi
core:container/topological_sort
Package Improvements
core:mem/virtualLinux Support- Add
is_16_bit_from_memorytovendor:stb/image
dev-2022-02
New Language Features
None
New Compiler Features
- Add
#no_type_assertand#type_assertto disable implicit type assertions withx.(T) - Add
ODIN_ERROR_POS_STYLEconstant and-error-pos-style:<string>option to allow for default or unix style error messages
Compiler Improvements
- Correct debug information logic for procedure parameters
- General improvements to
odin docsupport the new https://pkg.odin-lang.org/ - Correct
//+privateforodin doc - Make
ODIN_ENDIANa constant enum value rather than a string - Rename architecture
386toi386 - Improve entry code handling to support more platforms easily in the future
- Improve/simplify quaternion casting
New Packages
core:container/lru- Rename
core:pathtocore:path/slashpath
Package Improvements
slice.stable_sort*procedures- Add allocator parameter to
rand.perm rand.exp_float64strings.split_lines*procedures
dev-2022-01
New Language Features
None
New Compiler Features
None
Compiler Improvements
- Correct
odin docdefault parameter valueinit_stringgeneration - Improve debug symbol retention with
-debug -o:minimal - Disallow
@(static)and@(thread_local)withindeferstatements - Improvements for Darwin ARM64 support
- Improved float to quaternion conversion support
- Improved global
whenhandling
New Packages
- Replace
core:containerwith new packages core:container/bit_arraycore:container/priority_queuecore:container/queuecore:container/small_array
Package Improvements
- Improvements to
core:math/big - Improvements to
core:odin/parser - Make
strconvmore robust - Fix typo in
core:json/encodingfromunmarshalltounmarshal - Remove the extra hidden
0terminator fromstrings.cloneandbytes.clonewhich was there for very old legacy reasons, preferstrings.clone_to_cstringwhen that behaviour is needed - Fix
strings.fields_procandstrings.index_any - Fix
math.prod - Add
hash.djbx33a - Add
sort.map_entries_by_keyandsort.map_entries_by_value
dev-2021-12
New Language Features
- Allow casting from floats to complex numbers and quaternions
@(linkage=<string>)for procedures and variables@(require)for procedures#load_hash(<filepath>, <string-hash-kind>)-target:js_wasm32target (custom Web JavaScript runtime to run Odin executables)
New Compiler Features
- Add
ODIN_NO_CRTglobal boolean constant - Add
ODIN_BUILD_MODEglobal string constant - Allow compilation of assembly files on Windows through
nasm.exein conjunction with theforeign importsystem (.asm,.s,.Sfiles) -extra-assembler-flags:<string>-timings-export:<string>
Compiler Improvements
- Improve matrix related operations
- Correctly support
-default-to-nil-allocatorfor all platforms -no-crtimprovements on Windows- General wasm32 improvements
- Internal compiler (not language) improvements to data structures
- Improve compilation passes on LLVM 12.0.1 and LLVM 13.0.0 (compiler still defaults to LLVM 11.1.0)
- Correct
x in ptrlogic - Numerous bug fixes
New Packages
vendor:raylibversion 4.0core:math/linalg/glsl- GLSL-like mathematics types and operationscore:math/linalg/hlsl- HLSL-like mathematics types and operations
Package Improvements
- Make
mathprocedurescontextless - Add
asinh,acosh,atanh - Represent matrices in
fmtas expected - Make runtime builtin matrix procedures
contextless package runtimelinkage improvementslinalg.matrix4_look_at_from_fru- Implement
math.ldexpandmath.frexpin native Odin - Add
log1p,erf,erfc,ilogb,logbnextafter,gamma,lgamma,signbittocore:math - Add support for darwin to
core:c/libc - Add numerous new
core:cryptopackages - Add
os.read_at_leastandos.read_fullutility procedures - Correct reading from a console on Windows
dev-2021-11
New Language Features
matrixtypematrix[Rows, Columns]Element_Type- A
matrixis a mathematical type built into Odin. It is a regular array of numbers, arranged in rows and columns - Multiplication between matrices and arrays
- Component-wise operations
- Submatrix casting square matrices
- Submatrix casting non-square matrices
- Column-major memory layout
- Limited to a maximum of 16 elements
- Supports integers, floats, and complex numbers (only)
- Optimized for SIMD vectorization
- Built-in procedures (Compiler Level)
transposeouter_producthadamard_productmatrix_flattenconj
- Built-in procedures (Runtime Level)
determinantadjugateinverseinverse_transposehermitian_adjointmatrix_tracematrix_minor
odin report- Reporting of Platform Specific Information
wasi_wasm32support- Improved WASM support in general
New Packages
core:cryptovendor:ENet
Package Improvements
- Improvements to
vendor:OpenGL- Set
VertexAttribPointerrelated calls to useuintptrinstead ofrawptrfor the byte offset parameter - Convert all functions taking
GLbooleantobool
- Set
- Updates to
core:sync/sync2- Generic
Futexinterface for each platform Semaimplemented withFutex
- Generic
- Improvements to
core:mem/virtualto make usage consistent - Minor improvements to the SDL vendor packages
core:encoding/json- add alias forMJSONasBitsquid- Improvements to
vendor:microui - Improvements to
vendor:raylib - Add more OOM checks within the core library
- Unify
runtime.memory_equalandruntime.string_eqlogic - Add
idtothread.Thread - Add
slice.swap_between - Add experimental
big.Rat
Compiler Improvements
intrinsics.unaligned_storeintrinsics.unaligned_loadintrinsics.mem_zero_volatileoffset_of_by_string- Heavily improve the LLVM struct type generation to improve ABI
- Simplify
maplogic and code generation - Disallow
or_returnwithindefer - Fix
strip-semicolonon some machines which didn't truncate correctly - Allow parsing for
[^]T{}to improve error messages - Support LLVM 11, LLVM 12, and LLVM 13 in the code
- Fix debug problems
- Improved
bit_setsemantics