Skip to content

Commit ab56d8b

Browse files
committed
Document ion-build in the ion-lang skill and compiler-pipeline reference.
Adds bin/ to the module list and covers ion-build entry points plus src/build/ in the pipeline doc.
1 parent a92e746 commit ab56d8b

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.cursor/skills/ion-lang/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Ion is a move-only, no-GC systems language transpiled to C. This skill orients y
2727
.ion → compiler::parse_module (imports/cycles, then lex+parse per file) → type checker → IR → cgen → .c → gcc + runtime → executable
2828
```
2929

30-
Rust modules in `src/`: `lexer`, `parser`, `ast`, `compiler` (module resolution), `build` (manifest, C toolchain, `ion build` driver), `tc` (`mod.rs`, `ownership.rs`, `builtins.rs`, `types.rs`), `ir`, `cgen` (`mod.rs`, `types.rs`, `builtins.rs`, `drop.rs`), `lsp`.
30+
Rust modules in `src/`: `bin` (ion-build, ion-lsp), `lexer`, `parser`, `ast`, `compiler` (module resolution), `build` (manifest, C toolchain, `ion build` driver), `tc` (`mod.rs`, `ownership.rs`, `builtins.rs`, `types.rs`), `ir`, `cgen` (`mod.rs`, `types.rs`, `builtins.rs`, `drop.rs`), `lsp`.
3131

3232
Binaries: `ion-compiler` (transpile/codegen), `ion-build` (full project build via `ion.toml`), `ion-lsp`.
3333

.cursor/skills/ion-lang/references/compiler-pipeline.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
| Binary | Source | Role |
66
|--------|--------|------|
77
| `ion-compiler` | `src/main.rs` | CLI: parse → type-check → codegen |
8+
| `ion-build` | `src/bin/ion-build.rs` | Project build via `ion.toml` (uses `src/build/`) |
89
| `ion-lsp` | `src/bin/ion-lsp.rs` | Language server for editor diagnostics |
910

1011
## Stage responsibilities
@@ -65,6 +66,17 @@
6566
- `generate_module_source` / `generate_module_header` - multi-file `.c`/`.h`
6667
- Runtime support in `runtime/ion_runtime.c` and `runtime/ion_runtime.h`
6768

69+
### 8. Project build (`src/build/`)
70+
71+
| File | Role |
72+
|------|------|
73+
| `manifest.rs` | Parse `ion.toml`, `BuildMode`, `Project::discover` |
74+
| `driver.rs` | `build_project`: transpile, compile generated C, link runtime |
75+
| `c_toolchain.rs` | Invoke `CC` (default `gcc`), compile and link flags |
76+
| `paths.rs` | Project root, stdlib paths, `discover_import_config` (shared with LSP) |
77+
78+
`ion-build` calls `build_project` after discovering the manifest. Application workflow; integration tests usually call `ion-compiler` directly.
79+
6880
## Single vs multi-file (`src/main.rs`)
6981

7082
**Single (default):** merge all imported modules → one IR → one `.c` next to input.

0 commit comments

Comments
 (0)