I think you are using the wrong language to be honest. LLMs are best at languages like Python, Javascript and Go. Relatively simple structures and huge amounts of reference code. Rust is a less common language which is much harder to write.
Did you give claude code tests and the ability to compile in a loop? It's pretty good in go at least at debugging and fixing issues when allowed to loop.
Certainly some facts can imply a certain understanding of the world, but they don't require that understanding in order to remain true. The map may require the territory, but the territory does not require the map.
“Reality is that which, when you stop believing in it, doesn't go away.” ― Philip K. Dick