Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/panda-official/driftbytes
A serializer for typed data in the Drift infrastructure
https://github.com/panda-official/driftbytes
Last synced: about 2 months ago
JSON representation
A serializer for typed data in the Drift infrastructure
- Host: GitHub
- URL: https://github.com/panda-official/driftbytes
- Owner: panda-official
- License: mpl-2.0
- Created: 2023-07-17T07:26:26.000Z (over 1 year ago)
- Default Branch: develop
- Last Pushed: 2023-10-20T15:21:30.000Z (about 1 year ago)
- Last Synced: 2024-11-05T00:06:42.419Z (2 months ago)
- Language: C++
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# DriftBytes
A serializer for typed data in the Drift infrastructure.
## Description
This is an alternative to [WaveletBuffer](https://github.com/panda-official/WaveletBuffer) that uses a different serialization format
which is suitable for non-floating point data.## Features
* Supports all integer types
* Supports all floating point types
* Supports UTF-8 strings
* Supports vectors and matrices of all supported types## Requirements
* CMake >= 3.16
* C++17 compiler
* conan >= 1.56, < 2.0## Bindings
* [Python](python/README.md)
## Usage Example
```c++
#include#include
using drift_bytes::InputBuffer;
using drift_bytes::OutputBuffer;
using drift_bytes::Variant;int main() {
Variant some_value{42};OutputBuffer buffer(1);
buffer[0] = some_value;InputBuffer input(buffer.str());
Variant new_val = input[0];std::cout << new_val << std::endl;
}```
## Bulding
```bash
mkdir build && cd build
conan install ../conan --build=missing -of .
cmake .. -DCMAKE_TOOLCHAIN_FILE=./build/Release/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .
```