package mirage-block-lwt

All checked builds pass
  1. Overview
  2. Docs
Block signatures and implementations for MirageOS using Lwt

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mirage-block-v1.2.0.tbz
sha256=3373c4305e77e499446860ba81e1ee3c2c47fa2e1645c2c900b54c859f7a2558
md5=429022b9e477e8cd99b5906f073c59f4

Description

This repo contains generic operations over Mirage BLOCK devices. This package is specialised to the Lwt concurrency library for IO.

Tags

org:mirage

Added to opam-repository:

README

Block implementations for mirage

This repo contains generic operations over Mirage BLOCK devices.

Please consult the API documentation.

Example usage

In a top-level like utop:

# #require "io-page.unix";;
# #require "mirage-block";;
# #require "mirage-block-ramdisk";;
# #require "lwt.syntax";;

# lwt t_or_error = Ramdisk.create ~name:"hello" ~size_sectors:1024L ~sector_size:512;;
val t_or_error : [ `Error of Ramdisk.error | `Ok of Ramdisk.t ] = `Ok <abstr>

# let t = Mirage_block.Error.ok_exn t_or_error;;
val t : Ramdisk.t = <abstr>

# let page = Io_page.(to_cstruct (get 1));;
val page : Ramdisk.page_aligned_buffer =
  {Cstruct.buffer = <abstr>; off = 0; len = 4096}

# lwt result_or_error = Ramdisk.read t 0L [ page ];;
val result_or_error : [ `Error of Ramdisk.error | `Ok of unit ] = `Ok ()

# lwt ok_or_error = Mirage_block.sparse_copy (module Ramdisk) t (module Ramdisk) t;;
val ok_or_error :
  [ `Error of [> `Different_sizes | `Is_read_only | `Msg of bytes ]
  | `Ok of unit ] = `Ok ()

Dependencies (7)

  1. mirage-block >= "1.0.0" & < "2.0.0"
  2. logs
  3. lwt >= "2.4.7"
  4. io-page
  5. cstruct >= "2.0.0" & < "6.0.1"
  6. dune >= "1.0"
  7. ocaml >= "4.04.2"

Dev Dependencies

None

Optional Dependencies

None

Used by (4)

  1. fat-filesystem < "0.14.0"
  2. mirage-block-unix < "2.12.1"
  3. mirage-types-lwt >= "3.6.0"
  4. nbd < "6.0.0"

Conflicts

None

Build status

Results of building mirage-block-lwt with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
1.2.0 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure