/froto

Froto: F# Protocol Buffers

Primary LanguageF#MIT LicenseMIT

F# Protocol Buffers

What are Protocol Buffers

NuGet

  • Froto.Parser - Protobuf Parser
  • Froto.Core - Protobuf F# Serialization Framework and low-level WireFormat library.

Build Environment Setup for Visual Studio

Status

  • v0.2.1 (2016-03-01) Added F# serialization framework to Core, w/full wire format support.
  • v0.2.0 (2016-01-26) Complete rewrite of parser to support full proto2 and proto3 syntax
  • v0.1.0 (2014-02-28) v0.1.0 Dusted off project and moved to GitHub
  • v0.0.5 (2012-11-02) blog Parsing a Protocol Buffers .proto File in F#

Updating from Froto 0.1.0

Core

  • Froto.Core was reworked to provide serialization and deserialization of all supported wire types and to minimize buffer copying.

  • Code depending on Froto.Core.IO will need to be rewritten to use the following modules and types:

    • Froto.Core.WireFormat
    • Froto.Core.Encoding.RawField
    • Froto.Core.ZeroCopyBuffer and subclasses
  • Alternatively, the functions in the Froto.Core.Encoding.Serializer module can provide a slightly higher level of abstraction.

  • Or, see next.

  • Added a framework for easily constructing serializable class types.

  • See Froto.Core.Encoding.MessageBase for an abstract base class which provides the serialization framework, and see Froto.Core.Test/ExampleProtoClass.fs for example usage.

Parser

  • The parser now generates an AST based on Discriminated Unions, rather than objects. Froto.Parser.Ast (and the underlying parser) now support the full proto2 and proto3 languages.

  • The old primary class, Froto.Parser.ProtoAst.ProtoFile has been renamed to Froto.Parser.Model.ProtoFile and given static factory methods to simplify access from C#, VB.net, etc.

    Note that this model curently only supports a subset of the proto2 language. This will be expanded in later releases to fully support proto2 & proto3.

    • ProtoFile.ParseString(s:string)
    • ProtoFile.ParseStream(streamName:string, stream:System.IO.Stream)
    • ProtoFile.ParseFile(fileName:string)

Todo for parser feature-parity with Google protoc