Skip to content

Commit

Permalink
CP-47001: [xapi-fdcaps]: dune plumbing for new library
Browse files Browse the repository at this point in the history
This will be a new library that will provide a more type-safe interface to file descriptor operations.
Useful on its own, but also for testing stdext.

Minimal dependencies, only Unix (and Alcotest for testing).

Signed-off-by: Edwin Török <[email protected]>
  • Loading branch information
edwintorok committed Dec 14, 2023
1 parent da85d9b commit 6f655c1
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,13 @@
(odoc :with-doc)
)
)

(package
(name xapi-fdcaps)
(synopsis "Static capabilities for file descriptor operations")
(depends
(alcotest :with-test)
base-unix
fmt
)
)
7 changes: 7 additions & 0 deletions lib/xapi-fdcaps/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; Keep dependencies minimal here, ideally just OCaml stdlib
; This will be used to test other functions in stdext, so it should not itself rely on other stdext libs!
(library
(public_name xapi-fdcaps)
(name xapi_fdcaps)
(libraries unix)
)
4 changes: 4 additions & 0 deletions lib/xapi-fdcaps/test/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(test
(name test_xapi_fdcaps)
(libraries xapi_fdcaps alcotest)
)
Empty file.
30 changes: 30 additions & 0 deletions xapi-fdcaps.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "Static capabilities for file descriptor operations"
maintainer: ["Xapi project maintainers"]
authors: ["Jonathan Ludlam"]
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://github.com/xapi-project/stdext"
bug-reports: "https://github.com/xapi-project/stdext/issues"
depends: [
"dune" {>= "2.7"}
"alcotest" {with-test}
"base-unix"
"fmt"
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/xapi-project/stdext.git"

0 comments on commit 6f655c1

Please sign in to comment.