Initial import: Aji 0.1 draft spec and Zig scaffolding

Draft specification, RFCs, reference registries and examples, plus the
reference-implementation skeleton: build.zig, diagnostic envelope with
error-code registry synced to docs, aji CLI, conformance runner with seed
tests, CI and contributor docs.
This commit is contained in:
dev committed 2026-10-04 11:59:13 +03:00
commit 17a55a7fef
67 files changed
+4197

No files matched your search

+61
View File
@@ -0,0 +1,61 @@
# Error Code Registry
Draft registry. Codes are stable once released in a tagged compiler version.
## E1xxx — Types and values
| Code | Kind | Meaning |
|---|---|---|
| E1001 | type.mismatch | Operand/result type mismatch |
| E1002 | type.invalid_cast | Cast not permitted by safe semantics |
| E1010 | init.read_uninitialized | Read from uninitialized storage |
## E2xxx — Memory and ownership
| Code | Kind | Meaning |
|---|---|---|
| E2001 | ownership.use_after_move | Value used after ownership transfer |
| E2002 | ownership.double_consume | Linear value consumed twice |
| E2101 | borrow.mutable_alias | Overlapping exclusive/shared borrow violation |
| E2102 | borrow.outlives_owner | Borrow may outlive backing storage |
| E2103 | memory.out_of_bounds | Access not proven in bounds |
| E2104 | memory.region_generation | Reference belongs to invalidated region generation |
| E2110 | island.escape | Island-internal reference escapes island |
| E2111 | island.foreign_mutable_edge | Island graph points to forbidden foreign mutable storage |
## E3xxx — Resources/capabilities/effects
| Code | Kind | Meaning |
|---|---|---|
| E3001 | resource.use_after_consume | Closed/joined/released resource reused |
| E3002 | resource.leak | Linear resource has no terminal consumption path |
| E3101 | effect.undeclared | Callee effect absent from caller contract |
| E3201 | capability.missing | Required authority unavailable |
| E3202 | capability.widen | Attempt to widen delegated authority |
## E4xxx — Concurrency
| Code | Kind | Meaning |
|---|---|---|
| E4001 | concurrency.not_send | Non-Send value moved to migratable task/thread |
| E4002 | concurrency.not_share | Non-Share value concurrently shared |
| E4101 | concurrency.possible_data_race | Conflicting ordinary access not ordered/synchronized |
| E4201 | atomic.invalid_order | Memory ordering invalid for atomic operation |
| E4301 | task.live_child_escape | Scope exits with live child task |
| E4302 | task.borrow_escape | Child task borrow can outlive parent storage |
| E4303 | io.buffer_in_flight | Buffer accessed while async operation owns/borrows it |
## E5xxx — AIR/verifier
| Code | Kind | Meaning |
|---|---|---|
| E5001 | air.invalid_ssa | SSA definition/dominance failure |
| E5002 | air.invalid_cfg | Invalid block/terminator structure |
| E5101 | verifier.resource_limit | Deterministic verifier resource limit exceeded |
## E6xxx — Unsafe/ABI
| Code | Kind | Meaning |
|---|---|---|
| E6001 | unsafe.required | Operation requires explicit unsafe boundary |
| E6101 | abi.unaligned_reference | Normal reference requested from insufficiently aligned storage |