Skip to content

Commit

Permalink
Merge pull request #246 from MisterDA/updates
Browse files Browse the repository at this point in the history
Switch from mirage-{stack,protocols} to tcpip
  • Loading branch information
talex5 authored Jan 6, 2022
2 parents ac230b9 + c51e13d commit 06413b4
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 12 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Main workflow

on:
pull_request:
push:
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- windows-latest
ocaml-compiler:
- 4.13.x

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- run: opam install . --deps-only --with-test

- run: opam exec -- dune build

- run: opam exec -- dune runtest
12 changes: 5 additions & 7 deletions capnp-rpc-mirage.opam
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,21 @@ depends: [
"ocaml" {>= "4.08.0"}
"capnp" {>= "3.1.0"}
"capnp-rpc-net" {= version}
"astring" {with-test}
"fmt" {>= "0.8.7"}
"logs"
"dns-client" {>= "6.0.0"}
"tls-mirage"
"mirage-stack" {>= "2.2.0"}
"mirage-protocols" {>= "6.0.0"}
"arp" {>= "2.3.0" & with-test}
"tcpip" {>= "7.0.0"}
"alcotest" {>= "1.0.1" & with-test}
"alcotest-lwt" {>= "1.0.1" & with-test}
"arp" {>= "3.0.0" & with-test}
"asetmap" {with-test}
"astring" {with-test}
"ethernet" {>= "3.0.0" & with-test}
"io-page-unix" {with-test}
"tcpip" {>= "6.1.0" & with-test}
"mirage-vnetif" {with-test}
"mirage-crypto-rng" {>= "0.7.0" & with-test}
"dune" {>= "2.0"}
"asetmap" {with-test}
"ethernet" {>= "2.2.0" & with-test}
]
build: [
["dune" "build" "-p" name "-j" jobs]
Expand Down
2 changes: 1 addition & 1 deletion mirage/capnp_rpc_mirage.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Log = Capnp_rpc.Debug.Log

module Location = Network.Location

module Make (R : Mirage_random.S) (T : Mirage_time.S) (M : Mirage_clock.MCLOCK) (P : Mirage_clock.PCLOCK) (Stack : Mirage_stack.V4V6) = struct
module Make (R : Mirage_random.S) (T : Mirage_time.S) (M : Mirage_clock.MCLOCK) (P : Mirage_clock.PCLOCK) (Stack : Tcpip.Stack.V4V6) = struct

module Dns = Dns_client_mirage.Make(R)(T)(M)(P)(Stack)
module Network = Network.Make(R)(T)(M)(P)(Stack)
Expand Down
2 changes: 1 addition & 1 deletion mirage/capnp_rpc_mirage.mli
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ open Capnp_rpc_net

module Location = Network.Location

module Make (R : Mirage_random.S) (T : Mirage_time.S) (M : Mirage_clock.MCLOCK) (P : Mirage_clock.PCLOCK) (Stack : Mirage_stack.V4V6) : sig
module Make (R : Mirage_random.S) (T : Mirage_time.S) (M : Mirage_clock.MCLOCK) (P : Mirage_clock.PCLOCK) (Stack : Tcpip.Stack.V4V6) : sig
include Capnp_rpc_net.VAT_NETWORK with
type flow = Stack.TCP.flow and
module Network = Network.Make(R)(T)(M)(P)(Stack)
Expand Down
2 changes: 1 addition & 1 deletion mirage/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(library
(name capnp_rpc_mirage)
(public_name capnp-rpc-mirage)
(libraries capnp-rpc-lwt capnp-rpc-net capnp-rpc fmt logs mirage-stack dns-client.mirage))
(libraries capnp-rpc-lwt capnp-rpc-net capnp-rpc fmt logs dns-client.mirage tcpip))
2 changes: 1 addition & 1 deletion mirage/network.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module Location = struct
let equal = ( = )
end

module Make (R : Mirage_random.S) (T : Mirage_time.S) (M : Mirage_clock.MCLOCK) (P : Mirage_clock.PCLOCK) (Stack : Mirage_stack.V4V6) = struct
module Make (R : Mirage_random.S) (T : Mirage_time.S) (M : Mirage_clock.MCLOCK) (P : Mirage_clock.PCLOCK) (Stack : Tcpip.Stack.V4V6) = struct

module Dns = Dns_client_mirage.Make(R)(T)(M)(P)(Stack)
module Tls_wrapper = Capnp_rpc_net.Tls_wrapper.Make(Stack.TCP)
Expand Down
2 changes: 1 addition & 1 deletion mirage/network.mli
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module Location : sig
(** [tcp ~host port] is [`TCP (host, port)]. *)
end

module Make (R : Mirage_random.S) (T : Mirage_time.S) (M : Mirage_clock.MCLOCK) (P : Mirage_clock.PCLOCK) (Stack : Mirage_stack.V4V6) : sig
module Make (R : Mirage_random.S) (T : Mirage_time.S) (M : Mirage_clock.MCLOCK) (P : Mirage_clock.PCLOCK) (Stack : Tcpip.Stack.V4V6) : sig

module Dns : module type of Dns_client_mirage.Make(R)(T)(M)(P)(Stack)

Expand Down

0 comments on commit 06413b4

Please sign in to comment.