Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=a2051b5842a2deeb10ad99c57a7ea443
sha512=3e2669baf621304bbe14bcb53ab128d01577b98f13bec497953328c8605c9dc5667c873b680e087dd240362ee77b0f15d1d4bbe60dd67a2dc4b8b64838189d6a
Description
This package should only be used if newer versions of bls12-381 conflict with this version. This package should be considered as legacy and should never be used.
Added to opam-repository:
README
OCaml implementation of BLS12-381
Install
# if you implement a library and you don't need an actual implementation
opam install bls12-381
# to target UNIX
opam insall bls12-381-unix
# to target JavaScript, to be used with jsoo.
opam install bls12-381-jsSee below how to use in your project.
Run tests
dune runtest
dune build @test/js/browser/serve # Check _build/default/test/js/browser and run `npm run serve`To get the coverage (only ok for bls12-381-unix and bls12-381-gen)
dune runtest --instrument-with bisect_ppx --force
bisect-ppx-report htmlHow to use in my project
If you are developing a library using bls12-381, you only need to add bls12-381 in the dependency list. However, if you are writing a binary, three packages are relevant:
bls12-381-unix: to be used for UNIXbls12-381-js: to be used to target JavaScript. It does rely on the node packages listed here, version >= 0.8.1, and suppose this module is loaded before in the global namespace under the name_RUSTC_BLS12_381. Seetest/js/browser/for an example. You need to use the appropriate package depending on the platform you target (Node or a bundler for the browser). For instance, if you target Node (resp. a bundler like webpack for a browser usage), you must use@dannywillems/rustc-bls12-381-node(resp.@dannywillems/rustc-bls12-381).bls12-381-js-gen: if the module is loaded somewhere else than in the global namespace like the previous package supposes, you can use this third library that provides functors. The functors are expecting a module of the signature:sig val rust_module : unit -> Jsoo_lib.ESModule.t val get_wasm_memory_buffer : unit -> Jsoo_lib.Memory.Buffer.t end(note: functions are not directly evaluated values are required because the module might not already be loaded when loading the JavaScript resulting file and the wasm memory buffer being a view over a ArrayBuffer might be invalid if the buffer size is increased at runtime). You can see an example in the
src/js.
For more examples, see the test directories.
Run the benchmarks
opam install core_bench
dune exec benchmark/bench_ec.exe
dune exec benchmark/bench_ff.exe
dune exec benchmark/bench_pairing.exeDocumentation
opam install odoc
dune build @doc
Dependencies (9)
-
tezos-rust-libs
= "1.1" -
bls12-381-gen
= version -
ctypes
>= "0.18.0" & < "0.19.0" -
zarith
>= "1.10" & < "2.0" -
ff-sig
>= "0.6.1" & < "0.7.0" -
dune-configurator
build -
dune
>= "2.8.4" -
conf-rust
build -
ocaml
>= "4.08"
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building bls12-381-legacy with each compiler on check.ci.ocaml.org, run of against opam-repository 78c202b. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.4.4 (this version) | good | good | n/a | n/a | n/a |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure