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

simplify/optimize c interface #113

Open
craff opened this issue May 17, 2023 · 5 comments
Open

simplify/optimize c interface #113

craff opened this issue May 17, 2023 · 5 comments

Comments

@craff
Copy link
Contributor

craff commented May 17, 2023

  • a lot of functions that can not block should probably not release the runtime system (like embed_socket or get_file_descr)
  • a lot of functions could be tagged @@noalloc if raising the exception was done on OCaml side (like get_file_descr).

Do we want to provide the apriori fastest possible binding (as long as they remain safe and simple) ?

@craff craff mentioned this issue May 17, 2023
@anmonteiro
Copy link
Collaborator

Do we want to provide the apriori fastest possible binding (as long as they remain safe and simple) ?

I think you touch on very interesting points. IMO this should definitely be a goal of the project.

Some more thoughts:

I think it'd be a great idea to start some work on ocaml-ssl to:

  • unify the APIs into a set of safe, fast, consistent and correct bindings
  • expand the API surface area (expose some more useful openssl functions, e.g. the ones in libcrypto)

Your suggestions make sense. In order to facilitate review, I'd err on the side of minimal changes per PR, so that they're easier to review. Thanks for your interest.

@craff
Copy link
Contributor Author

craff commented May 17, 2023

How fine grain the PRs ?

  • one PR per function
  • one PR for @@noalloc, one for removing useless runtime_release, one for each group of related features added
  • another way for grouping

@anmonteiro
Copy link
Collaborator

I'd err on the side of 1 PR per "separate theme":

  • 1 PR for all the functions that don't block so we can stop releasing the runtime lock
  • 1 PR for the noalloc functionality so we can reason about that specific change only
  • What's grouping?

@craff
Copy link
Contributor Author

craff commented May 17, 2023

I meant that you might have another Idea for grouping changes together that the 2 I propose.

@craff
Copy link
Contributor Author

craff commented May 24, 2023

I am working on that with PR #117

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

No branches or pull requests

2 participants