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

Vendor ocamlnet #21

Merged
merged 9 commits into from
Dec 15, 2023
Merged

Vendor ocamlnet #21

merged 9 commits into from
Dec 15, 2023

Conversation

jchavarri
Copy link
Member

@jchavarri jchavarri commented Dec 12, 2023

Devkit only uses a small % of ocamlnet and having to maintain this package with recent versions of OCaml is adding some maintenance burden.

This PR vendors just the necessary parts of ocamlnet to keep devkit interface the same. The subset of ocamlnet is placed into an ocamlnet_lite library.

The largest parts of the vendored lib are Netconversion (by far) and Netencoding. I think there are ways to simplify more, but I took an attempt at it and I ran into some issues due to the way Enc_subset is used in encode_poly Edit: this has been simplified in 17e7d39 and e223ac1.

Another potential cleanup is to remove tstring_kind, as only String_kind is used. I already removed the memory branch, as it allowed to not bring in more modules, but left both string and bytes kinds:

type _ tstring_kind =
| String_kind : string tstring_kind
| Bytes_kind : Bytes.t tstring_kind

TODO

  • Figure out how to runt tests (libevents is missing?)
  • Add some encoding / decoding examples to test suite

@jchavarri jchavarri marked this pull request as ready for review December 12, 2023 13:53
@jchavarri jchavarri merged commit 95d9ed1 into master Dec 15, 2023
1 check passed
@jchavarri jchavarri deleted the remove-ocamlnet branch December 15, 2023 09:04
@rr0gi
Copy link
Contributor

rr0gi commented Dec 18, 2023

please add readme in ocamlnet_lite directory stating where the code comes from (url with commit hash ideal)

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