Commit 80c651e
feat: implement Phase 1 — manifest, codegen, and ABI modules
Replace scaffold stubs with full Nim code generation pipeline:
- Manifest: [project], [[functions]] (name, params, return-type, pragmas),
[nim] (backend: c/cpp/js, gc: arc/orc/none, opt-level) with validation
- ABI: NimProc, NimType, NimPragma, NimTemplate, CompilationTarget, GcStrategy
with Display impls and rendering methods
- Codegen/parser: parse manifest function signatures into typed ABI NimProc
structs, handling ptr/ref/seq/array types
- Codegen/nim_gen: generate .nim files with proc declarations, pragmas,
stub bodies, doc comments, and wrapExportc helper template
- Codegen/build_gen: generate nim compilation commands, nim.cfg, build.sh
- 38 tests (28 unit + 10 integration), all passing, zero warnings
- Example manifest in examples/fast-lib/
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a083a8e commit 80c651e
11 files changed
Lines changed: 2807 additions & 55 deletions
File tree
- examples/fast-lib
- src
- abi
- codegen
- manifest
- tests
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
0 commit comments