- Notifications
You must be signed in to change notification settings - Fork556
Simple Binary Encoding (SBE) - High Performance Message Codec
License
aeron-io/simple-binary-encoding
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
SBE is an OSI layer 6 presentation forencoding and decoding binary application messages for low-latency financial applications. This repository containsthe reference implementations in Java, C++, Golang, C#, and Rust.
More details on the design and usage of SBE can be found on theWiki.
An XSD for SBE specs can be foundhere. Please address questions about the specification to theSBE FIX community.
For the latest version information and changes see theChange Log withdownloads atMaven Central.
The Java and C++ SBE implementations work very efficiently with theAeronmessaging system for low-latency and high-throughput communications. The Java SBE implementation has a dependency onAgrona for its buffer implementations. Commercial support is available fromsales@real-logic.co.uk.
Binaries and dependency information for Maven, Ivy, Gradle, and others can be found athttp://search.maven.org.
Example for Maven:
<dependency> <groupId>uk.co.real-logic</groupId> <artifactId>sbe-tool</artifactId> <version>${sbe.tool.version}</version></dependency>
Build the project withGradle using thisbuild.gradle file.
Full clean build:
$ ./gradlewRun the Java examples
$ ./gradlew runJavaExamplesJars for the executable, source, and javadoc for the various modules can be found in the following directories:
sbe-benchmarks/build/libssbe-samples/build/libssbe-tool/build/libssbe-all/build/libsAn example to execute a Jar from command line using the 'all' jar which includes the Agrona dependency:
java --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dsbe.generate.ir=true -Dsbe.target.language=Cpp -Dsbe.target.namespace=sbe -Dsbe.output.dir=include/gen -Dsbe.errorLog=yes -jar sbe-all/build/libs/sbe-all-${SBE_TOOL_VERSION}.jar my-sbe-messages.xmlNOTE: Linux, Mac OS, and Windows only for the moment. SeeFAQ.Windows builds have been tested with Visual Studio Express 12.
For convenience, thecppbuild script does a full clean, build, and test of all targets as a Release build.
$ ./cppbuild/cppbuildIf you are comfortable using CMake, then a full clean, build, and test looks like:
$ mkdir -p cppbuild/Debug$ cd cppbuild/Debug$ cmake ../..$ cmake --build . --clean-first$ ctestNote: The C++ build includes the C generator. Currently, the C generator is a work in progress.
First build using Gradle to generate the SBE jar and then use it to generate the golang code for testing.
$ ./gradlew$ ./gradlew generateGolangCodecsFor convenience on Linux, a gnu Makefile is provided that runs some tests and contains some examples.
$ cd gocode# make # test, examples, benchGo supports both generating Go structs with encode / decode methods, and flyweights like the other languages. Structs are generated by default for compatibility. Setsbe.go.generate.generate.flyweights=true to generate flyweights.
Users of golang generated code should see theuserdocumentation.
Developers wishing to enhance the golang generator should see thedeveloperdocumentation
Users of CSharp generated code should see theuser documentation.
Developers wishing to enhance the CSharp generator should see thedeveloper documentation
The SBE Rust generator will produce 100% safe rust crates (nounsafe code will be generated). Generated crates donot have any dependencies on any libraries (including no SBE libraries). If you don't yet have Rust installedseeRust: Getting Started
Generate the Rust codecs
$ ./gradlew generateRustCodecsRun the Rust test from Gradle
$ ./gradlew runRustTestsOr run test directly withCargo
$ cd rust$ cargo testCopyright 2013-2025 Real Logic Limited.
Copyright 2017 MarketFactory Inc.
Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
About
Simple Binary Encoding (SBE) - High Performance Message Codec
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.