1
- ExtUnix OCaml library
2
- =====================
1
+ # ExtUnix OCaml library
3
2
4
- [ ![ Build status ] ( https://github.com/ygrek/extunix/actions/workflows/main.yml/badge.svg )] ( https://github.com/ygrek/extunix/actions )
5
- [ ![ OCaml-CI Build Status] ( https://img.shields.io/endpoint?url=https://ocaml .ci.dev/badge/ygrek/extunix/master &logo=ocaml )] ( https://ocaml.ci.dev/github/ygrek/extunix )
3
+ [ ![ Build Status ] ( https://github.com/ygrek/extunix/actions/workflows/main.yml/badge.svg?branch=master )] ( https://github.com/ygrek/extunix/actions/workflows/main.yml?branch=master )
4
+ [ ![ OCaml-CI Build Status] ( https://img.shields.io/endpoint?url=https%3A%2F%2Focaml .ci.dev%2Fbadge%2Fygrek%2Fextunix%2Fmaster &logo=ocaml )] ( https://ocaml.ci.dev/github/ygrek/extunix )
6
5
7
6
A collection of thin bindings to various low-level system API.
8
7
@@ -14,17 +13,15 @@ Our motto: "Be to Unix, what extlib is to stdlib"
14
13
15
14
Homepage: < https://ygrek.org/p/ocaml-extunix/ >
16
15
17
- Why?
18
- ----
16
+ ## Why?
19
17
20
18
Most of the system API don't deserve fully fledged library.
21
19
22
20
The ExtUnix project aims to collect these in one place. Read the
23
21
"[ ExtUnix integration requirements] ( #extunix-integration-requirements ) "
24
22
to know what kind of system API we can integrate.
25
23
26
- Installation
27
- ------------
24
+ ## Installation
28
25
29
26
Dependencies :
30
27
@@ -33,29 +30,35 @@ Dependencies :
33
30
34
31
Build and install:
35
32
36
- make
37
- make install
33
+ ``` shell
34
+ make
35
+ make install
36
+ ```
38
37
39
38
Alternatively use the underlying Dune build system directly (plain ocaml,
40
39
no sh and make needed):
41
40
42
- dune build @install
43
-
41
+ ``` shell
42
+ dune build @install
43
+ ```
44
44
Usage example:
45
45
46
- $ ocaml
47
- # #use "topfind";;
48
- # #require "extunix";;
49
- # module U = ExtUnix.Specific;;
50
- # U.ttyname Unix.stdout;;
51
- - : string = "/dev/pts/8"
46
+ ``` console
47
+ $ ocaml
48
+ # # use "topfind";;
49
+ # # require "extunix";;
50
+ # module U = ExtUnix.Specific;;
51
+ # U.ttyname Unix.stdout;;
52
+ - : string = "/dev/pts/8"
53
+ ```
52
54
53
55
Run unit tests:
54
56
55
- make test
57
+ ``` sh
58
+ make test
59
+ ```
56
60
57
- Guidelines
58
- ----------
61
+ ## Guidelines
59
62
60
63
For OCaml programming style, we follow Unix module:
61
64
@@ -94,8 +97,7 @@ Build infrastructure:
94
97
[ `ppx_have` ] : ppx_have/ppx_have.ml
95
98
[ `src/extUnix.pp.ml` ] : src/extUnix.pp.ml
96
99
97
- ExtUnix integration requirements
98
- --------------------------------
100
+ ## ExtUnix integration requirements
99
101
100
102
We can integrate into ExtUnix:
101
103
@@ -115,8 +117,7 @@ Regarding Win32 portability:
115
117
If there is a sane default to create a portable equivalent of the function on
116
118
Windows, we can consider it. And we will mark it as such in the documentation.
117
119
118
- Checklist for adding new bindings
119
- ---------------------------------
120
+ ## Checklist for adding new bindings
120
121
121
122
* Add the C code to [ ` src ` ] [ ] (follow the code style of existing bindings)
122
123
* Add the required checks to [ ` discover/discover.ml ` ] [ ]
@@ -132,18 +133,16 @@ Checklist for adding new bindings
132
133
[ `test/test.ml` ] : test/test.ml
133
134
[ `CHANGES.txt` ] : CHANGES.txt
134
135
135
- Checklist for release
136
- ---------------------
136
+ ## Checklist for release
137
137
138
138
* Review ` git log ` and update [ ` CHANGES.txt ` ] [ ]
139
139
* Increase VERSION in Makefile
140
140
* Commit
141
141
* ` make release `
142
142
143
- Development
144
- -----------
143
+ ## Development
145
144
146
- Many people contribute to extunix. Please submit your patches and/or feature requests
147
- to the project bugtracker at < https://github.com/ygrek/extunix/issues > .
145
+ Many people contribute to extunix. Please submit your patches and/or feature
146
+ requests to the project bugtracker at < https://github.com/ygrek/extunix/issues > .
148
147
149
148
The current maintainer is reachable at < mailto:ygrek@autistici.org > .
0 commit comments