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

Upgrading Mirage Packages #646

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

patricoferris
Copy link

A few remarks about this PR:

  • A few functor applications are gone \o/ (thanks @hannesm et al. for their work on defunctorising parts of the Mirage stack in favour of dune virtual libraries).
  • The TCP stack is becoming more agnostic to IPV4 and IPV6, this PR needs a little work in terms of renaming modules and variables to reflect those changes.
  • These changes allow VPNkit to be built with OCaml 5+ compilers :) (the original motivation behind the PR).

This PR will depend on updating hvsock (mirage/ocaml-hvsock#69) and ocaml-9p (mirage/ocaml-9p#146).

I was also struggling to build on nixos, but I'll work on that.

This also allows VPNkit to be build with OCaml 5+

Signed-off-by: Patrick Ferris <[email protected]>
Icmpv4_wire.set_icmpv4_id raw id';
Icmpv4_wire.set_icmpv4_csum raw 0;
Icmpv4_wire.set_icmpv4_csum raw (Tcpip_checksum.ones_complement raw);
Cstruct.BE.set_uint16 raw 5 id'; (* TODO: Upstream *)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, please upstream the missing bindings (from when I removed ppx_cstruct)

@@ -2,5 +2,5 @@
(name main)
(libraries hostnet cmdliner alcotest logs.fmt protocol-9p mirage_dns
mirage-clock-unix charrua-client.mirage forwarder sha
mirage-random-stdlib arp.mirage)
mirage-random-stdlib arp.mirage tcpip.ipv6 mirage-crypto-rng.unix)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mirage-random-stdlib is to be avoided (deprecated) and shouldn't be needed. Just use Mirage_crypto_rng directly (and Mirage_crypto_rng_unix.use_default ()).

Comment on lines 63 to 65
"mirage-clock" {>= "4.0.0"}
"mirage-clock-unix" {>= "4.0.0"}
"mirage-random" {>= "3.0.0"}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"mirage-clock" {>= "4.0.0"}
"mirage-clock-unix" {>= "4.0.0"}
"mirage-random" {>= "3.0.0"}
"mirage-sleep" {>= "4.0.0"}
"mirage-mtime" {>= "5.0.0"}

@@ -52,9 +52,8 @@ depends: [
"mirage-net" {>= "4.0.0"}
"mirage-time" {>= "3.0.0"}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"mirage-time" {>= "3.0.0"}

@patricoferris patricoferris marked this pull request as draft February 28, 2025 16:32
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