File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Running the previous command wild also yield warnings along with the translation
1414
1515` ./scala-native-bindgen /usr/include/uv.h -name uv -- > uv.scala `
1616
17+ Run ` ./scala-native-bindgen -help ` to see all available options.
18+
1719## Building
1820
1921Building this tool requires [ CMake] , [ LLVM] and [ Clang] . See the [ Scala
@@ -54,6 +56,25 @@ cd tests
5456sbt test
5557```
5658
59+ ## Current limitations
60+ There are multiple unsupported cases that should be considered when generating bindings:
61+ 1 . Currently bindgen does not support passing structs by value.
62+ For example, it will not be possible to call these two functions from Scala Native code:
63+ ``` c
64+ struct MyStruct {
65+ int a;
66+ };
67+
68+ struct MyStruct returnStruct();
69+
70+ void handleStruct(struct MyStruct mystr);
71+ ```
72+ To support such cases one should generate bindings for C wrapper functions that use pointers to structs instead of actual structs.
73+ 2 . Bindgen does not generate bindings for defines.
74+ In order to use defines one should write wrapper functions that return defined values.
75+ 3 . There is no way to reuse already generated bindings.
76+ Bindgen outputs bindings also for headers that were included in a given header.
77+
5778## License
5879
5980This project is distributed under the Scala license.
You can’t perform that action at this time.
0 commit comments