We’re getting a bit off topic, but
tsnobip:
It’d be cool to make it output more idiomatic and modern rescript though, like optional fields, unboxed variants, etc.
The team is open to a contribution for this, based on a discussion I had with them a couple of weeks ago, but I doubt I’ll have time to do it myself. I just opened a ticket with the details.
opened 01:24AM - 02 May 24 UTC
Continuing the discussion I started in https://github.com/ahrefs/atd/pull/375#is… suecomment-2058453755
ReScript 11 introduces a [new "uncurried" mode](https://rescript-lang.org/blog/uncurried-mode), enabled by default. This mode is fundamentally incompatible with the `-bs` (soon to be `-mel`) generated output. I have [forked the runtime](https://github.com/TheSpyder/rescript-atdgen-codec-runtime) and would like to support both curried and uncurried mode as not everyone can migrate quickly. Converting the runtime wasn't too hard, but I had to abandon the effort when I realised the `atdgen` output makes use of curried functions (which is totally normal in OCaml code).
Fixing this requires adding a new generated code path for ReScript. If developed hand-in-hand with a new runtime architecture it might be a good opportunity to make use of ReScript-specific features.