dev-2024-02
·
6723 commits
to master
since this release
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
- All platforms (including
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.quaternioncall must name the elements withx y z worreal imag jmag kmagrather than be positionalstruct #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.
- It sets the minimum alignment for the fields within a struct. This cannot be used with
- Removal of
inclandexclbuilt-in procedures. Prefer:s += {.A,}forincl(&s, .A)s -= {.A,}forexcl(&s, .A)
Compiler Improvements
@(entry_point_only)attribute to mark a procedure which can only be called withinmain(the entry point procedure)- Move
builtinmatrix procedures tointrinsics- They can be either accessed from
base:intrinsicsorcore:math/linalgetc packages
- They can be either accessed from
- Fix calling conventions for the
core:simd/x86calling conventions - Expand
-subsystemoption 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/virtualvirtual.map_file
core:dynlibdynlib.initialize_symbolsdynlib.last_error
core:c/libclibc.to_stream
core:math/fixedimprovements- Fix
vendor:raylibIsGestureDetectedbinding - Fixes for
wasmtargets - Remove any cyclic dependencies that
base:runtimepreviously depended on (e.g.core:os)