|
|
@ -1,3 +1,68 @@ |
|
|
|
|
|
|
|
2015-02-22 version 3.0.0-alpha-2 (Ruby/JavaNano): |
|
|
|
|
|
|
|
General |
|
|
|
|
|
|
|
* Introduced two new language implementations (Ruby and JavaNano) to proto3. |
|
|
|
|
|
|
|
* Various bug fixes since 3.0.0-alpha-1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ruby: |
|
|
|
|
|
|
|
We have added proto3 support for Ruby via a native C extension. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The Ruby extension itself is included in the ruby/ directory, and details on |
|
|
|
|
|
|
|
building and installing the extension are in ruby/README.md. The extension |
|
|
|
|
|
|
|
will also be published as a Ruby gem. Code generator support is included as |
|
|
|
|
|
|
|
part of `protoc` with the `--ruby_out` flag. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The Ruby extension implements a user-friendly DSL to define message types |
|
|
|
|
|
|
|
(also generated by the code generator from `.proto` files). Once a message |
|
|
|
|
|
|
|
type is defined, the user may create instances of the message that behave in |
|
|
|
|
|
|
|
ways idiomatic to Ruby. For example: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Message fields are present as ordinary Ruby properties (getter method |
|
|
|
|
|
|
|
`foo` and setter method `foo=`). |
|
|
|
|
|
|
|
- Repeated field elements are stored in a container that acts like a native |
|
|
|
|
|
|
|
Ruby array, and map elements are stored in a container that acts like a |
|
|
|
|
|
|
|
native Ruby hashmap. |
|
|
|
|
|
|
|
- The usual well-known methods, such as `#to_s`, `#dup`, and the like, are |
|
|
|
|
|
|
|
present. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Unlike several existing third-party Ruby extensions for protobuf, this |
|
|
|
|
|
|
|
extension is built on a "strongly-typed" philosophy: message fields and |
|
|
|
|
|
|
|
array/map containers will throw exceptions eagerly when values of the |
|
|
|
|
|
|
|
incorrect type are inserted. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See ruby/README.md for details. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JavaNano: |
|
|
|
|
|
|
|
JavaNano is a special code generator and runtime library designed especially |
|
|
|
|
|
|
|
for resource-restricted systems, like Android. It is very resource-friendly |
|
|
|
|
|
|
|
in both the amount of code and the runtime overhead. Here is an an overview |
|
|
|
|
|
|
|
of JavaNano features compared with the official Java protobuf: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- No descriptors or message builders. |
|
|
|
|
|
|
|
- All messages are mutable; fields are public Java fields. |
|
|
|
|
|
|
|
- For optional fields only, encapsulation behind setter/getter/hazzer/ |
|
|
|
|
|
|
|
clearer functions is opt-in, which provide proper 'has' state support. |
|
|
|
|
|
|
|
- For proto2, if not opted in, has state (field presence) is not available. |
|
|
|
|
|
|
|
Serialization outputs all fields not equal to their defaults. |
|
|
|
|
|
|
|
The behavior is consistent with proto3 semantics. |
|
|
|
|
|
|
|
- Required fields (proto2 only) are always serialized. |
|
|
|
|
|
|
|
- Enum constants are integers; protection against invalid values only |
|
|
|
|
|
|
|
when parsing from the wire. |
|
|
|
|
|
|
|
- Enum constants can be generated into container interfaces bearing |
|
|
|
|
|
|
|
the enum's name (so the referencing code is in Java style). |
|
|
|
|
|
|
|
- CodedInputByteBufferNano can only take byte[] (not InputStream). |
|
|
|
|
|
|
|
- Similarly CodedOutputByteBufferNano can only write to byte[]. |
|
|
|
|
|
|
|
- Repeated fields are in arrays, not ArrayList or Vector. Null array |
|
|
|
|
|
|
|
elements are allowed and silently ignored. |
|
|
|
|
|
|
|
- Full support for serializing/deserializing repeated packed fields. |
|
|
|
|
|
|
|
- Support extensions (in proto2). |
|
|
|
|
|
|
|
- Unset messages/groups are null, not an immutable empty default |
|
|
|
|
|
|
|
instance. |
|
|
|
|
|
|
|
- toByteArray(...) and mergeFrom(...) are now static functions of |
|
|
|
|
|
|
|
MessageNano. |
|
|
|
|
|
|
|
- The 'bytes' type translates to the Java type byte[]. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See javanano/README.txt for details. |
|
|
|
|
|
|
|
|
|
|
|
2014-12-01 version 3.0.0-alpha-1 (C++/Java): |
|
|
|
2014-12-01 version 3.0.0-alpha-1 (C++/Java): |
|
|
|
|
|
|
|
|
|
|
|
General |
|
|
|
General |
|
|
|