Commit Graph

11 Commits

Author SHA1 Message Date
Artur Yurii Korchynskyi f345b66f53
Fix NixOS vendoring issue (#409) 2024-03-15 16:49:33 -05:00
DaniPopes 551e2f90d8
Support Rust `no_std` environments (#347) 2023-09-05 17:06:03 -05:00
Pawan Dhananjay 5b55a54d5e
Change the rust interface to take references (#356) 2023-09-05 16:43:46 -05:00
Justin Traglia 3adec442de
Switch to big-endian (#305) 2023-05-24 08:44:05 -05:00
Justin Traglia 2913b5ab31
Fix rust benchmarks (#258)
* Fix rust benchmarks

* Use iter_batched_ref for true benchmarks

* Remove unused import

* Update BatchSize & add throughput measurements

* Remove "cargo clean" from CI checks

* Run release tests after minimal tests
2023-03-29 15:59:52 +09:00
George Kadianakis ef82131be6
Fix rust benches to work with the new compute API (#194) 2023-03-09 10:30:46 -06:00
Justin Traglia 3e5f562f05
Update rust bindings to support YAML ref tests (#164) 2023-03-03 16:01:56 -07:00
Justin Traglia 1d3558cec2
Update rust bindings (#143)
* Update rust bindings

* Remove old test vectors

* Add #[must_use] in C_KZG_RET to avoid future missing retval checks

* Replace expect with unwrap

* Fix generate_random_commitment()

* Turn some camels to snakes

* Capitalize some consts

* Improve a bench loop

* Kill a useless extern

---------

Co-authored-by: George Kadianakis <desnacked@riseup.net>
2023-02-22 18:33:15 +02:00
Justin Traglia 1493f2bf2f
Fix rust bindings benchmarks (#132) 2023-02-13 07:14:09 +00:00
Justin Traglia 69f6155d75
Bytes-only interface (#62)
* Convert argument types to bytes

* Update java bindings

* Update python bindings

* Update node.js bindings

* Update c# bindings

* Fix java binding compile issues

* Fix incorrect memcpy in nodejs bindings

* Fix bug (called the wrong func)

* Fix issues with java bindings

* Fix issues with node.js bindings

* Remove unnecessary wrapped funcs for c#

* Rename struct member to bytes

* Use goto out for callocs

* Fix nit

* Make un-exported funcs static

* Fix python bindings

* Check commitment length in python bindings

* Update python error message

* Steal good ideas from #37

* Fix tests.py which didn't get copied over

* Convert remaining a[] to *a

* Add missing Py_DECREF

* Bytes only rust (#1)

* Make interface bytes only
* Fix benches
* Avoid newtypes for kzg types
* Fix benches again
* Make fields private
* tidy
* Address review comments

* Fix one small thing in rust bindings

* Use ckzg types where possible

* Remove null terminator from domain bytes in rust

* Update rust binding docs

* Use BYTES_PER_* where applicable

* Add extra check for calloc

Co-authored-by: Pawan Dhananjay <pawandhananjay@gmail.com>
2023-01-16 20:05:23 +00:00
Pawan Dhananjay 2c151d7f7e
Rust bindings (#4)
* working build

* Move bindings.rs to root directory

* tidy build script

* Add initial rust safe bindings

* import fewer c stuff in bindings

* remove unnecessary blst definitions in bindings

* remove bindgen build dependency

* improve interface

* Remove more stuff from bindings

* Add a simple test

* Update error type

* Update verify_kzg_proof interface

* Return array instead of vec

* link with no-pie

* impl Send and Sync for KzgSettings; change mut pointers to const

* Remove no-pie linking

* Make FIELD_ELEMENTS_PER_BLOB a compile time variable

* Add load_trusted_setup method

* Cleanup

* Add failure case to bytes_to_bls_field

* Fix conditional compilation and ensure canonical blobs in test

* Add test vectors

* Remove blobk_commitment test case

* Change function signature

* Copy and delete instead of rename in build script

* Make consts public

* Add error conditions for invalid trusted setup

* Lowercase renamings

* Make blob public

* Add benchmarks

* Run test vectors only for mainnet spec

* Add README

* clippy

* Add rust CI checks

* actually add CI checks

* Fix CI

* Fix workflow again
2023-01-12 17:50:12 +00:00