v0.0.14
Very excited about this release.
Detection of system header paths was moved entirely into the bindgen binary
This means that for the most part all you need to do is run bindgen --header <header-file> --package <packagename>,
and bindgen will interrogate your global clang and ask it for system headers.
You can control the path to clang using the --no-clang-path flag, or you can pass a LLVM's bin directory using --llvm-bin, or you
can just say --no-system and no headers will be added from clang.
More types from Scala Native's posixlib are used
Instead of generating things like ptrdiff_t and ssize_t from scratch in each binding, we attempt to match them to the known posixlib type.
This should help dramatically with portability of generated bindings, but there are still caveats:
- Not all types from posixlib are currently mapped
- MacOS does weird things, reporting
size_tas a type not coming from system headers and as such the bindgen doesn't attempt to fill it with posixlib version - nothing stops you from defining your own types with same name and different meaning, so we err on the side of caution
Generate .value and .apply extension methods even for non-opaque type aliases
This should help keeping the code uniform if the library in question uses a lot of aliases.
(SBT plugin) allow generating bindings in a custom folder
This closely mirrors similar facility from ScalablyTyped: https://scalablytyped.org/docs/library-developer#two-different-modes-stsourcegenmode
Snapshot version of this release was tested in the following projects:
- https://github.com/indoorvivants/sn-bindgen-examples
- https://github.com/keynmol/twotm8
- https://github.com/indoorvivants/sn-roguelike
- https://github.com/indoorvivants/sbt-vcpkg/tree/main/example (example used on sbt-vcpkg's CI)
PRs
- Update bindgen-sbt-plugin to 0.0.13 by @indoorvivants-steward in #98
- Fix SBT command in Examples workflow by @keynmol in #99
- Update junit-plugin, junit-runtime, ... to 0.4.7 by @indoorvivants-steward in #102
- Generate posixlib aliases from Scala Native sources by @keynmol in #105
- Add binding mode by @keynmol in #107
- Posixlib fixes by @keynmol in #108
- Move Clang paths detection into the binary by @keynmol in #110
- Clang detection bootstrap by @keynmol in #111
- Fixes from examples by @keynmol in #112
- Update bindgen-sbt-plugin to 0.0.13+20-4fe7511c-SNAPSHOT by @indoorvivants-steward in #113
Full Changelog: v0.0.13...v0.0.14