Skip to content

Commit

Permalink
[new release] eio_windows, eio_posix, eio_main, eio_linux and eio (0.10)
Browse files Browse the repository at this point in the history
CHANGES:

New features:

- Add eio_posix backend (@talex5 @haesbaert ocaml-multicore/eio#448 ocaml-multicore/eio#477, reviewed by @avsm @patricoferris @polytypic).
  This replaces eio_luv on all platforms except Windows (which will later switch to its own backend). It is a lot faster, provides access to more modern features (such as `openat`), and can safely share OS resources between domains.

- Add subprocess support (@patricoferris @talex5 ocaml-multicore/eio#461 ocaml-multicore/eio#464 ocaml-multicore/eio#472, reviewed by @haesbaert @avsm).
  This is the low-level API support for eio_linux and eio_posix. A high-level cross-platform API will be added in the next release.

- Add `Fiber.fork_seq` (@talex5 ocaml-multicore/eio#460, reviewed by @avsm).
  This is a light-weight alternative to using a single-producer, single-consumer, 0-capacity stream, similar to a Python generator function.

Bug fixes:

- eio_linux: make it safe to share FDs across domains (@talex5 ocaml-multicore/eio#440, reviewed by @haesbaert).
  It was previously not safe to share file descriptors between domains because if one domain used an FD just as another was closing it, and the FD got reused, then the original operation could act on the wrong file.

- eio_linux: release uring if Linux is too old (@talex5 ocaml-multicore/eio#476).
  Avoids a small resource leak.

- eio_linux: improve error handling creating pipes and sockets (@talex5 ocaml-multicore/eio#474, spotted by @avsm).
  If we get an error (e.g. too many FDs) then report it to the calling fiber, instead of exiting the event loop.

- eio_linux: wait for uring to finish before exiting (@talex5 ocaml-multicore/eio#470, reviewed by @avsm).
  If the main fiber raised an exception then it was possible to exit while a cancellation operation was still in progress.

- eio_main: make `EIO_BACKEND` handling more uniform (@talex5 ocaml-multicore/eio#447).
  Previously this environment variable was only used on Linux. Now all platforms check it.

- Tell dune about `EIO_BACKEND` (@talex5 ocaml-multicore/eio#442).
  If this changes, dune needs to re-run the tests.

- eio_linux: add some missing close-on-execs (@talex5 ocaml-multicore/eio#441).

- eio_linux: `read_exactly` fails to update file offset (@talex5 ocaml-multicore/eio#438).

- Work around dune `enabled_if` bug on non-Linux systems (@polytypic ocaml-multicore/eio#475, reviewed by @talex5).

- Use raw system call of `getrandom` for glibc versions before 2.25 (@zenfey ocaml-multicore/eio#482).

Documentation:

- Add `HACKING.md` with hints for working on Eio (@talex5 ocaml-multicore/eio#443, reviewed by @avsm @polytypic).

- Improve worker pool example (@talex5 ocaml-multicore/eio#454).

- Add more Conditions documentation (@talex5 ocaml-multicore/eio#436, reviewed by @haesbaert).
  This adds a discussion of conditions to the README and provides examples using them to handle signals.

- Condition: fix the example in the docstring (@avsm ocaml-multicore/eio#468).

Performance:

- Add a network benchmark using an HTTP-like protocol (@talex5 ocaml-multicore/eio#478, reviewed by @avsm @patricoferris).

- Add a benchmark for reading from `/dev/zero` (@talex5 ocaml-multicore/eio#439).

Other changes:

- Add CI for macOS (@talex5 ocaml-multicore/eio#452).

- Add tests for `pread`, `pwrite` and `readdir` (@talex5 ocaml-multicore/eio#451).

- eio_linux: split into multiple files (@talex5 ocaml-multicore/eio#465 ocaml-multicore/eio#466, reviewed by @avsm).

- Update Dockerfile (@talex5 ocaml-multicore/eio#471).

- Use dune.3.7.0 (@patricoferris ocaml-multicore/eio#457).

- Mint exclusive IDs across domains (@TheLortex ocaml-multicore/eio#480, reported by @haesbaert, reviewed by @talex5).
  The tracing currently only works with a single domain anyway, but this will change when OCaml 5.1 is released.
  • Loading branch information
talex5 committed Jun 2, 2023
1 parent a05716d commit fb77777
Show file tree
Hide file tree
Showing 5 changed files with 225 additions and 0 deletions.
57 changes: 57 additions & 0 deletions packages/eio/eio.0.10/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
opam-version: "2.0"
synopsis: "Effect-based direct-style IO API for OCaml"
description: "An effect-based IO API for multicore OCaml with fibers."
maintainer: ["[email protected]"]
authors: ["Anil Madhavapeddy" "Thomas Leonard"]
license: "ISC"
homepage: "https://github.com/ocaml-multicore/eio"
doc: "https://ocaml-multicore.github.io/eio/"
bug-reports: "https://github.com/ocaml-multicore/eio/issues"
depends: [
"dune" {>= "3.7"}
"ocaml" {>= "5.0.0"}
"bigstringaf" {>= "0.9.0"}
"cstruct" {>= "6.0.1"}
"lwt-dllist"
"optint" {>= "0.1.0"}
"psq" {>= "0.2.0"}
"fmt" {>= "0.8.9"}
"hmap" {>= "0.8.1"}
"domain-local-await" {>= "0.1.0"}
"crowbar" {>= "0.2" & with-test}
"mtime" {>= "2.0.0"}
"mdx" {>= "2.2.0" & with-test}
"alcotest" {>= "1.4.0" & with-test}
"dscheck" {>= "0.1.0" & with-test}
"odoc" {with-doc}
]
conflicts: [
"ocaml-base-compiler" {< "5.0.0~beta1"}
"ocaml-variants" {< "5.0.0~beta1"}
"ocaml-system" {< "5.0.0~beta1"}
"seq" {< "0.3"}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocaml-multicore/eio.git"
url {
src:
"https://github.com/ocaml-multicore/eio/releases/download/v0.10/eio-0.10.tbz"
checksum: [
"sha256=390f7814507b8133d6c25e3a67a742d731c7ca66252b287b1fb0e3ad4d10eecc"
"sha512=9c0c9088b178df9799aaae9deb803a802228f1329cbe452479c90e80a13985d9c364ea86ee14e4e759133940f9f6065c7e8ece509d176fb1e347c5320f00a494"
]
}
x-commit-hash: "687ebf99a6ab10ce5d85f4a3335d8e2e94c2b875"
44 changes: 44 additions & 0 deletions packages/eio_linux/eio_linux.0.10/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
opam-version: "2.0"
synopsis: "Eio implementation for Linux using io-uring"
description: "An Eio implementation for Linux using io-uring."
maintainer: ["[email protected]"]
authors: ["Anil Madhavapeddy" "Thomas Leonard"]
license: "ISC"
homepage: "https://github.com/ocaml-multicore/eio"
doc: "https://ocaml-multicore.github.io/eio/"
bug-reports: "https://github.com/ocaml-multicore/eio/issues"
depends: [
"dune" {>= "3.7"}
"alcotest" {>= "1.4.0" & with-test}
"eio" {= version}
"mdx" {>= "2.2.0" & with-test}
"logs" {>= "0.7.0"}
"fmt" {>= "0.8.9"}
"cmdliner" {>= "1.1.0" & with-test}
"uring" {>= "0.5"}
"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/ocaml-multicore/eio.git"
url {
src:
"https://github.com/ocaml-multicore/eio/releases/download/v0.10/eio-0.10.tbz"
checksum: [
"sha256=390f7814507b8133d6c25e3a67a742d731c7ca66252b287b1fb0e3ad4d10eecc"
"sha512=9c0c9088b178df9799aaae9deb803a802228f1329cbe452479c90e80a13985d9c364ea86ee14e4e759133940f9f6065c7e8ece509d176fb1e347c5320f00a494"
]
}
x-commit-hash: "687ebf99a6ab10ce5d85f4a3335d8e2e94c2b875"
43 changes: 43 additions & 0 deletions packages/eio_main/eio_main.0.10/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
opam-version: "2.0"
synopsis: "Effect-based direct-style IO mainloop for OCaml"
description: "Selects an appropriate Eio backend for the current platform."
maintainer: ["[email protected]"]
authors: ["Anil Madhavapeddy" "Thomas Leonard"]
license: "ISC"
homepage: "https://github.com/ocaml-multicore/eio"
doc: "https://ocaml-multicore.github.io/eio/"
bug-reports: "https://github.com/ocaml-multicore/eio/issues"
depends: [
"dune" {>= "3.7"}
"mdx" {>= "2.2.0" & with-test}
"kcas" {>= "0.3.0" & with-test}
"yojson" {>= "2.0.2" & with-test}
"eio_linux" {= version & os = "linux"}
"eio_posix" {= version & os-family != "windows"}
"eio_windows" {= version & os-family = "windows"}
"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/ocaml-multicore/eio.git"
url {
src:
"https://github.com/ocaml-multicore/eio/releases/download/v0.10/eio-0.10.tbz"
checksum: [
"sha256=390f7814507b8133d6c25e3a67a742d731c7ca66252b287b1fb0e3ad4d10eecc"
"sha512=9c0c9088b178df9799aaae9deb803a802228f1329cbe452479c90e80a13985d9c364ea86ee14e4e759133940f9f6065c7e8ece509d176fb1e347c5320f00a494"
]
}
x-commit-hash: "687ebf99a6ab10ce5d85f4a3335d8e2e94c2b875"
41 changes: 41 additions & 0 deletions packages/eio_posix/eio_posix.0.10/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
opam-version: "2.0"
synopsis: "Eio implementation for POSIX systems"
description: "An Eio implementation for most Unix-like platforms"
maintainer: ["[email protected]"]
authors: ["Anil Madhavapeddy" "Thomas Leonard"]
license: "ISC"
homepage: "https://github.com/ocaml-multicore/eio"
doc: "https://ocaml-multicore.github.io/eio/"
bug-reports: "https://github.com/ocaml-multicore/eio/issues"
depends: [
"dune" {>= "3.7"}
"eio" {= version}
"iomux" {>= "0.2"}
"mdx" {>= "2.2.0" & with-test}
"fmt" {>= "0.8.9"}
"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/ocaml-multicore/eio.git"
url {
src:
"https://github.com/ocaml-multicore/eio/releases/download/v0.10/eio-0.10.tbz"
checksum: [
"sha256=390f7814507b8133d6c25e3a67a742d731c7ca66252b287b1fb0e3ad4d10eecc"
"sha512=9c0c9088b178df9799aaae9deb803a802228f1329cbe452479c90e80a13985d9c364ea86ee14e4e759133940f9f6065c7e8ece509d176fb1e347c5320f00a494"
]
}
x-commit-hash: "687ebf99a6ab10ce5d85f4a3335d8e2e94c2b875"
40 changes: 40 additions & 0 deletions packages/eio_windows/eio_windows.0.10/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
opam-version: "2.0"
synopsis: "Eio implementation for Windows"
description: "An Eio implementation using OCaml's Unix.select"
maintainer: ["[email protected]"]
authors: ["Anil Madhavapeddy" "Thomas Leonard"]
license: "ISC"
homepage: "https://github.com/ocaml-multicore/eio"
doc: "https://ocaml-multicore.github.io/eio/"
bug-reports: "https://github.com/ocaml-multicore/eio/issues"
depends: [
"dune" {>= "3.7"}
"eio" {= version}
"kcas" {>= "0.3.0" & with-test}
"alcotest" {>= "1.4.0" & with-test}
"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/ocaml-multicore/eio.git"
url {
src:
"https://github.com/ocaml-multicore/eio/releases/download/v0.10/eio-0.10.tbz"
checksum: [
"sha256=390f7814507b8133d6c25e3a67a742d731c7ca66252b287b1fb0e3ad4d10eecc"
"sha512=9c0c9088b178df9799aaae9deb803a802228f1329cbe452479c90e80a13985d9c364ea86ee14e4e759133940f9f6065c7e8ece509d176fb1e347c5320f00a494"
]
}
x-commit-hash: "687ebf99a6ab10ce5d85f4a3335d8e2e94c2b875"

0 comments on commit fb77777

Please sign in to comment.