README 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. Avro C++ README.txt
  2. The C++ port is thus far incomplete. Currently, it contains:
  3. - Serializer/Parser- objects for writing/reading raw binary.
  4. - xxxSchema- objects for composing schemas.
  5. - ValidSchema- a schema object that has been converted to a parse tree
  6. (with some sanity checks).
  7. - ValidSchema.toJson() writes the schema as a json object.
  8. - ValidatingSerializer/ValidatingParser- check that reads/writes
  9. match the expected schema type (more expensive than the raw
  10. serializer/parser but they detect errors, and allow dynamic
  11. discovery of parsed data/attributes).
  12. - Compiler (compileJsonSchema())- converts a Json string schema to a
  13. ValidSchema.
  14. - Code Generation (experimental) - given a schema it generates C++
  15. objects of the same data types, and the code to serialize and parse
  16. it.
  17. What's missing: Rpc containers are not yet implemented. Documentation is sparse.
  18. INSTRUCTIONS
  19. Pre-requisites:
  20. To compile requires boost headers, and the boost regex library. Optionally, it requires Snappy compression library. If Snappy is available, it builds support for Snappy compression and skips it otherwise. (Please see your OS-specific instructions on how to install Boost and Snappy for your OS).
  21. To build one requires cmake 2.6 or later.
  22. To generate a Makefile under Unix, MacOS (using GNU) or Cygwin use:
  23. mkdir build
  24. cd build
  25. cmake -G "Unix Makefiles" ..
  26. If it doesn't work, either you are missing some packages (boost, flex or bison),
  27. or you need to help configure locate them.
  28. If the Makefile is configured correctly, then you can make and run tests:
  29. make
  30. ctest
  31. To install
  32. make package
  33. and then untar the generated .tar.gz file.
  34. To build and test on MacOS (using Xcode)
  35. mkdir build.mac
  36. cd build.mac
  37. cmake -G Xcode
  38. xcodebuild -configuration Release
  39. ctest -C Release
  40. If debug version is required, replace 'Release' above with 'Debug'.
  41. Note: The LICENSE and NOTICE files in the lang/c++ source directory are used to
  42. build the binary distribution. The LICENSE and NOTICE information for the Avro
  43. C++ source distribution is in the root directory.