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

Update to Eio 0.12 #182

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading