2.1 Example directories
The examples are in‘/usr/share/swi-prolog/doc/packages/examples/protobufs`,
which is part of the swi-prolog-doc
package. Each directory
has a README
. To run these, you will need to copy them to a
writeable directory.
bootstrap
- This contains the filecommon.mk
file, which is used by thedemo
andinterop
Makefiles.- demo - the
test
goal runs some examples. - interop - used for testing interoperability with C++ and Python
Additional tests are in test
\
_protobufs.pl.See also Addressbook example (section 1.3.3).
The protobuf compiler (
protoc
) uses two protobuf formats to communicate with the plugin: - plugin.proto
- descriptor.proto The Prolog code that were generated from these, as part of the bootstrap process, are:
- plugin
\
_pb.pl - descriptor
\
_pb.pl