Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.

Related tags

Serialization bond
Overview

The Bond logo: a stylized glue gun


Build Status Bond.CSharp NuGet package

Bond

Bond is an open-source, cross-platform framework for working with schematized data. It supports cross-language serialization/deserialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.

Bond is published on GitHub at https://github.com/microsoft/bond/.

For details, see the User's Manuals:

For a discussion about how Bond compares to similar frameworks see Why Bond.

Dependencies

Bond C++ library requires some C++11 features (currently limited to those supported by Visual C++ 2015); a C++11 compiler is required. Additionally, to build Bond you will need CMake (3.1+), Haskell Stack (1.5.1+) and Boost (1.61+).

Additionally, Bond requires RapidJSON and optionally requires gRPC. The Bond repository primarily uses Git submodules for these two dependencies. It should be cloned with the --recursive flag:

git clone --recursive https://github.com/microsoft/bond.git

If you already have RapidJSON and would like to build against it, add argument -DBOND_FIND_RAPIDJSON=TRUE to the CMake invocation. It will use find_package(RapidJSON). If you do not provide a RapidJSON library, Bond will also install RapidJSON.

If you do not wish to build the gRPC component, add argument -DBOND_ENABLE_GRPC=FALSE to the CMake invocation.

Following are specific instructions for building on various platforms.

Linux

Bond must be built with C++11 compiler. We test with Clang (3.8) and GNU C++ (5.4). We recommend Clang as it's faster with template-heavy code like Bond.

Run the following commands to install the minimal set of packages needed to build the core Bond library on Ubuntu 14.04:

sudo apt-get install \
    clang \
    cmake \
    zlib1g-dev \
    libboost-dev \
    libboost-thread-dev

Additionally, you need the Haskell Tool Stack. If your distro isn't shipping a new enough version of it, you may encounter some non-obvious build failures, so we recommend installing the latest Stack outside of package management:

curl -sSL https://get.haskellstack.org/ | sh

In the root bond directory run:

mkdir build
cd build
cmake -DBOND_ENABLE_GRPC=FALSE ..
make
sudo make install

The build directory is just an example. Any directory can be used as the build destination.

To build the Bond Python module, all the C++/Python tests and examples, and Bond-over-gRPC, a few more packages are needed.

sudo apt-get install \
    autoconf \
    build-essential \
    golang \
    libboost-date-time-dev \
    libboost-python-dev \
    libboost-test-dev \
    libtool \
    python2.7-dev

CMake needs to be re-run with different options. This can be done after building just the core libraries: the build tree will simply be updated with the new options.

cd build # or wherever you ran CMake before
cmake -DBOND_ENABLE_GRPC=TRUE -DgRPC_ZLIB_PROVIDER=package ..

Running the following command in the build directory will build and execute all the tests and examples:

make --jobs 8 check
sudo make install # To install the other libraries just built

(The unit tests are large so you may want to run 4-8 build jobs in parallel, assuming you have enough memory.)

macOS

Install Xcode and then run the following command to install the required packages using Homebrew (http://brew.sh/):

brew install \
    cmake \
    haskell-stack \
    boost \
    boost-python

(boost-python is optional and only needed for Python support.)

Bond can be built on macOS using either standard *nix makefiles or Xcode. In order to generate and build from makefiles, in the root bond directory run:

mkdir build
cd build
cmake -DBOND_ENABLE_GRPC=FALSE ..
make
sudo make install

Alternatively, you can generate Xcode projects by passing the -G Xcode option to cmake:

cmake -DBOND_ENABLE_GRPC=FALSE -G Xcode ..

You can build and run unit tests by building the check target in Xcode or by running make in the build directory:

make --jobs 8 check

Note that if you are using Homebrew's Python, you'll need to build boost-python from source:

brew install --build-from-source boost-python

and tell cmake the location of Homebrew's libpython by setting the PYTHON_LIBRARY variable, e.g.:

cmake .. \
    -DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib

Windows

Build Status

Install the following tools:

If you are building on a network behind a proxy, set the environment variable HTTP_PROXY, e.g.:

set HTTP_PROXY=http://your-proxy-name:80

Now you are ready to build the C# version of Bond. Open the solution file cs\cs.sln in Visual Studio and build as usual. The C# unit tests can also be run from within the solution.

To build using the .NET Core SDK:

dotnet restore cs\cs.sln
dotnet msbuild cs\cs.sln

The C++ and Python versions of Bond additionally require:

You may need to set the environment variables BOOST_ROOT and BOOST_LIBRARYDIR to specify where Boost and its pre-built libraries for your environment (MSVC 12 or MSVC 14) can be found, e.g.:

set BOOST_ROOT=D:\boost_1_61_0
set BOOST_LIBRARYDIR=D:\boost_1_61_0\lib64-msvc-14.0

The core Bond library and most examples only require Boost headers. The pre-built libraries are only needed for unit tests, Python, and gRPC support. If Boost or Python libraries are not found on the system, then some tests and examples will not be built.

To generate a solution to build the Bond Core C++ and Python with Visual Studio 2015 run the following commands from the root bond directory:

mkdir build
cd build
set PreferredToolArchitecture=x64
cmake -DBOND_ENABLE_GRPC=FALSE -G "Visual Studio 14 2015 Win64" ..

Setting PreferredToolArchitecture=x64 selects the 64-bit toolchain which dramatically improves build speed. (The Bond unit tests are too big to build with 32-bit tools.)

Instead of cmake you can also use cmake-gui and specify configuration settings in the UI. This configuration step has to be performed only once. From then on you can use the generated solution build\bond.sln from Visual Studio or build from the command line using cmake:

cmake --build . --target
cmake --build . --target INSTALL

To build and execute the unit tests and examples run:

cmake --build . --target check -- /maxcpucount:8

To build Bond's gRPC++ integration from source, some of gRPC's prerequisites are also needed:

choco install activeperl golang ninja yasm

You will also need to enable gRPC in the cmake configuration step by running the following in the build directory from above and then following the other cmake commands above:

cmake -DBOND_ENABLE_GRPC=TRUE -G "Visual Studio 14 2015 Win64" ..

Alternatively, you can build and install Bond using the vcpkg dependency manager:

git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg integrate install
./vcpkg install bond

The Bond port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request in the vcpkg repository.

Contributing

Interested in contributing to Bond? Take a look at our contribution guidelines to get started.

Comments
  • Can't compile the sources

    Can't compile the sources

    Linux platform:

    At first I tried to compile on Ubuntu 12.04, cmake 3.10 says -- Could NOT find Boost. I tried to install boost 1.46 and boost 1.48 from the ubuntu packages. Could you please add to the cmake output minimal required version of the Boost?

    Then I ordered 1GB RAM Ubuntu 14.04 VPS and tried to compile it again. cabal install update-install drops with out of memory exception. Please add minimum RAM requirements to the documentation.

    Also, what is a required mono version for building cs.sln? Will it be built with mono 3.10?

    Windows platform:

    I followed the steps in documentation (install cmake, haskell, update cabal, open cs.sln in Visual Studio 2013) and run the build. The build has failed on the step:

    Generating C:/Projects/bond/compiler/cabal.sandbox.config
    Could not find target path 
    

    The path C:\Projects\bond\compiler exists on the machine.

    bug 
    opened by xplicit 23
  • Bonded-nested Polymorphic types get lost during deserialization in C#

    Bonded-nested Polymorphic types get lost during deserialization in C#

    The primary problem this bug is trying to address is that the generic type parameter gets lost on a Clone action and so IBonded<T>.Deserialize() behaves differently depending on an object's level of nesting within the tree. For example, even though src.Shapes[0] = new Bonded<Circle>(circle), the following returns false (and ideally it would return true).

    // false; "typeof(ShapeProps) != typeof(CircleProps)"
    Debug.Assert(
        src.Shapes[0].Deserialize().Props.Deserialize().GetType() ==
        circle.Props.Deserialize().GetType());
    

    To illustrate this, I took the polymorphic_container.csproj sample and updated it to included polymorphic types nested within a bonded struct.

    Expected: Polymorphic Bonded types Deserialize as the derived type they were created with where possible

    Actual: Polymorphic Bonded types Deserialize only as the base type when nested inside another Bonded struct

    IDL:

    namespace Examples
    
    enum Type
    {
        Unknown,
        Circle,
        Rectange
    }
    
    struct ShapeProps
    {
    }
    
    struct Shape
    {
        0: Type Type = Unknown;
        1: bonded<ShapeProps> Props;
    }
    
    struct Circle : Shape
    {
        0: double Radius;
    }
    
    struct CircleProps : ShapeProps
    {
        0: string CircleString;
    }
    
    struct Rectangle : Shape
    {
        0: double Width;
        1: double Height;
    }
    
    struct RectangleProps : ShapeProps
    {
        0: string RectangleString;
    }
    

    Program.cs:

    static class Program
    {
        static void Main()
        {
            var circle = new Circle
            {
                Type = Type.Circle,
                Radius = 3.14,
                Props = new Bonded<CircleProps>(new CircleProps
                {
                    CircleString = "I'm a circle",
                }),
            };
    
            var rectangle = new Bonded<RectangleProps>(new Rectangle
            {
                Type = Type.Rectange,
                Width = 10,
                Height = 5.5,
                Props = new RectangleProps
                {
                    RectangleString = "I'm a rectangle",
                },
            });
    
            var src = new Polymorphic
            {
                Shapes = 
                {
                    new Bonded<Circle>(circle),
                    new Bonded<Rectangle>(rectangle)
                }
            };
    
            // ===
            // false; "typeof(ShapeProps) != typeof(CircleProps)"
            Debug.Assert(
                src.Shapes[0].Deserialize().Props.Deserialize().GetType() ==
                circle.Props.Deserialize().GetType());
            // ===
    
            // ... remainder omitted
        }
    }
    
    bug 
    opened by kylemc 19
  • [gbc] Upgrading to stack lts-14.4

    [gbc] Upgrading to stack lts-14.4

    stack lts-14.4 uses , among others, version 7 of megaparsec and version 0.8.7 of aeson-pretty.

    These versions of library have introduced some breaking changes in their respective API and this commit makes the corresponding changes in bond library.

    Also, stack lts-14.4 does not have derive package listed. The derive package was used in test cases for deriving instances of Arbitrary for Bond types. This commit replaces the package with quickcheck-arbitrary-template.

    references

    1. Megaparsec Changelog
    2. Megaparsec 7 changes
    3. quickcheck-arbitrary-template
    opened by kapilash 17
  • Support for unsafe pointer based InputBuffer and OutputBuffer

    Support for unsafe pointer based InputBuffer and OutputBuffer

    The InputPtrBuffer and OutputPtrBuffer will not have the ability to grow because they do not have ownership of the memory involved.

    Added an optimized memory copy implementation that it's even faster than BlockCopy, System.Buffer (.Net 4.6) and looping for small values. That’s 4,8 Gb/sec against 3,6 Gb/sec (fastest in System.Buffer) in Bulk Copy mode in the tested environment. https://gist.github.com/redknightlois/149fdd3479cbd074f115

    I haven't implemented an optimized ReadBytes(). That would require some internal changes that I don't think I can do on my own without further discussion.

    Fixes #92

    opened by redknightlois 16
  • Implement move assignment for the bond::blob type

    Implement move assignment for the bond::blob type

    Pull request for issue #934. The tests are probably overkill, I can remove them if you want. But they showed that blob& operator=(blob&& that) = default; would copy the internal buffer instead of moving it, so I chose the swap implementation.

    opened by volka 14
  • make with errors

    make with errors

    Hello,

    I tried to build bond locally by checking out the source from github. I experienced the following error after running command "make" in the build folder:

    openFile: does not exist (No such file or directory) CMake Error at cabal_build.cmake:33 (message): make[2]: *** [compiler/build/gbc/gbc] Error 1 make[1]: *** [compiler/CMakeFiles/gbc.dir/all] Error 2 make: *** [all] Error 2

    Build log is empty. There is a gbc compiler for Windows. How do i have it installed on Mac?

    Please advise. Thanks.

    question 
    opened by heleny 14
  • Add CI builds for C# solution

    Add CI builds for C# solution

    Allows to build the csharp solution in Travis CI. Tested only for linux platform, because Travis CI requires to do manual request to enable CI on multiple platforms. Also, beta-support of C# is enabled only for linux in Travis CI, so it may be need to do additional install of mono on os x platform in before_install step.

    opened by xplicit 13
  • [c++ protocol] Add Read/Write/Skip type_alias methods to protocols

    [c++ protocol] Add Read/Write/Skip type_alias methods to protocols

    Read/Write/Skip methods are present in JSON protocol, but are missed in all other protocols. I copy-pasted them to Compact Binary, Fast Binary, Simple Binary and Random.

    enhancement 
    opened by mirrada 12
  • Add netstandard support to NuGet packages

    Add netstandard support to NuGet packages

    I think this should resolve #171.

    Adding support for NETStandard requires upgrading Newtonsoft.Json from 9.0.1, since that is the lowest version of that library that supports NETStandard.

    Per https://docs.nuget.org/ndocs/schema/target-frameworks, the existing Profile78 is equivalent to netstandard1.0, so that is what I used.

    Per https://github.com/davidfowl/NetStandard/issues/5, the current way to support both PCL and NETStandard projects is to have a copy of the DLL in both lib folders in the NuGet package, so I added a netstandard1.0 lib folder to the nuspec files that already had a portable-net45+wp80+win8+wpa81+dnxcore50 lib folder.

    All unit tests in cs\cs.sln and cs\nuget\nuget.sln passed, but I had to add an assembly binding redirect for cs\nuget\nuget.sln because it references the currently-published 5.0.0 NuGet packages which still reference the 7.x version of Newtonsoft.Json.

    I also created another test solution on my workstation with both a PCL and NETStandard project. I was able to add the modified NuGet packages to both projects, and I was able to serialize and deserialize a simple struct in CompactBinary, SimpleBinary, and Json formats.

    opened by csdahlberg 12
  • added solution and projects for compilation with mono

    added solution and projects for compilation with mono

    cs.sln bond solution actively uses msbuild features which do not implemented in mono, so the original solution falis to build using mono. I added simply solution (without files generation steps) with two targets "Release and Debug", which can be compiled using xbuild or monodevelop. This solution makes only libraries, it does not allow to build tests or samples.

    Tested on Ubuntu linux 12.04 with monodevelop 5.5 and mono 3.10.0 (current stable versions from official Xamarin repository)

    opened by xplicit 12
  • Visual Studio removed newly added .bond files from BodeCodegen

    Visual Studio removed newly added .bond files from BodeCodegen

    In the new csproj, VS automatically adds to the csproj if you add a new file with the .bond extension. It is therefore not included in the Bond code generation target by default.

    I need to explicitly set the build action for the file to "Bond code generation" to resolve this and have it included as expected. Is there some msbuild magic that can be done to resolve this?

    question 
    opened by ghost 11
  • Bond generated headers don't work for clang in c++20

    Bond generated headers don't work for clang in c++20

    Bond generates code as follows: https://godbolt.org/z/a4qnbcjeh

    #include <vector>
    
    struct forward_decl;
    
    struct S{
        std::vector <forward_decl> m;
    
        S(){};
    };
    
    struct forward_decl{};
    

    But this does not work in C++20 (in clang) because the constructor will be instantiated with the forward declaration and compilation will fail.

    A possible fix is to move the constructor body until after all entities have bee fully defined: https://godbolt.org/z/6YjarYx3c

    #include <vector>
    
    struct forward_decl;
    
    struct S {
        std::vector<forward_decl> m;
    
        S();
    };
    
    struct forward_decl {};
    
    inline S::S() {}
    

    Office is currently hitting this when trying to update to C++20.

    bug 
    opened by tiagomacarios 2
  • c#: Add ToString() implementations for compiled bond objects

    c#: Add ToString() implementations for compiled bond objects

    Bond version: 10.0.0

    it seems that when compiling bond objects for c# (and possibly other languages) that there is no ToString() override, so when printing out a bond object in a logger, it just prints the object's name, which is not desirable.

    Example:

    
    PS C:\Users\mgrandi\Downloads\gbc-10.0.0-amd64> cat C:\Users\mgrandi\Temp\record.bond
    struct Record
    {
        0: string Name;
        1: vector<double> Constants;
    }
    PS C:\Users\mgrandi\Downloads\gbc-10.0.0-amd64>
    PS C:\Users\mgrandi\Downloads\gbc-10.0.0-amd64> .\gbc-10.0.0-amd64.exe c# C:\Users\mgrandi\Temp\record.bond
    PS C:\Users\mgrandi\Downloads\gbc-10.0.0-amd64> ls
    
    
        Directory: C:\Users\mgrandi\Downloads\gbc-10.0.0-amd64
    
    
    Mode                 LastWriteTime         Length Name
    ----                 -------------         ------ ----
    -a----          3/7/2022   6:53 PM       53646880 gbc-10.0.0-amd64.exe
    -a----         9/20/2022   1:13 PM           1484 record_types.cs
    
    
    PS C:\Users\mgrandi\Downloads\gbc-10.0.0-amd64> cat .\record_types.cs
    
    //------------------------------------------------------------------------------
    // This code was generated by a tool.
    //
    //   Tool : Bond Compiler 0.12.1.0
    //   Input filename:  C:\Users\mgrandi\Temp\record.bond
    //   Output filename: record_types.cs
    //
    // Changes to this file may cause incorrect behavior and will be lost when
    // the code is regenerated.
    // <auto-generated />
    //------------------------------------------------------------------------------
    
    
    // suppress "Missing XML comment for publicly visible type or member"
    #pragma warning disable 1591
    
    
    #region ReSharper warnings
    // ReSharper disable PartialTypeWithSinglePart
    // ReSharper disable RedundantNameQualifier
    // ReSharper disable InconsistentNaming
    // ReSharper disable CheckNamespace
    // ReSharper disable UnusedParameter.Local
    // ReSharper disable RedundantUsingDirective
    #endregion
    
    namespace test
    {
        using System.Collections.Generic;
    
        [global::Bond.Schema]
        [System.CodeDom.Compiler.GeneratedCode("gbc", "0.12.1.0")]
        public partial class Record
        {
            [global::Bond.Id(0)]
            public string Name { get; set; }
    
            [global::Bond.Id(1)]
            public List<double> Constants { get; set; }
    
            public Record()
                : this("test.Record", "Record")
            {}
    
            protected Record(string fullName, string name)
            {
                Name = "";
                Constants = new List<double>();
            }
        }
    } // test
    
    enhancement 
    opened by mgrandi 1
  • [ci] CI image Dockerfile needs to be paramatarized on FROM registry

    [ci] CI image Dockerfile needs to be paramatarized on FROM registry

    Some internal Microsoft systems want to be able to control the container registry used when building the Bond CI image. The Dockerfile needs to be parameterized, and the build that produces these images will need to set this new parameter to a suitable value.

    enhancement 
    opened by chwarr 0
  • [ci] Image cleanup script needs to handle 18.04 images

    [ci] Image cleanup script needs to handle 18.04 images

    The Docker image cleanup script doesn't properly handle that we now have both Ubuntu 16.04 and Ubuntu 18.04 images. It's only trying to clean up the 16.04 ones.

    bug 
    opened by chwarr 0
Releases(10.0.0)
  • 10.0.0(Mar 7, 2022)

    10.0: 2022-03-07

    • IDL core version: 3.0
    • C++ version: 10.0
    • C# NuGet version: 10.0
    • gbc & compiler library: 0.12.1.0

    C++

    • Breaking change: Bond-over-gRPC has been marked deprecated. Bond-over-gRPC will be removed in the next major version of Bond. See issue #1131, Bond-over-gRPC will be deprecated February 2022, for the full announcement.
      • The [[deprecated]] attribute has been added to the bond::ext::grpc namespace in every top-level Bond-over-gRPC++ header. This will cause compiler warnings/errors for uses of Bond-over-gRPC++ that you may need to handle.
    • Fixed multiple symbol definition for Win32Exception in grpc/win_thread_pool.h. (Issue #1129)
    • Add forward declaration for GenericWriteVariableUnsigned to fix "C3861: 'GenericWriteVariableUnsigned': identifier not found" when using custom streams that do not have their own implementation of WriteVariableUnsigned. (Issue #1115)
    • Fixed bond::DynamicParser that may not emit transform's OmittedField for compile-time schema and an omitted optional field in the payload. (Issue #1120)
    • Fixed missing include directives.
    • Removed bond::blob's unnecessary _content member, reducing its size by 1 pointer.
    • Added an ability to apply transform to a schema.
    • Added noexcept to bond::blob's non-throwing functions.

    C#

    • Breaking change: Bond-over-gRPC code has been marked deprecated. Bond-over-gRPC will be removed in the next major version of Bond. See issue #1131, Bond-over-gRPC will be deprecated February 2022, for the full announcement.
      • The [Obsolete] attribute has been added to every public type in the Bond.Grpc assembly. This will cause compiler warnings/errors for uses of Bond-over-gRPC# that you may need to handle.
    • Added virtual method OutputBuffer.ResizeBuffer that can be overridden to use buffer allocators other than new byte[] (e.g. ArrayPool<byte>.Rent()). (Pull request #1128)
    • The error message emitted when duplicate .bond items are detected by the MSBuild codegen now correctly refers to $(EnableDefaultItems) as the switch that controls this behavior. (Issue #1110)
    Source code(tar.gz)
    Source code(zip)
    gbc-10.0.0-amd64.zip(11.03 MB)
  • 9.0.5(Apr 15, 2021)

    9.0.5: 2021-04-14

    • IDL core version: 3.0
    • C++ version: 9.0.5
    • C# NuGet version: 9.0.5
    • gbc & compiler library: 0.12.1.0

    C++/Python

    • Added CMake variable BOND_FIND_GRPC to allow for external gRPC installations. The search for external GRPC installations is only done when BOND_ENABLE_GRPC is TRUE.
    • Removed use of deprecated std::ptr_fun in the Python library. (Issue #1080)

    C#

    • Implicit codegen now excludes any .bond files in the project's output directories (e.g., bin/, obj/debug/netstandard1.0). This behavior matches the implicit compilation behavior for .cs files.
    Source code(tar.gz)
    Source code(zip)
    gbc-9.0.5-amd64.zip(11.16 MB)
  • 9.0.4(Nov 24, 2020)

    9.0.4: 2020-11-23

    • IDL core version: 3.0
    • C++ version: 9.0.4
    • C# NuGet version: 9.0.3
    • gbc & compiler library: 0.12.1.0

    C++

    • Bond now uses the [[noreturn]] attribute to annotate functions that do not return. Previously, it used compiler-specific annotations.

    C#

    • There were no C# changes in this release.
    Source code(tar.gz)
    Source code(zip)
    gbc-9.0.4-amd64.exe.zip(11.16 MB)
  • 9.0.3(Aug 6, 2020)

  • 9.0.2(Aug 3, 2020)

    9.0.2: 2020-08-03

    • IDL core version: 3.0
    • C++ version: 9.0.2
    • C# NuGet version: 9.0.2
    • gbc & compiler library: 0.12.1.0

    C++

    • gbc is now installed with 555 (r-xr-xr-x) permissions. (Issue #1062)

    C#

    • Fixed a regression writing to non-seekable streams using CompactBinaryWriter. The fix in commit b0fd4a1 inadvertently added a call to Stream.Position in the Release configuration. This call is only indented to be made when Bond is built in the Debug configuration.
    Source code(tar.gz)
    Source code(zip)
    gbc-9.0.2-amd64.zip(11.16 MB)
  • 9.0.1(Jul 14, 2020)

    9.0.1: 2020-07-14

    • IDL core version: 3.0
    • C++ version: 9.0.1
    • C# NuGet version: 9.0.1
    • gbc & compiler library: 0.12.1.0

    C++

    • The RapidJSON submodule now points to commit 8f4c021. This addresses some aliasing warnings in recent versions of Clang and GCC.

    C#

    • Fixed MSB3105/CS2002 error about duplicate Compile items when a directory contains multiple .bond files and --gprc is in $BondOptions. (Issue #1050)
    • Fix handling of large container lengths that could cause an infinite loop when deserializing some payloads. This fix addresses CVE-2020-1469.
    Source code(tar.gz)
    Source code(zip)
    gbc-9.0.1-amd64.zip(11.16 MB)
  • 9.0.0(May 27, 2020)

    9.0: 2020-05-26

    • IDL core version: 3.0
    • C++ version: 9.0.0
    • C# NuGet version: 9.0.0
    • gbc & compiler library: 0.12.1.0

    C++

    • Breaking change MSVC 2013 support has been removed. (Issue #851)
    • Breaking change bond/core/warning.h has been deleted. Since the 5.3.0 release, Bond hasn't needed global warning suppressions for any compiler except MSVC 2013. This file was only used for MSVC 2013, which is no longer a supported compiler.
    • Fixed MSVC warning for deprecation of std::result_of_t in /std:c++17. (Issue #1007)
    • Fixed MSVC warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes. (Issue #1027)
    • Fixed Boost 1.73 warning "The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated." (Pull request #1036)

    C#

    • Fixed creation of duplicate default constructor when defining an empty struct and using --preview-constructor-parameters. (Issue #963)
    • The .NET assemblies are now only Authenticode signed with SHA-2. Legacy Windows OS versions may need updates to work with SHA-2 signatures.

    gbc and Bond compiler library

    Source code(tar.gz)
    Source code(zip)
    gbc-9.0.0-amd64.zip(11.16 MB)
  • 8.2.0(Nov 19, 2019)

    8.2.0: 2019-11-18

    • IDL core version: 3.0
    • C++ version: 8.2.0
    • C# NuGet version: 8.2.0
    • gbc & compiler library: 0.12.0.0

    C++

    • gRPC v1.17.1 is now required to use Bond-over-gRPC.
    • Fixed an ambigious HexDigit overload compilation error when compiling with some versions of GCC. (Pull request #954)
    • Fixed ambiguous call to maybe::operator== that breaks GCC 9 build. (Pull request #975)
    • Fixed MSVC warning C4296: "'<': expression is always false" in protocol.h. (Issue #981)

    C#

    • Added .NET 4.6 target framework to Bond.IO.dll so that it can use MemoryStream.TryGetBuffer() when cloning streams like is done when targeting .NET Standard 1.3+.

    Bond compiler library

    • Breaking change The bond compiler library (the Haskell library) and gbc have been switched to build with stackage snapshot lts-14.4. This snapshot uses megaparsec 7 and aeson 1.4.4, both of which had breaking changes that are reflected in the library, e.g., the parseBond signature has changed. There is no impact to users of the gbc command line tool or changes to C++ and C# code generation.
    Source code(tar.gz)
    Source code(zip)
    gbc-8.2.0-amd64.zip(10.93 MB)
  • 8.1.0(Mar 27, 2019)

  • 8.0.1(Jun 29, 2018)

    8.0.1: 2018-06-29

    • gbc & compiler library: 0.11.0.3
    • IDL core version: 3.0
    • C++ version: 8.0.1
    • C# NuGet version: 8.0

    C++

    • Fixed a crash in bond::ext::grpc::server's destructor when invoked on a moved-from object instance.
    • Added move-assignment operator to bond::blob.
    • Added cmake variable BOND_FIND_RAPIDJSON to allow for external RapidJSON installations.

    C#

    • There were no C# changes in this release.
    Source code(tar.gz)
    Source code(zip)
  • 8.0.0(May 30, 2018)

    • gbc & compiler library: 0.11.0.0
    • IDL core version: 3.0
    • C++ version: 8.0
    • C# NuGet version: 8.0

    gbc and Bond compiler library

    • Breaking change The deprecated Bond Comm functionality has been removed. This includes all gbc options related to Comm and the Comm codegen templates in the Haskell library. Issue #824
    • C++ codegen now properly generates move assignment operators. Previously, this was broken for some cases.
    • C++ codegen no longer generates checks for C++11, except for MSVC 2013 workarounds.
    • C++ codegen no longer generates data member initialization that invokes a constructor accepting Comparer for associative containers.
    • C++ codegen can now generate copy and move constructors with an allocator argument when a custom allocator is used and --alloc-ctors is passed to gbc.
    • C++ codegen can now generate type aliases that correspond to ones in IDL when the --type-aliases flag is passed to gbc.
    • C++ codegen can now use std::scoped_allocator_adaptor for strings and containers when a custom allocator is used and the --scoped-alloc flag is passed to gbc.
    • C++ codegen now generates lazily constructed enum name-to-value and value-to-name maps. Additionally, a user-defined map type can now be provided to GetNameToValueMap and GetValueToNameMap.
    • C++ codegen now applies the --export-attribute to the ToString, FromString, ToEnum and FromEnum functions.
    • Fixed a bug in C++ codegen that incorrectly applied the export attribute to generic gRPC services.
    • C++ codegen now generates an allocator_type typedef for a struct when the --allocator option is passed to gbc, instead of specializing std::uses_allocator.
    • import statements can now end with an optional semicolon.
    • File and directory paths on the command line, in response files, or in import statements can now use a mix of forward and backslashes. Issue #869
    • gbc is now Authenticode dual-signed with both SHA1 and SHA2.

    C++

    • Breaking change The deprecated Bond Comm functionality has been removed. This includes all gbc options related to Comm and all Comm APIs and header files. Issue #824
    • Breaking change Only versions of Boost released in the past two years (1.61 and newer) are supported. Bond will likely continue to work with older versions, but it is no longer tested with anything older than 1.61. Test coverage for Boost versions 1.61–1.66 has been improved. Issue #771
    • Breaking change Constructors accepting a Comparer have been removed from the bond::maybe and bond::nullable types.
    • Breaking change The bond::is_blob and bond::is_nullable traits have been removed. The blob and nullable types are not customizable, so these where never needed or used. The related functionality provided by bond::get_list_sub_type_id remains.
    • Breaking change Removed a dangerous implicit conversion operator from bond::maybe<T> to const T&. To access a bond::maybe<T> value, use one of the bond::maybe<T>::value functions.
    • Breaking change The nested pointer, const_pointer, reference and const_reference typedefs have been removed from bond::nullable<T>.
    • Breaking change The Allocator (second) type parameter has be removed from bond::nullable<T> and now it is always deduced from T.
    • Breaking change The bond::capped_allocator and related types have been moved to the bond::ext namespace and the "bond/ext" include directory.
    • Breaking changes in Bond-over-gRPC (based on real-world use and feedback). Check the updated examples to see how to use the changed APIs.
      • The generated ClientCore and ServiceCore class templates and the Client and Service convenience typedefs have all been replaced with normal classes named Client and Service. The ThreadPool type parameter has been removed in favor of a simplified runtime representation of a Scheduler.
      • The Scheduler concept and the bond::ext::gRPC::thread_pool implementation now use operator() instead of a schedule() member function.
      • The bond::ext::gRPC::server_core class template and the bond::ext::gRPC::server convenience typedef have been replaced with the normal class bond::ext::gRPC::server.
      • The generated Client::Async* functions now accept the std::shared_ptr<grpc::ClientContext> argument as the last parameter instead of as the first. This makes is easier to omit this parameter when no context customization is needed.
      • The client callback now directly accepts bond::ext::gRPC::unary_call_result<Response> (drops the std::shared_ptr). Also the unary_call_result now exposes read-only getters rather than fields. This simplified the type that clients need to deal with.
      • The bond::ext::gRPC::wait_callback::arg_type has been removed.
      • The client_callback.h header file has been renamed to unary_call_result.h to align with its contents.
      • The bond::ext::gRPC::server_builder has been replaced by the bond::ext::gRPC::server::Start factory function which now returns a plain bond::ext::gRPC::server object and accepts service instances managed by std::unique_ptr. This properly models the lifetime requirements. Service implementations must now pass a Scheduler to the generated Service base class which is no longer default constructible.
      • The generated method reflection information no longer uses a redundant bonded<T> wrapper for input_type and result_type typedefs.
      • The bond::ext::gRPC::unary_call no longer requires bonded<T> wrapper for request type.
      • The bond::ext::gRPC::unary_call::FinishWithError has been renamed to Finish. Overloads that take a status can be used to signal an error.
      • The grpc::Status second argument has been removed from bond::ext::gRPC::unary_call::Finish. gRPC does not support sending a response with a non-OK status, so the payload was being droped anyway.
      • Fixed bond::ext::gRPC::unary_call, bond::ext::gRPC::shared_unary_call and bond::ext::gRPC::unary_call_result types to properly use void and bond::reflection::nothing instead of the bond::Void empty struct. Also removed unnecessary functions from unary_call and shared_unary_call for those cases when they are not applicable (e.g. Finish is not available when return type is nothing).
    • gRPC v1.12.0 is now required to use Bond-over-gRPC.
      • This version include a number of memory leak fixes that users of Bond-over-gRPC were encountering. Issue #810
      • This version include some Windows-specific performance improvements for loopback connections.
    • The bond::ext::gRPC::wait_callback has been deprecated in favor of additionally generated client functions that return std::future.
    • Fixed includes for gRPC services with events or parameterless methods. Issue #735
    • Fixed a bug which would read an unrelated struct's field(s) when deserializing a base struct. Issue #742
    • Fixed a bug in bond::MapTo<T>::Field that failed to pass the Protocols type parameter to bond::Apply.
    • Fixed a race condition when bond::ext::gRPC::io_manager::shutdown and bond::ext::gRPC::io_manager::wait are called concurrently.
    • Fixed a race condition during bond::ext::gRPC::unary_call destruction.
    • Fixed the broken move constructor of bond::bonded<T, Reader&>.
    • Fixed the move constructor of bond::value to actually move the underlying reader.
    • Added the bond::blob_prolong helper function that will return a bond::blob with a copied data if the original one does not own the memory.
    • The bond::OutputBuffer::GetBuffers now can accept arbitrary STL-like containers.
    • bond::maybe<T> has been overhauled.
      • Fixed a bug that default initialized an instance of T even when a maybe held nothing.
      • Added noexcept variants of bond::maybe<T>::value.
      • Added bond::maybe<T>::emplace to construct a maybe's value in place.
      • Added various rvalue-reference and allocator-aware constructors and assignment operators.
      • Added operator==(const bond::maybe<T>&, const T&) and operator==(const T&, const bond::maybe<T>&) to compare directly to instances of T.
    • Fixed an issue with the ToString, FromString, ToEnum and FromEnum functions that were previously not exported from a DLL when the --export-attribute option was passed to gbc. Issue #861
    • Fixed a bug in bond::nullable<T, Alloc> where it was not propagating an allocator to T when allocator_type was not explicitly defined.
    • Fixed a bug in bond::make_box where const T& was not handled correctly.
    • The use of bond::check_method has been replaced with less restricting expression SFINAE checks on supported compilers. Issue #896
    • Fixed a bug where bond::ext::gRPC::io_manager could cause a thread to join itself.
    • The preferred namespace for Bond-over-gRPC is now bond::ext::grpc. The previous namespace, bond::ext::gRPC, continues to work.
    • Added a Windows-specific implementation of a thread pool.

    C#

    • Breaking change The deprecated Bond Comm functionality has been removed. This includes all gbc options related to Comm and all Comm APIs, assemblies, and NuGet packages. Issue #824
    • Breaking change The Bond.CSharp and Bond.Compiler.CSharp NuGet packages perform implicit codegen when the simplified .NET Core .csproj format is used. This breaking change does not affect projects using the classic .csproj format. Any .NET Core projects that encounter the build error "Duplicate BondCodegen items were included." and were explicitly listing BondCodegen items will either need to rely on implicit codegen or disable all implicit inclusion. To set per-item metadata, use the item update syntax. Issue #636
    • The C# attribute Bond.Attribute can now be applied to methods. This fixes broken codegen when attributes are used on service methods. Issue #617
    • Bond Attributes on service methods are now present on all the client overloads for the methods. Previously, just the "friendly" method had the attributes.
    • Grpc.Core v1.12.0 is now required to use Bond-over-gRPC.
      • This version include a number of memory leak fixes that users of Bond-over-gRPC were encountering. Issue #810
      • This version include some Windows-specific performance improvements for loopback connections.
    • BondCodegen items will now appear in the Visual Studio 2017+ UI in .NET Core projects.
    • The .NET Standard assemblies are fully strong-name signed. Previously, they were inadvertently only public strong-name signed.
    • The .NET assemblies are now Authenticode dual-signed with both SHA1 and SHA2.
    • Fixed a bug in the codegen targets when using gbc from $PATH on macOS and Linux that prevented the C# compiler from finding the generated C# files.
    • Preview: Added preliminary support for generating types with constructors with parameters for each field. This functionality will change in the future and may be removed. Pull request #857
    Source code(tar.gz)
    Source code(zip)
    gbc-8.0.0-amd64.zip(3.22 MB)
  • 7.0.2(Oct 31, 2017)

    7.0.2: 2017-10-30

    • gbc & compiler library: 0.10.1.0
    • IDL core version: 2.0
    • IDL comm version: 1.2
    • C++ version: 7.0.2
    • C# NuGet version: 7.0.1
    • C# Comm NuGet version: 0.14.0

    C++

    • Fixed a memory leak when deserializing Bond-over-gRPC messages that were stored as multiple slices.

    C#

    • There were no C# changes in this release.
    Source code(tar.gz)
    Source code(zip)
    gbc-7.0.2-amd64.exe.zip(5.14 MB)
  • 7.0.1(Oct 26, 2017)

    7.0.1: 2017-10-26

    • gbc & compiler library: 0.10.1.0
    • IDL core version: 2.0
    • IDL comm version: 1.2
    • C++ version: 7.0.0
    • C# NuGet version: 7.0.1
    • C# Comm NuGet version: 0.14.0

    C#

    • Fixes a regression introduced in 7.0.0 that resulted in an exception during generation of Serializer instances if the type contained an aliased required blob field.
    Source code(tar.gz)
    Source code(zip)
    gbc-7.0.1-amd64.exe.zip(5.14 MB)
  • 7.0.0(Oct 24, 2017)

    7.0.0: 2017-10-24

    • gbc & compiler library: 0.10.1.0
    • IDL core version: 2.0
    • IDL comm version: 1.2
    • C++ version: 7.0.0
    • C# NuGet version: 7.0.0
    • C# Comm NuGet version: 0.13.0

    gbc and Bond compiler library

    • Add service/method annotations in C# for Comm and gRPC.
    • Add service/method metadata support in C++ for gRPC.
    • C++ codegen now uses std::allocator_traits for rebinding allocator types.

    C++

    • Added bond::make_box helper function to create bond::Box<T> instances.
    • When Unicode conversion fails during JSON deserialization to wstring, a bond::CoreException is now thrown instead of a Boost exception.
    • When SimpleJSON deserializes a map key with no matching value, a bond::CoreException is now thrown.
    • When SimpleJSON deserializes a map key of non-primitive type, a bond::CoreException is now thrown.
    • Errors from some versions of G++ like "non-template type Deserialize used as a template" have been fixed. Issue #538
    • Guard against overflows in OutputMemoryStream, blob, and SimpleArray.
    • Use RapidJSON's iterative parser to handle deeply nested JSON data without causing a stack overflow.
    • Guard against min/max being function-style macros in more places.
    • Allow Bond-generated C++ types to use non-default-constructable allocators. (This works even on MSVC 2013 by only compiling the generated-type's default constructor if it is used. The default constructor is now a templated constructor that is invokable with zero arguments.)
    • Fixed some macro uses that did not have sufficient parenthesis around parameters and resulted in compiler errors.
    • Added the bond::ext::gRPC::shared_unary_call type. This type can be used when shared ownership semantics are needed for unary_call instances.
    • Provide compile-time access to metadata about gRPC services and methods.
    • Using bond::ext::gRPC::wait_callback no longer causes a shared_ptr cycle and the resulting resource leak.
    • Ensure that bond_grpc.h and bond_const_grpc.h are generated when the CMake variable BOND_ENABLE_GRPC is set to that importing bond.bond and bond_const.bond when defining a service works.
    • Added bond::capped_allocator adapter that will allow to limit the max number of bytes to allocate during deserialization.

    C#

    • Breaking change The code generation MSBuild targets no longer support Mono's xbuild: only MSBuild is supported. Mono has deprecated xbuild in favor of MSBuild now that MSBuild is open source and cross-platform.
    • Breaking change The code generation MSBuild targets now automatically compile the generated _grpc.cs files if --grpc is passed to gbc. Explicit <Compile Include="$(IntermediateOutputPath)foo_grpc.cs" /> lines in MSBuild projects will need to be removed to fix error MSB3105 about duplicate items. See commit a120cd99 for an example of how to fix this. Issue #448
    • Breaking change The low-level API IParser.ContainerHandler now has an arraySegment parameter for the converted blob.
    • The code generation MSBuild targets will now skip compiling the _types.cs files when --structs=false is passed to gbc.
    • Added Bond.Box.Create helper method to create Bond.Box<T> instances.
    • Reflection.IsBonded now recognizes custom IBonded implementations.
    • Use Newtonsoft's JSON.NET BigInteger support -- when available -- to handle the full range of uint64 values in the SimpleJson protocol (.NET 4.5 or greater, .NET Standard 1.6 or greater).
    • Bond.IO.Unsafe.InputStream can now be used with streams that do not implement Stream.Seek, like System.IO.Compression.GzipStream. Issue #498
    • Fix a bug in CompactBinaryWriter when using v2 that repeated first pass when a bonded field was serailized, resulting in extra work and extra state left in the CompactBinaryWriter.
    • Apply IDL annotations to services and methods for gRPC. Issue #617
    • Fixed a bug that produced C# code that couldn't be compiled when using Bond-over-gRPC with a generic type instantiated with a collection. Issue #623
    • When targeting .NET 4.5, avoid resolving external entities when using SimpleXmlReader.
    • Remove redundant conversions during serialization of aliased blobs.

    C# Comm

    • Apply IDL annotations to services and methods for Comm.
    Source code(tar.gz)
    Source code(zip)
    gbc-7.0.0-amd64.exe.zip(5.14 MB)
  • 6.0.0(Jun 30, 2017)

    • gbc & compiler library: 0.10.0.0
    • IDL core version: 2.0
    • IDL comm version: 1.2
    • C++ version: TBD 6.0.0
    • C# NuGet version: 6.0.0
    • C# Comm NuGet version: 0.12.0

    gbc and Bond compiler library

    • IDL support for service inheritance syntax
      • Breaking change In the Bond Haskell library, the Service type has a new field serviceBase.
    • C++ codegen now generates extern templates of bond::Apply instead of overloads.
    • C++ codegen hides FieldTemplate details, shortening symbol names.

    C++

    • Breaking change A C++11 compiler is now required. The minimum supported C++ compiler versions are now:
      • Clang 3.4 or newer
      • GNU C++ 4.7 or newer
      • Microsoft Visual C++ 2013 or newer
    • Breaking change The generated apply.h/.cpp files now contain extern templates of bond::Apply instead of overload implementations. Calls to bare Apply or TypeNamespace::Apply must be changed to bond::Apply.
    • Breaking change Users who are implementing custom streams are now required to provide the free functions CreateInputBuffer, CreateOutputBuffer and GetBufferRange, depending on which scenarios are used (there will be a corresponding compilation error for each case).
      • Users who were mistakenly calling bond::Merge<T> with explicit an template argument will get a compilation error. To fix, remove the <T> part.
      • In addition, users of MSVC12 are required to define a range_type typedef as a return type of corresponding GetBufferRange inside their custom input buffer implementation.
      • Please see InputBuffer, OutputBuffer, and the bf example for more details.
    • Breaking change The bond::customize<protocols> has been removed. All the public APIs that require a protocol list (e.g. bond::Marshal) now accept an extra template argument Protocols which defaults to bond::BuiltInProtocols. Custom input streams now require bond::type_id<> to be specialized with a unique magic number. For more details please see the bf example.
    • Initial support for sending Bond objects over gRPC has been added.
    • The bond::Apply function now has a uniform signature. Call sites for the Marshaler<Writer> transform overload that were mistakenly passing Writer explicitly (e.g. bond::Apply<Writer>(marshaler, value)) will now get a compiler error. To fix, remove the <Writer> part: bond::Apply(marshaler, value).
    • Fixed a bug that caused serialization using CompactBinaryWriter<OutputCounter> (to get the expected length of serializing with compact binary) to produced bogus results.
    • Fixed custom streams support which was broken for some scenarios.
    • For Visual C++ 2017 compability, RapidJSON v1.0.0 or newer is now required. The RapidJSON submodule that Bond uses by default has been updated to v1.1.0 due to a warning from clang in earlier versions.
    • C++ codegen hides FieldTemplate details, shortening symbol names.

    C#

    • Breaking change Support for .NET 4.0 has been dropped from the supported frameworks.
    • Breaking change The deprecated type Bond.BondReflection has been removed. The type Bond.Reflection should be used instead.
    • Breaking change Bond assemblies are now strong-name signed with the bond.snk key in the repository instead of with a Microsoft key. This allows anyone to produce compatible assemblies, not just Microsoft. Official distribution of Bond will continue to be Authenticode signed with a Microsoft certificate. Issue #414
      • The new public key for assemblies is now 00240000048000009400000006020000002400005253413100040000010001000d504ac18b4b149d2f7b0059b482f9b6d44d39059e6a96ff0a2a52678b5cfd8567cc67254132cd2debb5b95f6a1206a15c6f8ddac137c6c3ef4995f28c359acaa683a90995c8f08df7ce0aaa8836d331a344a514c443f112f80bf2ebed40ccb32d7df63c09b0d7bef80aecdc23ec200a458d4f8bafbcdeb9bf5ba111fbbd4787
    • Breaking change Bond assemblies now have assembly and file versions that correspond to their NuGet package version. Strong name identities will now change release-over-release in line with the NuGet package versions. Issue #325
    • The codegen MSBuild targets will now re-run codegen if gbc itself has been changed.
    • Fixed a bug where JSON and XML protocols would permit the serialization of non-nullable string fields that were set to null instead of throwing a NullReferenceException. Issue #417
    Source code(tar.gz)
    Source code(zip)
    gbc-6.0.0-amd64.exe.zip(5.11 MB)
  • 5.3.1(Apr 25, 2017)

  • 5.3.0(Apr 13, 2017)

    5.3.0: 2017-04-12

    • gbc & compiler library: 0.9.0.0
    • IDL core version: 2.0
    • IDL comm version: 1.2
    • C++ version: 5.3.0
    • C# NuGet version: 5.3.0
    • C# Comm NuGet version: 0.11.0

    gbc and Bond compiler library

    • C++ codegen ensures that parameter names do not shadow field names.
    • When generating C++ apply files, there are now explicit bond::Apply<> instantiations for CompactBinaryWriter<OutputCounter> and SimpleBinaryWriter<Null> writers. Pull request #373
      • Breaking change (Haskell library only): Language.Bond.Codegen.Cpp.ApplyOverloads.Protocol is now a union of ProtocolReader and ProtocolWriter to permit mixing and matching of reader/writer protocols without having to explicitly compute the full cross product.
    • Add gbc flags to pick which C# files to generate (structs, gRPC, and comm). Only structs are generated by default.
    • gbc ensures that method names are unique within a service. Issue #381

    C++

    • Fix Python shared_ptr converter build break with Boost 1.63.
    • Improve compliance with Microsoft's SDL.
    • Eliminate need for warning suppression on MSVC14 via warning.h in Bond itself. warning.h is still in place on MSVC12; furthermore, we don't alter warning.h for now as it may be depended upon by application code.
    • Avoid unaligned memory access on non-x86/x64 platforms. Issue #305
    • Improve compliance with strict-aliasing rules.
      • Bond now builds on Clang/GCC with -fstrict-aliasing.
    • When generating C++ apply files, there are now explicit bond::Apply<> instantiations for CompactBinaryWriter<OutputCounter> and SimpleBinaryWriter<Null> writers. Pull request #373
    • Improve C++ allocator support Issue #379 Pull request #380
      • Support C++11 and above allocator model for rebind
      • Simplify detection of the default allocator
    • Remove per-field instantiation of DynamicParser<>::UnknownFieldOrTypeMismatch method.

    C#

    • Added gRPC integration. See the Bond-over-gRPC manual.
    • Added controls to cap incremental allocation between reads in Bond.IO.Unsafe.InputStream.
    • Extended fix for bug parsing JSON when a string value is a date. Pull request #358
    • Bond C# 5.1.0 accidentally broke backward compability by renaming Bond.Reflection to Bond.BondReflection. This has been fixed: Bond.BondReflection was unrenamed back to Bond.Reflection, and a shim Bond.BondReflection type now redirects all calls to their original names to minimize further breakage. Issue #369
      • Code that started using Bond.BondReflection by name will encounter warning CS0618 indicating use of an obselete method/type. To fix this, use the original name Bond.Reflection. This warning can be suppressed if needed. However...
      • ...the shim type Bond.BondReflection will be removed during or after the next major release of C# Bond.

    C# Comm

    • Breaking change To generate C# Comm files, be sure to pass the --comm flag to gbc. See how the pingpong example was updated.
    • C# Comm is now deprecated. We recommend that you use Bond-over-gRPC. See the Bond-over-gRPC manual.
    • EpoxyListener's StopAsync() now stops all the outstanding connections that it accepted.
    • EpoxyTransport's StopAsync() now stops all the connections and listeners that it created.
    Source code(tar.gz)
    Source code(zip)
    gbc-5.3.0-amd64.exe.zip(5.11 MB)
  • 5.2.0(Feb 8, 2017)

    5.2.0: 2017-02-07

    • gbc & compiler library: 0.8.0.0
    • IDL core version: 2.0
    • IDL comm version: 1.2
    • C++ version: 5.2.0
    • C# NuGet version: 5.2.0
    • C# Comm NuGet version: 0.10.0

    gbc and Bond compiler library

    • The C++ Comm .cpp template has been renamed to comm_cpp from types_comm_cpp to match the file it generates.
    • Add export-attribute option for C++ and make apply-attribute a deprecated synonym for export-attribute
    • Fix C++ Comm build problems when services are shared via DLL. Issue #314

    C++

    • Fixed compatibility with RapidJSON v1.1.0. Issue #271
    • The minimum supported version of Boost is now 1.58
    • The bf utility now supports multiple payloads. Pull request #288
    • Fixed an issue with aliased enums. Pull request #288
    • Fixed an issue with template parameter deduction in bond::is_nullable that occurs with Microsoft Visual C++ 2015 Update 3. Issue #306

    C#

    • Added controls to cap pre-allocation during deserialization of containers and blobs.
    • Fixed computation of default value for aliased bool and wstring fields. Issue #300

    C# Comm

    • Resources are now properly cleaned up if failures are encountered when establishing client-side Epoxy connections.
    • The generated interfaces for services are now public. They were inadvertently internal before.
    Source code(tar.gz)
    Source code(zip)
    gbc-5.2.0-amd64.zip(5.02 MB)
  • 5.1.0(Feb 3, 2017)

    5.1.0: 2016-11-14

    • gbc & compiler library: 0.7.0.0
    • IDL core version: 2.0
    • IDL comm version: 1.2
    • C++ version: 5.1.0
    • C# NuGet version: 5.1.0
    • C# Comm NuGet version: 0.9.0

    gbc and Bond compiler library

    • Added initial support for generating C++ Comm services and proxies.
    • The Haskell utility functions structName and structParams were renamed to className and classParams (in the Language.Bond.Codegen.Cpp.Util module).

    C++ Comm

    • The initial C++ Comm code has been merged in, but there is still work left to be done before the first preview release. Use at your own risk.

    C#

    • Bond C# now supports .NET Standard 1.0, 1.3, and 1.6, so you can use Bond in .NET Core applications. Pull request #243
      • Not all assemblies work with all versions of the .NET Standard or on all platforms. The manual lists which assemblies target which frameworks.
      • Bond C# Comm is not yet building with .NET Core toolchain, so its .NET Core support is preliminary.
    • Bond.JSON now depends on Newsoft.JSON 9.0.1, the earliest version that supports .NET Standard 1.0.
    • A new assembly, Bond.Reflection.dll, has been added, due to some internal refactoring needed for .NET Core support. Many of the Bond assemblies now have a dependency on this assembly, so you'll need to deploy it. If you use NuGet to consume Bond, this is should be handled automatically.
    • Fixed a bug in the MSBuild targets that caused codegen to always be run if all of the BondCodegen items have Options metadata.
    • Fixed a bug in the MSBuild targets that caused compilation to fail if the $BondOutputDirectory did not end with a trailing slash.

    C# Comm

    • The constructor for LayerStackProvider no longer requires a logger; instead, the transport's logger is passed to OnSend/OnReceive. Before, using the same logger with a transport and LayerStackProvider required a duplicate implementation.
    • Fixed a bug that prevented EpoxyListener from accepting multiple connections in parallel.
    Source code(tar.gz)
    Source code(zip)
    gbc-5.1.0-amd64.zip(5.32 MB)
  • cs-comm-0.8.0(Feb 3, 2017)

    C# Comm 0.8.0: 2016-10-12

    • C# Comm NuGet version: 0.8.0

    C# Comm

    • EpoxyTransport can be configured to enable TCP keep-alive to help detect dead connections. See EpoxyTransportBuilder.SetKeepAliveTimes for details.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0(Oct 1, 2016)

    5.0.0: 2016-09-12

    • gbc & compiler library: 0.6.0.0
    • IDL core version: 2.0
    • IDL comm version: 1.1
    • C++ version: 5.0.0
    • C# NuGet version: 5.0.0
    • C# Comm NuGet version: 0.7.0

    IDL comm

    • Update IDL to conform to naming conventions.
    • Adjust IDL for changes made to Epoxy internals

    C++

    • Generated enum types now have a FromEnum method that can be used to convert from an enum value to a string. Now generated enum types have all four of ToEnum, FromEnum, ToString, and FromString. (The ...Enum variants return false on failure, while the ...String variants throw.)
    • Runtime SchemaDef list_sub_type field removed, as it was breaking some consumers of serialized SchemaDef. We plan to restore this field in the future. Issue #161 re-opened

    C#

    • Runtime SchemaDef list_sub_type field removed, as it was breaking some consumers of serialized SchemaDef. We plan to restore this field in the future. Issue #161 re-opened
    • The Bond.Runtime NuGet package no longer artificially limits Newtonsoft.Json to versions before 10. Issue #212

    C# Comm

    • EpoxyListeners can now be configured to require clients to authenticate themselves with a certificate. This is configured via the clientCertificateRequired parameter when creating an EpoxyServerTlsConfig.
    • Internals of the Epoxy protocol cleaned up. See the updated wire format specification.
    Source code(tar.gz)
    Source code(zip)
    gbc-5.0.0-amd64.zip(5.23 MB)
  • 4.3.0(Oct 1, 2016)

  • 4.2.1(Oct 1, 2016)

    4.2.1: 2016-06-02

    • gbc & compiler library: 0.4.1.0
    • C# NuGet version: 4.2.1
    • C# Comm NuGet version: 0.5.0

    gbc

    C#

    • Added Deserializer.TryDeserialize().
    • Added two new NuGet packages to make it easier to consume Bond piecemeal.
      • Bond.Compiler: contains gbc, bond.bond, and bond_const.bond in a tools-only package
      • Bond.Compiler.CSharp: contains gbc and C# MSBuild targets. No longer do you have to consume Bond.CSharp (which pulls in all of the rest of Bond) just to get codegen.

    C# Comm

    Source code(tar.gz)
    Source code(zip)
    gbc-4.2.1-amd64.zip(5.40 MB)
  • 4.2.0(Oct 1, 2016)

  • 4.1.0(Oct 1, 2016)

    4.1.0: 2016-04-22

    • gbc & compiler library: 0.4.0.2
    • C# NuGet version: 4.1.0

    gbc

    C++

    • Enums are now cast to 32-bit integers to avoid some compiler warnings.
    • Bond can be used in code bases where there is a function-style macro named U.

    C#

    Source code(tar.gz)
    Source code(zip)
    gbc-4.1.0-amd64.zip(4.65 MB)
  • 4.0.2(Oct 1, 2016)

Owner
Microsoft
Open source projects and samples from Microsoft
Microsoft
Cista is a simple, high-performance, zero-copy C++ serialization & reflection library.

Simple C++ Serialization & Reflection. Cista++ is a simple, open source (MIT license) C++17 compatible way of (de-)serializing C++ data structures. Si

Felix Gündling 1.1k Jan 2, 2023
Serialization framework for Unreal Engine Property System that just works!

DataConfig Serialization framework for Unreal Engine Property System that just works! Unreal Engine features a powerful Property System which implemen

null 81 Dec 19, 2022
A lightweight C++20 serialization framework

zpp::bits A modern C++20 binary serialization library, with just one header file. This library is a successor to zpp::serializer. The library tries to

Eyal Z 299 Dec 31, 2022
Cap'n Proto serialization/RPC system - core tools and C++ library

Cap'n Proto is an insanely fast data interchange format and capability-based RPC system. Think JSON, except binary. Or think Protocol Buffers, except

Cap'n Proto 9.5k Jan 1, 2023
Fast Binary Encoding is ultra fast and universal serialization solution for C++, C#, Go, Java, JavaScript, Kotlin, Python, Ruby, Swift

Fast Binary Encoding (FBE) Fast Binary Encoding allows to describe any domain models, business objects, complex data structures, client/server request

Ivan Shynkarenka 654 Jan 2, 2023
Zmeya is a header-only C++11 binary serialization library designed for games and performance-critical applications

Zmeya Zmeya is a header-only C++11 binary serialization library designed for games and performance-critical applications. Zmeya is not even a serializ

Sergey Makeev 99 Dec 24, 2022
Your binary serialization library

Bitsery Header only C++ binary serialization library. It is designed around the networking requirements for real-time data delivery, especially for ga

Mindaugas Vinkelis 771 Jan 2, 2023
A C++11 library for serialization

cereal - A C++11 library for serialization cereal is a header-only C++11 serialization library. cereal takes arbitrary data types and reversibly turns

iLab @ USC 3.4k Jan 3, 2023
FlatBuffers: Memory Efficient Serialization Library

FlatBuffers FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serializ

Google 19.7k Jan 9, 2023
Yet Another Serialization

YAS Yet Another Serialization - YAS is created as a replacement of boost.serialization because of its insufficient speed of serialization (benchmark 1

niXman 596 Jan 7, 2023
Binary Serialization

Binn Binn is a binary data serialization format designed to be compact, fast and easy to use. Performance The elements are stored with their sizes to

null 383 Dec 23, 2022
An implementation of the MessagePack serialization format in C / msgpack.org[C]

CMP CMP is a C implementation of the MessagePack serialization format. It currently implements version 5 of the MessagePack Spec. CMP's goal is to be

Charlie Gunyon 290 Dec 31, 2022
MPack - A C encoder/decoder for the MessagePack serialization format / msgpack.org[C]

Introduction MPack is a C implementation of an encoder and decoder for the MessagePack serialization format. It is: Simple and easy to use Secure agai

Nicholas Fraser 419 Jan 1, 2023
Simple C++ 20 Serialization Library that works out of the box with aggregate types!

BinaryLove3 Simple C++ 20 Serialization Library that works out of the box with aggregate types! Requirements BinaryLove3 is a c++20 only library.

RedSkittleFox 14 Sep 2, 2022
CppSerdes is a serialization/deserialization library designed with embedded systems in mind

A C++ serialization/deserialization library designed with embedded systems in mind

Darren V Levine 79 Nov 5, 2022
Header-only library for automatic (de)serialization of C++ types to/from JSON.

fuser 1-file header-only library for automatic (de)serialization of C++ types to/from JSON. how it works The library has a predefined set of (de)seria

null 51 Dec 17, 2022
Yet Another Serialization

YAS Yet Another Serialization - YAS is created as a replacement of boost.serialization because of its insufficient speed of serialization (benchmark 1

niXman 455 Sep 7, 2021
C++17 library for all your binary de-/serialization needs

blobify blobify is a header-only C++17 library to handle binary de-/serialization in your project. Given a user-defined C++ struct, blobify can encode

Tony Wasserka 247 Dec 8, 2022
universal serialization engine

A Universal Serialization Engine Based on compile-time Reflection iguana is a modern, universal and easy-to-use serialization engine developed in c++1

qicosmos 711 Jan 7, 2023