File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -23,20 +23,32 @@ There are 2 ways to obtain bindgen:
23
23
* [ build binary from sources] ( #building )
24
24
25
25
### Docker container
26
+
26
27
This option requires [ Docker] .
27
28
28
29
Download docker image with the binary:
29
- ``` bash
30
+
31
+ ``` sh
30
32
docker pull scalabindgen/scala-native-bindgen
31
33
```
32
34
33
- Mount directory with needed header file and run bindgen:
34
- ``` bash
35
- docker run --entrypoint=scala-native-bindgen -v /path/to/header:/src --rm scalabindgen/scala-native-bindgen /src/my_header.h --name my_header --
35
+ Mount directories with required header files and run bindgen:
36
+
37
+ ``` sh
38
+ docker run -v " $( pwd) " :/src -v /usr/include:/usr/include \
39
+ --rm scalabindgen/scala-native-bindgen \
40
+ relative/path/to/my_header.h --name my_header --
36
41
```
37
- The docker image does not contain standard headers. Add ` -v /usr/include:/usr/include ` option to use headers from ` /usr/include ` in a container.
42
+
43
+ The docker image does not contain standard headers so it is important to
44
+ mount all system include directories that are used by the header file
45
+ passed to ` scala-native-bindgen ` . See the [ docker-bindgen.sh] script for
46
+ how to wrap the dockerized program. The ` $CWD ` of the container is
47
+ ` /src ` which should be mounted from ` $(pwd) ` in case relative paths are
48
+ used.
38
49
39
50
[ Docker ] : https://www.docker.com/
51
+ [ docker-bindgen.sh ] : scripts/docker-bindgen.sh
40
52
41
53
### Building
42
54
You can’t perform that action at this time.
0 commit comments