MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.99k stars 529 forks source link

ocaml-gen: implement safe unsigned values #13228

Open dannywillems opened 1 year ago

dannywillems commented 1 year ago

Related to https://github.com/MinaProtocol/mina/issues/13224.

If we need real support for unsigned values, like u64 or u32, ocaml-gen must map to types like defined in ocaml-integers or ocaml-stdint. The values are implemented using custom blocks. Therefore, on the Rust side, the mapping must be custom blocks, not built-in types like u64.

dannywillems commented 1 year ago

ocaml-integers could be better as integers_stubs_js is already implemented