c interop type foundation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user