-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add elixir bindings #535
base: main
Are you sure you want to change the base?
Add elixir bindings #535
Conversation
return make_error(env, ckzg_atoms.invalid_precompute_arg); | ||
|
||
unsigned int len; | ||
if (!enif_get_string_length(env, argv[0], &len, ERL_NIF_LATIN1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that enif_get_string_length
was only added since OTP 26.0 which was released in May 2023, not sure if we want to support older versions too?
Hey @BlazeWasHere, this is cool! I would be happy to include this when it's ready. Out of curiosity, what will use these bindings? And another TODO item would be to add CI tests, see: https://github.com/ethereum/c-kzg-4844/tree/main/.github/workflows |
@jtraglia no worries, one main user would be elixir_ethers via ExWeb3/elixir_ethers#178. also saw that lambdaclass used c-kzg-4844 in their elixir consensus client but used bindings from c -> rust -> elixir in |
Okay nice. So this does have real value. Feel free to ping me if you have any questions. |
Adds elixir bindings through an Erlang NIF
Was using the python bindings as a reference FFI implementation, not sure if i am missing some things
also not sure if this even cross compiles (i hope :cc_precompiler works)
Still a WIP:
compute_cells
function #534