melange-re / melange

A mixture of tooling combined to produce JavaScript from OCaml & Reason
https://melange.re
Other
846 stars 52 forks source link

Adding back nativeints to melange stdlib #1149

Closed Josef-Thorne-A closed 4 months ago

Josef-Thorne-A commented 4 months ago

Fix for #1148 This pull request makes it so that the melange compiler will accept nativeints and the associated Ocaml standard library functions associated with them. This makes it easier to port native libraries which made use of these functions -- for example, Sexplib0.

The intention is to enhance compatibility with Ocaml libraries rather than porting nativeint to Javascript as it's unclear if there is an obvious or correct way.

This implementation treats nativeints as 32-bit integers because it was the most straightforward path.

anmonteiro commented 4 months ago

continued in #1150