HeadlinesBriefing favicon HeadlinesBriefing.com

Rars: Rust RAR Implementation by LLMs

Hacker News •
×

The author details their experience creating 'Rars,' a Rust implementation of the RAR compression format, primarily using large language models (LLMs) like OpenAI Codex 5.5 and Claude Opus 4.7. What traditionally would have taken about 5 years of dedicated work was accomplished in just 5 weeks of evenings and weekends at a cost of approximately £40 in tokens. Despite the impressive speed, the 55,000-line implementation isn't particularly fast and earned the author an almost-ban from OpenAI. The project required reverse engineering the RAR format since formal specifications don't exist. The author employed a hybrid approach, combining automated analysis of existing decompressor sources with LLM-assisted documentation and code generation. Throughout the process, they had to carefully manage different LLM strengths and weaknesses - Codex for generating code following specifications, Claude for strategic discussions, while constantly intervening to prevent problematic patterns from emerging in the codebase.

Key Points:

- Created a RAR implementation in Rust using LLM assistance that would have taken 5 years traditionally

- Required reverse engineering the RAR format since formal specifications don't exist

- Combined automated analysis of existing decompressors with LLM-assisted documentation and code generation

- Needed careful oversight of LLMs to prevent problematic code patterns and cyber violations

- Final implementation is 55k lines of code that works but isn't particularly fast