Skip to content
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

Optionally disable c bindings #278

Merged

Conversation

ArtiomTr
Copy link
Contributor

@ArtiomTr ArtiomTr commented Jan 4, 2025

In this PR:

  • Added "c_bindings" feature in backend crates, allowing to optionally disable C bindings
  • Added _raw functions, that accept raw bytes

Related: grandinetech/grandine#73

@sauliusgrigaitis
Copy link
Member

So the motivation to disable this by default is that potentially c-kzg-4844 users will try to use rust-kzg without removing c-kzg-4844 and enabled bindings will lead to a cryptic error message.

@ArtiomTr ArtiomTr force-pushed the Optionally-disable-c-bindings branch 3 times, most recently from 1d0a945 to 884f7e6 Compare January 8, 2025 20:43
@sauliusgrigaitis
Copy link
Member

Thanks, looks good! I suggest adding a note to the https://github.com/grandinetech/rust-kzg?tab=readme-ov-file#drop-in-replacement-for-c-kzg-4844 with information that it's disabled by default and needs to be enabled with a particular feature.

@ArtiomTr ArtiomTr force-pushed the Optionally-disable-c-bindings branch from 884f7e6 to 53de081 Compare January 10, 2025 10:01
@ArtiomTr ArtiomTr force-pushed the Optionally-disable-c-bindings branch from 4dff29d to 4cd7ac8 Compare January 10, 2025 10:45
@ArtiomTr ArtiomTr marked this pull request as ready for review January 10, 2025 10:45
@ArtiomTr
Copy link
Contributor Author

Done, added notice to readme that --feature c_bindings must be specified

@sauliusgrigaitis sauliusgrigaitis merged commit cb71d62 into grandinetech:main Jan 10, 2025
31 checks passed
@ArtiomTr ArtiomTr deleted the Optionally-disable-c-bindings branch January 10, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants