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.
MIT License
Bot releases are visible (Hide)
Published by jandupej 4 months ago
gbc
& compiler library: 0.13.0.0gbc
and Bond compiler library--grpc
switch is no longer supported. Service definitions are stillbond::ext:grpc
namespace. Service definitions canbond::CoreException
will be thrown in order tobond::SetDeserializeMaxDepth(uint32_t)
.Breaking change: Update of Newtonsoft.Json library to version 13.3.0.
(Issue #1156)
This update fixes depth check in input JSON string (by default: 64).
Depth check is necessary to prevent stack overflow issue with long payloads.
Breaking change: The minimum supported version of .NET Framework is
4.6.2. Support for .NET Framework 4.5 has been dropped.
Breaking change: All Bond-over-gRPC code has been removed. This is
everything under the Bond.Grpc
namespace and the Bond.Grpc.CSharp NuGet
package. Service definitions can still appear in .bond files, but no C#
code will be generated for them. See issue #1131, Bond-over-gRPC will be
deprecated February 2022,
for the full announcement.
Added codegen and deserialization support for container type aliases to
use
System.Collections.Immutable
collections. (Pull request
#1161)
By default, deserialization will no longer process very deeply nested
structures. Instead, an InvalidOperationException
will be thrown in
order to protect against stack overflows. The depth limit may be changed
by setting the property Bond.DeserializerControls.Active.MaxDepth
.
org.bondlib.InvalidBondDataException
exceptionorg.bondlib.bond.DeserializerControls.setMaxDepth
.gbc
& compiler library: 0.12.1.0[[deprecated]]
attribute has been added to the bond::ext::grpc
grpc/win_thread_pool.h
. (IssueGenericWriteVariableUnsigned
to fix "C3861:WriteVariableUnsigned
. (Issuebond::DynamicParser
that may not emit transform's OmittedField
bond::blob
's unnecessary _content
member, reducing its sizenoexcept
to bond::blob
's non-throwing functions.[Obsolete]
attribute has been added to every public type in theBond.Grpc
assembly. This will cause compiler warnings/errors for usesOutputBuffer.ResizeBuffer
that can be overridden tonew byte[]
(e.g.ArrayPool<byte>.Rent()
). (Pull request$(EnableDefaultItems)
as thePublished by chwarr over 3 years ago
gbc
& compiler library: 0.12.1.0BOND_FIND_GRPC
to allow for external gRPCBOND_ENABLE_GRPC
is TRUE
.std::ptr_fun
in the Python library. (Issuebin/
, obj/debug/netstandard1.0
). This behaviorPublished by chwarr almost 4 years ago
gbc
& compiler library: 0.12.1.0[[noreturn]]
attribute to annotate functions that doPublished by chwarr about 4 years ago
gbc
& compiler library: 0.12.1.0OutputBuffer.Grow
: it was incorrectlyPublished by chwarr about 4 years ago
gbc
& compiler library: 0.12.1.0CompactBinaryWriter
. The fix in commitStream.Position
in the ReleasePublished by chwarr over 4 years ago
gbc
& compiler library: 0.12.1.0--gprc
is in $BondOptions
. (IssuePublished by chwarr over 4 years ago
gbc
& compiler library: 0.12.1.0bond/core/warning.h
has been deleted. Since thestd::result_of_t
in /std:c++17
.--preview-constructor-parameters
.gbc
and Bond compiler libraryPublished by chwarr almost 5 years ago
gbc
& compiler library: 0.12.0.0HexDigit
overload compilation error whenmaybe::operator==
that breaks GCC 9MemoryStream.TryGetBuffer()
when cloning streams like is done whengbc
have been switched to build with stackage snapshot lts-14.4. ThisparseBond
signaturePublished by lalo over 5 years ago
CallInvoker
instance to the generatedPublished by ara-ayvazyan over 6 years ago
gbc
& compiler library: 0.11.0.3bond::ext::grpc::server
's destructor when invoked onbond::blob
.BOND_FIND_RAPIDJSON
to allow for external RapidJSON installations.Published by ara-ayvazyan over 6 years ago
gbc
& compiler library: 0.11.0.0gbc
and Bond compiler libraryComparer
for associative containers.--alloc-ctors
is passed togbc
.--type-aliases
flag is passed to gbc
.std::scoped_allocator_adaptor
--scoped-alloc
flag is passed to gbc
.GetNameToValueMap
and GetValueToNameMap
.--export-attribute
to the ToString
,FromString
, ToEnum
and FromEnum
functions.allocator_type
typedef for a struct when the--allocator
option is passed to gbc
, instead of specializingstd::uses_allocator
.import
statements can now end with an optional semicolon.import
statements can now use a mix of forward and backslashes. IssueComparer
have been removedbond::maybe
and bond::nullable
types.bond::is_blob
and bond::is_nullable
traits haveblob
and nullable
types are not customizable, so thesebond::get_list_sub_type_id
remains.bond::maybe<T>
to const T&
. To access a bond::maybe<T>
value, use onebond::maybe<T>::value
functions.pointer
, const_pointer
, reference
andconst_reference
typedefs have been removed from bond::nullable<T>
.Allocator
(second) type parameter has be removedbond::nullable<T>
and now it is always deduced from T
.bond::capped_allocator
and related types have beenbond::ext
namespace and the "bond/ext" include directory.ClientCore
and ServiceCore
class templates and theClient
and Service
convenience typedefs have all been replaced withClient
and Service
. The ThreadPool
typeScheduler
.Scheduler
concept and the bond::ext::gRPC::thread_pool
operator()
instead of a schedule()
memberbond::ext::gRPC::server_core
class template and thebond::ext::gRPC::server
convenience typedef have been replaced with thebond::ext::gRPC::server
.Client::Async*
functions now accept thestd::shared_ptr<grpc::ClientContext>
argument as the last parameterbond::ext::gRPC::unary_call_result<Response>
(drops thestd::shared_ptr
). Also the unary_call_result
now exposes read-onlybond::ext::gRPC::wait_callback::arg_type
has been removed.client_callback.h
header file has been renamed tounary_call_result.h
to align with its contents.bond::ext::gRPC::server_builder
has been replaced by thebond::ext::gRPC::server::Start
factory function which now returns abond::ext::gRPC::server
object and accepts service instancesstd::unique_ptr
. This properly models the lifetimeScheduler
to theService
base class which is no longer default constructible.bonded<T>
wrapper for input_type
and result_type
typedefs.bond::ext::gRPC::unary_call
no longer requires bonded<T>
wrapperbond::ext::gRPC::unary_call::FinishWithError
has been renamed toFinish
. Overloads that take a status can be used to signal an error.grpc::Status
second argument has been removed frombond::ext::gRPC::unary_call::Finish
. gRPC does not support sending abond::ext::gRPC::unary_call
, bond::ext::gRPC::shared_unary_call
bond::ext::gRPC::unary_call_result
types to properly use void
andbond::reflection::nothing
instead of the bond::Void
empty struct. Alsounary_call
and shared_unary_call
Finish
is notnothing
).bond::ext::gRPC::wait_callback
has been deprecated in favor ofstd::future
.bond::MapTo<T>::Field
that failed to pass the Protocols
bond::Apply
.bond::ext::gRPC::io_manager::shutdown
andbond::ext::gRPC::io_manager::wait
are called concurrently.bond::ext::gRPC::unary_call
destruction.bond::bonded<T, Reader&>
.bond::value
to actually move the underlying reader.bond::blob_prolong
helper function that will return abond::blob
with a copied data if the original one does not own the memory.bond::OutputBuffer::GetBuffers
now can accept arbitrary STL-likebond::maybe<T>
has been overhauled.
T
even when anoexcept
variants of bond::maybe<T>::value
.bond::maybe<T>::emplace
to construct a maybe's value in place.operator==(const bond::maybe<T>&, const T&)
andoperator==(const T&, const bond::maybe<T>&)
to compare directly toT
.ToString
, FromString
, ToEnum
and FromEnum
--export-attribute
option was passed to gbc
. Issuebond::nullable<T, Alloc>
where it was not propagating anT
when allocator_type
was not explicitly defined.bond::make_box
where const T&
was not handled correctly.bond::check_method
has been replaced with less restrictingbond::ext::gRPC::io_manager
could cause a thread to joinbond::ext::grpc
. Thebond::ext::gRPC
, continues to work..csproj
format is.csproj
format. Any .NET Core projects that encounter the build errorBondCodegen
items will either need to rely on implicit codegen or disableBond.Attribute
can now be applied to methods. This fixesBondCodegen
items will now appear in the Visual Studio 2017+ UI in .NETgbc
from $PATH on macOS andPublished by chwarr over 6 years ago
This is a preview release of Bond codegen for Java.
Published by chwarr almost 7 years ago
gbc
& compiler library: 0.10.1.0Published by lalo almost 7 years ago
gbc
& compiler library: 0.10.1.0required
blob field.Published by lalo almost 7 years ago
gbc
& compiler library: 0.10.1.0gbc
and Bond compiler librarystd::allocator_traits
bond::make_box
helper function to create bond::Box<T>
instances.Deserialize
bond::ext::gRPC::shared_unary_call
type. This type can be usedunary_call
instances.bond::ext::gRPC::wait_callback
no longer causes a shared_ptr cyclebond_grpc.h
and bond_const_grpc.h
are generated when theBOND_ENABLE_GRPC
is set to that importing bond.bond
andbond_const.bond
when defining a service works.bond::capped_allocator
adapter that will allow to limit the max_grpc.cs
files if --grpc
is passed to gbc
.<Compile Include="$(IntermediateOutputPath)foo_grpc.cs" />
IParser.ContainerHandler
now has anarraySegment
parameter for the converted blob._types.cs
files when --structs=false
is passed to gbc
.Bond.Box.Create
helper method to create Bond.Box<T>
instances.Bond.IO.Unsafe.InputStream
can now be used with streams that do notStream.Seek
, likeSystem.IO.Compression.GzipStream
.Stream.CanSeek
.SimpleXmlReader
.Published by chwarr over 7 years ago
gbc
& compiler library: 0.10.0.0gbc
and Bond compiler libraryService
typeserviceBase
.bond::Apply
instead of overloads.bond::Apply
instead of overload implementations. Calls to bare Apply
TypeNamespace::Apply
must be changed to bond::Apply
.CreateInputBuffer
,CreateOutputBuffer
and GetBufferRange
, depending on which scenariosbond::Merge<T>
with explicit an<T>
part.range_type
GetBufferRange
insidebond::customize<protocols>
has been removed. All thebond::Marshal
) now acceptProtocols
which defaults to bond::BuiltInProtocols
.bond::type_id<>
to be specialized with abond::Apply
function now has a uniform signature. Call sites for theMarshaler<Writer>
transform overload that were mistakenly passingWriter
explicitly (e.g. bond::Apply<Writer>(marshaler, value)
) will<Writer>
part:bond::Apply(marshaler, value)
.CompactBinaryWriter<OutputCounter>
(to get the expected length ofBond.BondReflection
has beenBond.Reflection
should be used instead.00240000048000009400000006020000002400005253413100040000010001000d504ac18b4b149d2f7b0059b482f9b6d44d39059e6a96ff0a2a52678b5cfd8567cc67254132cd2debb5b95f6a1206a15c6f8ddac137c6c3ef4995f28c359acaa683a90995c8f08df7ce0aaa8836d331a344a514c443f112f80bf2ebed40ccb32d7df63c09b0d7bef80aecdc23ec200a458d4f8bafbcdeb9bf5ba111fbbd4787
Published by chwarr over 7 years ago
gbc
& compiler library: 0.9.0.0Published by chwarr over 7 years ago
gbc
& compiler library: 0.9.0.0gbc
and Bond compiler librarybond::Apply<>
CompactBinaryWriter<OutputCounter>
andSimpleBinaryWriter<Null>
writers.Language.Bond.Codegen.Cpp.ApplyOverloads.Protocol
is now a union ofProtocolReader
and ProtocolWriter
to permit mixing and matching of_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
_CTR_SECURE_NO_WARNINGS
.-fstrict-aliasing
.bond::Apply<>
CompactBinaryWriter<OutputCounter>
andSimpleBinaryWriter<Null>
writers.Bond.IO.Unsafe.InputStream
.Bond.Reflection
to Bond.BondReflection
. This has been fixed:Bond.BondReflection
was unrenamed back to Bond.Reflection
, and a shimBond.BondReflection
type now redirects all calls to their original namesBond.BondReflection
by name will encounterBond.Reflection
. This warning can beBond.BondReflection
will be removed during or after--comm
flag to gbc.Published by chwarr over 7 years ago
gbc
& compiler library: 0.8.0.0gbc
and Bond compiler librarycomm_cpp
fromtypes_comm_cpp
to match the file it generates.bf
utility now supports multiple payloads.bond::is_nullable