Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Pure OCaml implementation of the "vchan" shared-memory communication protocol

Subscribe to updates I use ocaml-vchan

Statistics on ocaml-vchan

Number of watchers on Github 25
Number of open issues 9
Average time to close an issue 3 months
Main language OCaml
Average time to merge a PR 3 days
Open pull requests 7+
Closed pull requests 4+
Last commit almost 2 years ago
Repo Created over 6 years ago
Repo Last Updated about 2 years ago
Size 689 KB
Organization / Authormirage
Latest Release3.0.0
Page Updated
Do you use ocaml-vchan? Leave a review!
View open issues (9)
View ocaml-vchan activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating ocaml-vchan for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Build Status Coverage Status

This is an implementation of the Xen libvchan or vchan communication protocol in OCaml. It allows fast inter-domain communication using shared memory.

Linux configuration

Make sure your systems are properly configured. You may need to:

sudo modprobe xen-evtchn
sudo modprobe xen-gntdev
sudo modprobe xen-gntalloc
mount -t xenfs xenfs /proc/xen

To use in Linux

To connect as a server to a client with domid 'domid' and using the string 'port' to denote the connection:

open Vchan_lwt_unix

open_server ~domid ~port ()
>>= fun (ic, oc) ->
Lwt_io.write_line oc "hello"
>>= fun () ->
Lwt_io.flush oc
>>= fun () ->
Lwt_io.close ic
>>= fun () ->
Lwt_io.close oc

To connect as a client, replace open_server with open_client.

To use the command-line

On both of your VMs, find their domain ids:

xenstore-read domid

On the domain with domid <server domid>, listen for a single connection from <client domid> on <port>:

xencat -l <client domid> <port>

On the domain with domid <client domid>, connect to <server domid>:

xencat <server domid> <port>

So to transfer a file foo from domid 1 to domid 2:

On domain 2, listen for the connection and retrieve the file:

xencat -l 1 foo > copy-of-foo

On domain 1, transmit the file:

cat foo | xencat 2 foo
ocaml-vchan open issues Ask a question     (View All Issues)
  • about 3 years install seems to fail on fedora 24
  • over 4 years Make iocamljs tutorial notebook
  • almost 5 years Vchan communication a bit crashy
  • over 6 years make C stubs non allocating?
ocaml-vchan open pull requests (View All Pulls)
  • Remove ppx runtime linkage
  • brush up mirage example
  • Try again to activate docker via travis
  • Support non-exec /tmp in the configure script
  • Get rid of mli only module
  • String.create: get rid of deprecation warning
  • autogenerated .travis.yml from yomimono/autoci commit 493e1d
ocaml-vchan list of languages used
ocaml-vchan latest release notes

3.0.0 (2017-06-08)

  • Split into 3 opam packages:
    • vchan: the platform-independent protocol code
    • vchan-unix: the Unix user-space implementation
    • vchan-xen: the Xen kernel implementation
  • Switch to jbuilder and topkg
  • Depend on new xen-{gnt,evtchn}-unix
  • Modernize Dockerfile and travis configuration
  • add archlinux dependencies
  • build against mirageos version 3, and drop support for earlier versions
Other projects in OCaml