

[ANN] ocaml-wayland (pure OCaml wayland protocol library)
source link: https://discuss.ocaml.org/t/ann-ocaml-wayland-pure-ocaml-wayland-protocol-library/7616
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

I’ve just released ocaml-wayland 33, a pure OCaml Wayland implementation. You can get it with:
opam install wayland
Wayland is a communications system intended for use between processes on a single computer. It is mainly used by graphical applications (clients) to talk to display servers, but nothing about it is specific to graphics and it could be used for other things.
A Wayland protocol is defined by writing a schema file. Typed bindings can then be created automatically from that for various languages. Wayland’s main interesting feature is that you can pass file descriptors as message arguments. For example, to send a frame of video you can get a file descriptor to some shared memory, draw the image to it, and then pass the FD to the server for rendering, with no need to copy the data.
The ocaml-wayland library can be used to write applications, display servers, or proxies. The example 16 in the repository opens a window showing some scrolling squares. Clicking reverses the direction and pressing keys changes the colours.
I used the library to write wayland-virtwl-proxy 7, which allows applications running in VMs to open windows directly on the host desktop, as described in my recent blog post “Qubes-lite with KVM and Wayland 20”.
Note that, unlike the older X11 protocol, Wayland doesn’t provide any graphics primitives (such as drawing rectangles or text). Instead, applications render the window contents however they please and then simply share the buffer with the compositor. So if you want to write a normal application using it, you’ll need to find or write a separate GUI toolkit too.
Recommend
-
120
[ANN] Apache Tomcat 8.5.24 available-Apache Mail Archives Powered by Apache Pony Mail (Foal v/1.0.1 ~952d7f7). For data privacy requests, please contact: [email protected]....
-
24
[ANN] EmacsConf 2019 videos now out! emacsconf-discuss
-
50
最近研究ANN 检索召回的内容,于是把对于 ANN 的内容整理总结下。由于现在深度学习和神经网络的火爆,大家一听到ANN,首先想到的是Artificial Neural Network人工神经网络,不过这里的ANN并不是Artificial Neural Network,而是Approximat...
-
17
A step by step tutorial on how to build a neural network using TensorFlow
-
1
Basic Principles The Wayland protocol is an asynchronous object oriented protocol. All requests are method invocations on some object. The requests include an object ID that unique...
-
10
Latest updates of coq-of-ocaml for the Tezos protocol February 17, 2020 We recently made a lot of progress on the formalization in Coq of the
-
17
ANN : Macromedia MX Developer Resource Kit Sunday, September 8, 2002 On Friday, we announced a new product line, the
-
9
Love Rust? Then OCaml's New Eio Library is for Youby Isabella Leandersson on Dec 27th, 2022
-
4
wayland: Add support for the fractional scale protocol April fools! No, really. The fractional scale protocol is just a way to track the surface scale, but n...
-
9
Differential D186199 Bug 1767142 - [wayland]...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK