dev-2024-02
版本发布时间: 2024-02-02 00:56:35
odin-lang/Odin最新发布版本:dev-2024-09(2024-09-02 23:33:25)
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 positional -
struct #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
)
1、 odin-macos-amd64-dev-2024-02.zip 38.78MB
2、 odin-ubuntu-amd64-dev-2024-02.zip 69.78MB
3、 odin-windows-amd64-dev-2024-02.zip 118.18MB