dev-2024-04
版本发布时间: 2024-04-09 00:04:01
odin-lang/Odin最新发布版本:dev-2024-09(2024-09-02 23:33:25)
New Language Features
-
bit_field
type
Foo :: bit_field u16 { // backing type must be an integer or array of integers
x: i32 | 3, // signed integers will be signed extended on use
y: u16 | 2 + 3, // general expressions
z: My_Enum | foo.SOME_CONSTANT, // ability to define the bit-width elsewhere
w: bool | foo.SOME_CONSTANT > 10 ? 2 : 1,
}
Handle :: bit_field u32 {
slot: u32 | 16,
generation: u32 | 15,
in_use: bool | 1,
}
-
name: type | bit_width
-
name: type | bit_width "field_tag"
(similar to a struct field with a tag)
Compiler Improvements
- Improved Error Reporting System
- Sorted printing based on error position
- Ability to export error list to json
-json-errors
-
-terse-errors
are only a single line now
- Error message suggestions for people making common C mistakes
- Aiding newcomers from C/C++ to Odin
- Loads of debug info refactors and improvements
- Add Haiku OS support by @avanspector in https://github.com/odin-lang/Odin/pull/3230
- Respect "smart linker" approaches
- Respect
-lld
on non-Windows machines - Remove entry point when compiled with no-entry-point as shared library
- Numerous fixes to wasm targets
- Numerous fixes to ARM64 ABI on Darwin
- Numerous fixes to SysV AMD64 ABI on Darwin and Linux
- Speed up
path_to_fullpath
on Linux/macOS - Numerous compiler fixes and error messages
New Packages
- Moved
vendor:darwin/Foundation
tocore:sys/darwin/Foundation
Package Improvements
- Improvements to
core:crypto
- Make raylib and stb_rect_pack be free of libc
- Numerous improvements to
core:encoding/json
- Support writing enum value names
- Support for
using _: T
fields
- Fixes to
core:math/big
- Fixes to
core:math/linalg
- Fixes to
core:slice
- Fixes to
core:odin/parser
- General fixes to
base:runtime
-
vendor:x11
fixes - Allow for the new futex API on darwin platforms if it is available
- Fix
os.read_entire_file
for pipes and console
CI Improvements
- Update LLVM to 17 for the CI/Releases
Full Changelog: https://github.com/odin-lang/Odin/compare/dev-2024-03...dev-2024-04
1、 odin-macos-amd64-dev-2024-04.zip 86.69MB
2、 odin-macos-arm64-dev-2024-04.zip 84.48MB
3、 odin-ubuntu-amd64-dev-2024-04.zip 68.47MB
4、 odin-windows-amd64-dev-2024-04.zip 114.6MB