Skip to content

Commit 5f49e38

Browse files
committed
Revamp README.md
1 parent 9642b0f commit 5f49e38

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

README.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
1-
# wlroots-ocaml
1+
# wlroots-ocaml - OCaml bindings to [wlroots](https://github.com/swaywm/wlroots)
22

3-
Work in progress OCaml bindings to [wlroots](https://github.com/swaywm/wlroots).
3+
**NOTE**: This is an early, very work in progress set of bindings. There are
4+
guaranteed to be bugs and rough edges along with lots of missing documentation.
5+
These bindings are an occasional nights and weekends project done for fun.
46

5-
## Plans
7+
The goal of the library is to provide "thin bindings" that follow the C API as
8+
closely as possible (while being type-safe). Only a fraction of the C API is
9+
currently covered, but adding new functions and structures to the bindings
10+
should be mostly a mechanical process.
611

7-
- Extend the bindings coverage, following
8-
[SirCmpwn's series of blog-posts](https://drewdevault.com/2018/02/17/Writing-a-Wayland-compositor-1.html)
9-
and adding what is needed for implementing them in OCaml
10-
(see [ocaml-mcwayface](https://github.com/Armael/ocaml-mcwayface))
11-
- Be able to implement a clone
12-
of [rootston](https://github.com/swaywm/wlroots/tree/master/rootston) in
13-
OCaml, as well as the other [wlroots examples](https://github.com/swaywm/wlroots/tree/master/examples)
12+
## Building
13+
14+
To compile wlroots-ocaml, you need the following (assuming you have
15+
[opam](https://opam.ocaml.org)):
16+
17+
- wlroots (the C library), from the git master branch. wlroots-ocaml uses
18+
pkg-config to know where the library and headers are.
19+
- OCaml bindings to xkbcommon: `opam pin add xkbcommon https://github.com/Armael/ocaml-xkbcommon.git`
20+
21+
Then, to directly install wlroots-ocaml with opam, use:
22+
23+
```
24+
opam pin add wlroots https://github.com/swaywm/wlroots-ocaml.git
25+
```
26+
27+
If you want to hack on the library instead, clone the repository, and install
28+
its dependencies with `opam install -t --deps-only .`.
29+
Then, you can use `make` to build the library, and `make examples` to build the
30+
example programs.

0 commit comments

Comments
 (0)