Skip to content

Commit

Permalink
Update to Eio 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
talex5 committed Aug 30, 2023
1 parent d496d32 commit f35ec71
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion mirage-crypto-rng-eio.opam
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build: [ ["dune" "subst"] {dev}
depends: [
"ocaml" {>= "5.0.0"}
"dune" {>= "2.7"}
"eio" {>= "0.7"}
"eio" {>= "0.12"}
"cstruct" {>= "6.0.0"}
"logs"
"mirage-crypto-rng" {=version}
Expand Down
12 changes: 6 additions & 6 deletions rng/eio/mirage_crypto_rng_eio.ml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

open Mirage_crypto_rng

type env = <
clock: Eio.Time.clock;
mono_clock: Eio.Time.Mono.t;
secure_random: Eio.Flow.source;
>
type 'a env = <
clock: [> ] Eio.Time.clock;
mono_clock: [> ] Eio.Time.Mono.t;
secure_random: [> ] Eio.Flow.source;
..
> as 'a

let src = Logs.Src.create "mirage-crypto-rng-eio" ~doc:"Mirage crypto RNG Eio"
module Log = (val Logs.src_log src: Logs.LOG)
Expand Down
13 changes: 7 additions & 6 deletions rng/eio/mirage_crypto_rng_eio.mli
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
[Eio.Stdenv.secure_random] is used as the [getrandom()] implementation.
*)

type env = <
clock: Eio.Time.clock;
mono_clock: Eio.Time.Mono.t;
secure_random: Eio.Flow.source;
>
type 'a env = <
clock: [> ]Eio.Time.clock;
mono_clock: [> ]Eio.Time.Mono.t;
secure_random: [> ] Eio.Flow.source;
..
> as 'a

(** [run ~g ~sleep gen env fn] will bring the RNG into a working state. The argument
[sleep] is measured in ns (default 1s), and is used to sleep between collection
Expand Down Expand Up @@ -36,5 +37,5 @@ val run
: ?g:'a
-> ?sleep:int64
-> 'a Mirage_crypto_rng.generator
-> <env; ..>
-> _ env
-> (unit -> 'b) -> 'b

0 comments on commit f35ec71

Please sign in to comment.