[ANN] rescript-struct V1 release - the best decoding library

After multiple iterations for the last 6 months I’ve released rescript-struct@1.0.0. I already mentioned the library in other posts, but today it finally became stable.

I think it’s the best ReScript decoding library, though it’s only my own opinion :stuck_out_tongue_closed_eyes:. But here are some highlights of what makes rescript-struct special comparing to other ReScript libraries:

  • Decodes any data, not only JSON
  • Asynchronous refinements and transforms
  • Support for both result and exception based API
  • Ability to disallow unrecognized object keys
  • Built-in union, literal and many other decoders
  • Fast: The 3rd fastest parsing library in the whole JavaScript ecosystem (benchmark)
  • Tiny: 7kb minified + zipped

Also, it has declarative API allowing you to use rescript-struct as a building block for other tools, such as:

  • ReScript JSON Schema - Typesafe JSON schema for ReScript
  • We use it to describe form schemas at Carla
  • I’m planning to use it for knex and trpc bindings