rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Add BigInt bindings

Open tom-sherman opened this issue 3 years ago • 3 comments

Relates to #4677.

This is my first ever ocaml code, would appreciate if someone could help getting the PR ready to be merged - or just outline what I need to do. Thanks!

tom-sherman avatar Dec 31 '21 16:12 tom-sherman

ts2ocaml would greatly benefit from having bigint defined & supported in rescript.

I'm willing to help this if you need a hand.

cannorin avatar Jun 08 '22 12:06 cannorin

How about reviving this? First by rebasing on master, then revisiting any open questions left.

cristianoc avatar Jun 25 '22 01:06 cristianoc

I've created a PR in which added the BigInt module https://github.com/rescript-lang/rescript-compiler/pull/5531. I think it should be good enough as the first iteration.

DZakh avatar Jul 09 '22 14:07 DZakh

I am thinking we may provide native bigint in the long term

bobzhang avatar Aug 30 '22 03:08 bobzhang

ts2ocaml would greatly benefit from having bigint defined & supported in rescript.

I'm willing to help this if you need a hand.

What's required specifically for ts2ocaml? Frankly speaking, that project has great potential and I'm simply interested in removing obstacles in the way to see what comes out of it.

cristianoc avatar Aug 30 '22 03:08 cristianoc

#5539 solved the core problem, as ts2ocaml now don't have to define bigint on our own and just use BigInt.t.

It would certainly help if we can have a proper bigint binding, but it doesn't need to be available as soon as possible 🙂

cannorin avatar Aug 30 '22 04:08 cannorin

Going to close this PR now that we have #5539. I wanted to add these so that we can have a shared bigint type across third party code, the bindings are not so important to me.

tom-sherman avatar Aug 30 '22 08:08 tom-sherman