package zarith_stubs_js
Install
Dune Dependency
Authors
Maintainers
Sources
md5=e6e748e14c7699ad2c3baa8dff6907fa
sha512=7ab808431ff5c5ab235911431e9afcf208f4f6bd7b552c1b3421e4dd1c1a02b23ba84c880c8a69856533e9221292351740f50a62d8e72c78a30be6372f5f2a20
Description
This library contains no ocaml code, but instead implements all of the Zarith C stubs in Javascript for use in Js_of_ocaml
Published: 13 Nov 2023
README
Zarith Stubs JS
Zarith is an OCaml library that implements common operations over arbitrary-precision integers and rationals. It is implemented via a C api that primarily calls out to Gnu Multiple Precision Arithmetic Library. Because of that C API, Zarith could not be compiled via Js_of_ocaml until now.
Zarith Stubs JS is a reimplementation of the native C functions in JavaScript. It makes extensive use of peterolson/BigInteger.js as a shim for browser BigInt functionality and also for the implementations of many numerical algorithms.
How to use it ?
In order to use zarith
with js_of_ocaml
, just provide the javascript runtime files to the js_of_ocaml compiler and use zarith
as you would normally do.
In practice,
if you use dune to build your project, just add
zarith_stubs_js
as a library dependency.if you don't use dune, you need to find a way to pass both biginteger.js and runtime.js files to the js_of_ocaml compiler command line.
Dev Dependencies
None
Used by (17)
-
bignum
= "v0.16.0"
-
bls12-381
>= "3.0.0"
-
bls12-381-js
>= "0.4.2"
- bls12-381-js-gen
-
catala
>= "0.3.0"
-
data-encoding
>= "0.5"
- integers_stubs_js
- octez-libs
- octez-proto-libs
-
polynomial
>= "0.4.0"
-
scaml
>= "1.5.0"
-
tezos-crypto
>= "13.0"
- tezos-hacl
-
tezos-micheline
>= "13.0"
- tezos-micheline-rewriting
-
tezos-protocol-environment
>= "13.0"
-
tezos-stdlib
>= "12.0"
Conflicts
None