I wrote a blog post about adding command history browsing and editing, as well as tab completion, to ocamldebug, without typing a single line of code. I challenge you to review the PR for fun, and to try to find holes in it!
I’m going to add DWARF debugging information to OCaml next. I think it’s almost ready to go but needs double and triple checking. Commits look like this
Date: Thu Nov 13 14:55:24 2025 +0200
Add DWARF tests for basic functionality
Add minimal tests to verify DWARF emission works correctly with -g flag.
Tests compile OCaml programs with debugging enabled and verify correct
execution.
and
Date: Thu Nov 13 14:54:30 2025 +0200
Implement DWARF v4 debugging support for OCaml
Add complete DWARF version 4 debugging information generation for OCaml
native code. The implementation generates debug info for functions, types,
and line numbers, enabling debugger support for OCaml programs.
Configuration flags to enable/disable DWARF emission
The implementation follows the DWARF 4 specification and generates
valid debug sections (.debug_info, .debug_line, .debug_str, .debug_abbrev)
that can be consumed by standard debuggers like gdb and lldb.
I’m pretty sanguine about our new AI overlords and don’t care who wrote the code as long as it looks good and works good. It’s my code and my responsibility!
Do you care who wrote your favorite Dune or Opam features as long as you got them fast and they worked fine? I’m already unleashing my new superpowers on Dune!
Is there a reason you went with DWARF 4 rather than 5?
While I get your excitement, and I also think AI could help OCaml achieve parity with other languages and ecosystems as far as engineering is concerned, this kind of change has to be extremely intrusive to many layers of the compiler. It’d probably be a good idea to present your work to get some sense of its validity from people in the know, before putting in any more time.
I’m doing this as a scientific experiment of sorts, just to see how far I can push AI.
The change set is massive but it will be fun to review and poke holes in!
Also, I mentioned the future PR to the maintainers and my sense was that they are already against it. Apparently, a similar PR has been rejected back in 2016.