💢 The truth about Rust + LLVM development hell

ChatGPT5 struggling for 34+ minutes with Rust lifetime/build errors...
This perfectly illustrates why we need Phase 22 (Nyash LLVM compiler)\!

Key insights:
- 'Rust is safe and beautiful' - Gemini (who never fought lifetime errors)
- Reality: 500-line error messages, 34min debug sessions, lifetime hell
- C would just work: void* compile(void* mir) { done; }
- Python would work: 100 lines with llvmlite
- ANY language with C ABI would work\!

The frustration is real:
- We're SO CLOSE to Nyash self-hosting paradise
- Once bootstrapped, EVERYTHING can be written in Nyash
- No more Rust complexity, no more 5-7min builds
- Just simple, beautiful Box-based code

Current status:
- PHI/SSA hardening in progress (ChatGPT5)
- 'phi incoming value missing' in Main.esc_json/1
- Sealed SSA approach being implemented

The dream is near: Everything is Box, even the compiler\! 🌟
This commit is contained in:
Selfhosting Dev
2025-09-12 05:48:59 +09:00
parent 23fea9258f
commit 1f5ba5f829
9 changed files with 258 additions and 60 deletions

View File

@ -319,14 +319,14 @@ impl LLVMCompiler {
instructions::emit_jump(&codegen, *bid, &entry_first, &bb_map, &phis_by_block, &vmap)?;
}
}
// Verify per-function
if !llvm_func.verify(true) {
return Err(format!("Function verification failed: {}", name));
}
}
// Close the per-function lowering loop
// Verify the fully-lowered function once, after all blocks
if !llvm_func.verify(true) {
return Err(format!("Function verification failed: {}", name));
}
}
// End of per-function lowering loop
// Build entry wrapper ny_main -> call entry function
let i64t = codegen.context.i64_type();