status-go/cmd/library
Andrea Maria Piana cbaf523b0e Address feedback 2020-06-03 11:07:04 +02:00
..
README.md Address feedback 2020-06-03 11:07:04 +02:00
const.go Address feedback 2020-06-03 11:07:04 +02:00
main.go Fix export & handle unsafe.pointer types 2020-06-03 11:07:04 +02:00

README.md

Library bindings

This unholy namespace generates C bindings for mobile/. It does so by parsing the go files, identify any public function in the namespace that is not a test file, and generate an equivalent function with the correct C signature, which will then just call the version in mobile/.

This method is ad-hoc and not bullet-proof, the main limitation is that only some types are supported for now, C.int, *C.char and unsafer.Pointer. Functions that do not use these types will be ignored.

The problem this sledgehammer solves is to have to keep in sync the two namespaces, which is fiddly and prone to error as they are modified by either teams.