Hello everyone! I was just curious whether there was interest in starting the process of getting a DWARF Language Code for roc (i.e., an assigned value that can be put in DW_AT_language)? It looks like there is a reasonably well-defined process for it: https://dwarfstd.org/languages.html
On a related note, it looks like currently the DWARF information embedded in Roc programs claims to be from the ANSI C99 (value 12). Given that DW_AT_language is not a required element of the Compilation Unit, do you think that we should omit it rather than supply misleading information? If so, I'd be more than happy to make a PR to fix it. I just didn't want to do that unless there was consensus.
Would you be able to help us get a code with the standards team?
I have no idea what the consequences are of being in the language codes :sweat_smile:
I guess it presumably helps debuggers somehow? It looks like it's just an integer with no metadata attached?
IIUC it allows debuggers to know that the binary came from Roc. I guess it enables debuggers to correctly interpret the language's data structures?
Luke Boswell said:
Would you be able to help us get a code with the standards team?
I would love that!!
Richard Feldman said:
I guess it presumably helps debuggers somehow? It looks like it's just an integer with no metadata attached?
That's right! I see it more as a "stamp" of approval.
Aurélien Geron said:
IIUC it allows debuggers to know that the binary came from Roc. I guess it enables debuggers to correctly interpret the language's data structures?
That is absolutely one reason!! Although the goal of DWARF is to turn language-specific data structures into representations that are independent and can be rendered the same way.
The standard handles mappings between generated machine code and line #s in the source program, for instance.
I did find two places where the standard calls out the value of a debugger knowing DW_AT_Language. First, " If no ordering attribute [of the layout of arrays] is present, the default ordering for the source language (which is indicated by the DW_AT_language attribute of the enclosing compilation unit entry) is assumed." Second, there is an implicit "lower bound" value associated with each language (for when the lower index of a range operation is omitted (i.e., is the language 0 or 1 indexed!).
Of course, I am sure that people smarter than me can find other examples in the standard where interpretation depends on DW_AT_Language. I just wanted to support @Aurélien Geron 's statement!
If there is consensus that it would be a good idea to explore getting registered with DWARF, and the community is okay with me representing it in that process, I would be happy to start exploring!
go for it!
Richard Feldman said:
go for it!
THANKS!! I will keep you posted!!
Here is the draft of the message that I intend to send to the DWARF standards body requesting allocation for Roc:
# Add Language Codes For Roc Programming Language
## Background
Roc (https://www.roc-lang.org/) is a "fast, friendly, functional [programming] language" quickly advancing toward its first named release. The roc compiler currently generates DWARF info to aid debugging in its compiled executables on and the community would appreciate recognition in the DWARF standard.
## Overview
The roc community politely requests the assignment of a Language and Version Code for DWARF Version 6:
| Language | Language Code (`DW_AT_language_name`)| Value | Default Lower Bound |Version Scheme |
| -- | -- | -- | -- | -- |
| Roc | `DW_LNAME_Roc` | _TBD_ | `0` | _TBD_ |
Further, we politely request the assignment of a Language Code for DWARF Version 5:
| Language Name | Value | Default Lower Bound |
| -- | -- | -- |
| `DW_LANG_Roc` | _TBD_ | `0` |
## Dependencies
N/A
## References
Official Roc Website: [roc-lang.org](http://www.roc-lang.org)
If you don't mind, I have three requests:
Thank you for the feedback! I wanted to make sure that I got everyone's signoff before I sent a message representing the Roc community!
Thanks for your work on this @Will Hawkins :heart:
Minor corrections of the background text:
Roc (https://www.roc-lang.org/) is a "fast, friendly, functional [programming] language", quickly advancing toward its first numbered release. The Roc compiler currently generates DWARF info to aid debugging of its compiled executables, and the community would appreciate recognition in the DWARF standard.
- Would you please verify that I have used the language's name appropriately (i.e., do we want Roc or Roc Lang?);
Probably just Roc
This should be https:
## References
Official Roc Website: [roc-lang.org](https://www.roc-lang.org)
make sure that I have properly followed their "best practices";
Their template has blank lines before and after the subtitles. Also, the Proposed Changes section is missing or is that not necessary for this particular request?
For the version I would go with major × 10,000 + minor × 100 + patch but that would require us having released 0.1
Thanks to @Anton for the feedback. To make it easier to keep track of what will ultimately be submitted, I have transferred the markdown here:
https://sonic.cerfca.st/DApXxNfnTo23-wIrz1daCA
If you have a github account, you can log in to that instance of Hedgedoc and make edits! I figured transferring it there would make it easier to coordinate changes!
Thank you @Anton and @Luke Boswell for the confirmation that we want "Roc". I have updated to make sure that "Roc" is capitalized throughout. I also added a Proposed Changes section and added blank lines.
I believe I got all the feedback incorporated!!
Once we get confirmation from @Richard Feldman about version format, we can start the submission process!
looks great! And yes, "Roc" is correct.
Thanks for doing this, @Will Hawkins! :smiley:
Anton said:
For the version I would go with
major × 10,000 + minor × 100 + patchbut that would require us having released 0.1
Sorry -- one other question: Is there agreement on @Anton 's description of the version scheme that we will use? I have listened to @Richard Feldman in several interviews and know that he wants to be very intentional about numbering, so I just want to make sure that I don't screw up something!
yes, that sounds good to me!
FYI: The request has been submitted: https://lists.dwarfstd.org/pipermail/dwarf-discuss/2026-August/002851.html
Last updated: Sep 03 2026 at 15:16 UTC