dev-2024-02
gingerBill
released this
01 Feb 16:56
·
3125 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.quaternion
call must name the elements withx y z w
orreal imag jmag kmag
rather 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
incl
andexcl
built-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
builtin
matrix procedures tointrinsics
- They can be either accessed from
base:intrinsics
orcore:math/linalg
etc packages
- They can be either accessed from
- 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
)