c interop type foundation

This commit is contained in:
2026-06-12 18:10:52 +02:00
parent d2f0d16795
commit 4e860b033e
27 changed files with 3523 additions and 380 deletions
+7 -5
View File
@@ -4,8 +4,10 @@
# milestones
1. interop type foundation
1. interop type foundation (implemented)
- unsigned integers, floats, and target-dependent c scalar types
- atomic `c_*` primitive types remain distinct until target-aware lowering
- `c_func` and pointer-only `c_struct`; `c` remains an ordinary identifier
- keep binding mutability (`::` / `=`) separate from element or pointee mutability (`mut`)
- arrays and indexing
- `[N]T`: array with `N` logical elements
@@ -13,7 +15,7 @@
- pointers
- `@T` / `@mut T`: non-null single-item pointer without arithmetic
- `*T` / `*mut T`: non-null many-item pointer with arithmetic
- optional pointers represent nullable pointers
- optional pointers represent nullable pointers (i.e. `?@T` / `?@mut T`, `?*T` / `?*mut T`)
- slices and slicing
- `[]T`: pointer and length
- `[;S]T`: pointer and length with a sentinel invariant
@@ -22,9 +24,9 @@
- character literals
- optionals with trapping unwrap and fallback operations
- native structs with compiler-controlled layout
- pointer-only `c struct` support with target c layout
- `Some :: c struct { ... }`: defined c-layout struct
- `Some :: c struct`: opaque c-layout struct
- pointer-only `c_struct` support with target c layout
- `Some :: c_struct { ... }`: defined c-layout struct
- `Some :: c_struct`: opaque c-layout struct
- defer passing c structs by value until target ABI classification exists
2. restricted c header imports