Piqi 0.5.2 release and Erlang support

This release introduces Erlang support. I had been planning on implementing it for more than a year, and it finally happened!

Here are some Erlang support highlights.

  • Generated Erlang type and record definitions as well as
    serialization/deserialization code are EEP8-compliant and provide all necessary
    type information for Dialyzer.
  • Support for recursive record types.
  • Support for Unicode strings which can be passed as string() (i.e. list of
    Unicode codepoints) or utf-8 binary().
  • Support for custom Erlang identifiers. For example, if some identifier from
    existing Proto or Piqi specification conflicts with an Erlang keyword, it is
    possible to define a custom Erlang-specific identifier without changing the
    original one and breaking backward compatibility.
  • Capitalized and “CamelCase” Piqi identifiers are automatically converted to
    uncapitalized and “camel_case” Erlang ids.
  • Configurable prefixes for type and record identifiers (since Erlang doesn’t
    have any kind of namespace support for types and records, we need to prefix
    them to avoid conflicts with names defined in other modules).
  • Tested with Erlang/OTP R13B04 and R14A.

Release notes:

Added Erlang support:

  - "piqic erlang" -- a new piqic backend for for generating Erlang type
    specifications and encoding/decoding functions.
  - "piqirun-erlang" -- runtime support library.

piqic:

  - (ocaml, erlang) Normalize Piqi identifiers by default, i.e. convert
    "CamlCase" identifiers to "caml-case".
  - (ocaml, erlang) Don't generate codecs and types for unused defintions from
    the boot module.

piqirun-ocaml:

  Backward incompatible changes:

  - Combined piqirun-ocaml library into one "piqirun" OCaml module (previously
    there were two: "piqirun_gen" and "piqirun_parse").
  - Improved piqirun-ocaml buffer initialization interface (unified it with
    piqirun-erlang).

  Other changes:

  - Ignore duplicate fields instead of producing an error.

Piqi tools:

  - Generate warnings instead of errors on duplicate fields when reading from
    Piq format.
  - Ignore duplicate fields when reading from wire format.

Platform support:

  - Now builds and runs on Mac OS X (fixed some build portability problems).

Comments are closed.