Hello folks!
We successfully concluded the ReScript Retreat 2025 that took place once again here in Vienna, Austria, from the 3rd to the 5th of May.
Last year we created a concise roadmap for 2024 based on our discussions at the last retreat. This year we took the chance to do a proper team retrospective so we can share the results with the rest of the community.
Roadmap 2024 retrospective
Here are the action items for 2024, including an assessment of completion and if it will land in the v12 release:
- Make rescript-core part of the compiler
- Done, in the finalization stage
- Integrate
rewatch
as the new ReScript build system- Almost done, rewatch will be the default build system going forward. To use the legacy build system, a build system configuration flag will be provided.
- First class RegExp syntax
- Done
- Better for/of and iterator support
- ToDo, still in the exploration phase.
- Remove curried mode
-
Done, there is no way to switch back to curried mode in v12, v11 was the transition version for this but going forward we want ReScript to look mostly the same across codebases so the
(. )
is gone for good.
-
Done, there is no way to switch back to curried mode in v12, v11 was the transition version for this but going forward we want ReScript to look mostly the same across codebases so the
- Remove .ml compilation support
- Done, no curried mode also means no OCaml syntax support, which also was never really supported by our editor tooling. And now we could also improve the AST as we don’t share it anymore with OCaml (sans a compatibility layer for ppx). Those AST improvements are fundamental for some other changes, see below.
- Improve reliability of the JSX parser for custom hyphenated prop names
- ToDo, needs to be revisited later on
- JSX: Use abstract types for React components
- ToDo, some experiments but nothing that brought us to a solution that works yet (Explore to make JSX component abstract by mununki · Pull Request #6304 · rescript-lang/rescript · GitHub)
- JSX: Introduce preserve mode
- Done, thanks to the aforementioned AST improvements, we are happy to announce that we are able to ship JSX preserve mode which makes ReScript compatible with the React compiler (which relies on JSX syntax to detect memoizable components). Also this might enable support for other frameworks like SolidJS, but that still needs assessment as of today.
- Improve TS types output via genType
- ToDo
- Drop bs- prefixes in
rescript.json
- Soon, this is being worked on. The refined configuration format will be supported by the new build system.
- First class embedded language support prototype
- WIP, this one requires the new build system, so we are waiting for it to stabilize first. It could land in a minor v12 release after the initial one.
- Misc: Aligning Documentation, VSCode marketplace, Governance
- Consolidate official rescript repositories under the rescript-lang Github org
- Done
- The rescript-association.org website will be migrated to rescript-lang.org. This task includes adding a donation form to the website in order to be able to fund future retreats (or even conferences
)
- Moving VSCode extension to an account other than
chenglou92
:- ToDo, we moved this task to after the v12 releases, as it’s not that important.
- Consolidate official rescript repositories under the rescript-lang Github org
Overall, we are quite happy with the results. The most important tasks (those that were relevant for the v12 release) have been tackled or are at the verge of being done.
Roadmap 2025
Most of our efforts will focus on the big major v12 release, removing tons of legacy constraints, aligning standard library APIs, and making the language more ergonomic for our users.
There will be a bunch of breaking changes that will be documented accordingly. We’ll try our best to provide codemods wherever possible to make the upgrade experience as smooth as possible.
ReScript 12 release
Timeline (estimated)
- First Beta in May 2025
- First release candidate in June 2025
- Official v12 release in July 2025
Release Highlights
- New build system (rewatch) will be the default
- opt-out to old (ninja based) build system still possible for compatibility
- Monorepo support
- Speed improvements
- Preparations for embed-lang facilities
- Language features
- Unified operators
- JSX preserve mode
- First class RegEx syntax
- Dictionary syntax + pattern matching (dict{})
- Type spread in pattern matching for variants
- Removed uncurried vs curried syntax
- no (.) => syntax
- No
mapU
functions needed - Seamless JavaScript compatibility by default
- New bitshift and bitwise operators
>>
- Directive syntax on a function level
- Better server component support e.g. “use server” on function
- @directives in functions by zth · Pull Request #6756 · rescript-lang/rescript · GitHub
- Enhancements for value / type coercion
- MyVariant :> string (if variant without payload)
- Nested record type definitions
- type foo = { myRec: { bar: {}} }
- bar would be inferred mostly
- foo.MyRec and foo.myRec.bar
- type foo = { myRec: { bar: {}} }
- Improved codegen for unboxed variants
- Looks more like handwritten code (dropped a lot of unnecessary checks)
- Unified Stdlib
- No rescript/core dependency
- Js/Js2 will be deprecated / removed
- Belt still exists within the stdlib → will be moved out in its own package later on
- OCaml stdlib is now fully removed
- ReScript stdlib is now aligned with the JS apis
- No uncurried APIs anymore due to the obsoletion of auto-currying
- Tools
- New doc header tooling for intellisense and API generation in Json and GH markdown
- Internal changes
- Own AST: We are not bound to the OCaml AST anymore, we have our own. However, there is a small translation layer in place to maintain compatibility with PPXes. With the new AST, features like JSX preserve mode can be implemented in a more straightforward manner.
Breaking changes
The following is an excerpt from the changelog.
- Make BigInt.fromFloat return an option rather than throwing an error in case it’s passed a value with a decimal value. #7419
- Replace ~date with ~day in Date.make. #7324
- Remove -bs-jsx-mode. #7327
- Treat int multiplication as a normal int32 operation instead of using Math.imul. #7358
- OCaml compatibility in the stdlib and primitives are dropped/deprecated. #6984
- Remove JSX v3. #7072
- Remove js_cast.res. #7075
- Make j and js allowed names for tag functions. #6817
- lazy syntax is no longer supported. If you’re using it, use Lazy module or React.lazy_ instead. #6342
- Remove handling of attributes with bs. prefix (@bs.as → @as etc.). #6643
- Remove obsolete @bs.open feature. #6629
- Drop Node.js version <18 support, due to it reaching End-of-Life. #6429
- Remove deprecated -bs-super-errors option. #6814
- Some global names and old keywords are no longer prefixed. #6831
- Remove ml parsing tests and conversion from .ml to .res via format. #6848
- Remove support for compiling .ml files, and general cleanup. #6852
- Remove rescript convert subcommand. If you need still need to convert between ml and res syntax, please use an older compiler version. #6860
- Remove support for @bs.send.pipe. This also removes all functions in Js_typed_array that rely on @bs.send.pipe. #6858 #6891
- Remove deprecated Js.Vector and Js.List. #6900
- Remove support for %time extension. #6924
- Remove caml_external_polyfill module and the related behavior. #6925
The list above might miss some things so we kindly ask you to install the first compiler beta as soon as it lands and do a test migration in your project if you can and report any issues. That way we can ensure a smoother migration for all other users.
Beyond v12 (what to expect in the future)
Of course there’s still a lot of things to do after v12 has been released, so we wanted to give a brief overview of where we’ll be heading once the biggest roadblocks are out of the way:
- Refinements for the build system changes
- Embed lang experiments (meta programming facilities)
- Faster builds by not relying on file system handling too much (what if the compiler was a database)
- Refinements on the core module structure / deprecations
- Private keyword exploration?
- All open items from the 2024 roadmap
- An online platform to share (even incomplete) bindings easily with tooling support
- Think of it as definitely typed, but more focused on ReScript specific use-cases, and hosted outside of GitHub.
Sponsor
We want to thank our main sponsor cca.io once again for sponsoring the venue for this year’s ReScript Retreat! In the near future, we will also make it easier for individuals or companies to donate to the project to be able to organize another Retreat next year.
Summary
The ReScript Retreat 2025 event has shown that meeting in person, creating a plan, and establishing accountability helps keep the focus on the things that matter the most to our users.
Always remember that ReScript is a 100% community project, so establishing accountability in a voluntary environment is a particularly tricky challenge, so we want to thank all our contributors taking responsibility and pushing things forward, spending their free time to help us make ReScript the best robustly typed language for web development on the market!