CFB code generator
Project description
CFB Encoding
CFB (Canonical FlatBuffers) is a restricted variant of FlatBuffers for producing unequivocal transfer syntax.
Usage
Install the code geneartor as commane line utility:
pip install -U cfbc
First generate bfbs file from fbs:
flatc -b --schema example.fbs
Then generate rust files from bfbs:
cfbc example.bfbs
Use Verifier with flatbuffers rust
- Add the generated
<name>_generated_verifier.rsto the project in the same directory with the file<name>_generated.rsgenerated byflatc -r. - Add crate
flatbuffers-verifieras a dependency in Cargo.toml. - Use the same version of
flatbuffersas inflatbuffers-verifier.
flatbuffers-verifier = { git = "https://github.com/nervosnetwork/cfb" }
flatbuffers = { git = "https://github.com/google/flatbuffers", rev = "4f10da8d99c1a7bc8c9c7d06d2092a689f171d29" }
The crate flatbuffers-verifier defines a function get_root, which is intended to replace the
function with the same name in flatbuffers. This function will verify the
buffer, and returns a Result to indicate whether the buffer is valid.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cfbc-0.1.9.tar.gz.
File metadata
- Download URL: cfbc-0.1.9.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48395019b28f1d03cdbe0fde42c388a473fa0cba03a0342c9f26db8903bbe8ae
|
|
| MD5 |
bc6212f4495ceda5df1eeb7b8aac063a
|
|
| BLAKE2b-256 |
ab24bf450c6b97ef078acdb8c4eee5aa89c73a9759721f157cc0d46acd4cfc19
|
File details
Details for the file cfbc-0.1.9-py3-none-any.whl.
File metadata
- Download URL: cfbc-0.1.9-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fe3cb6ca728650032df85c4c3fe8a6785f553ea08d94848c4dbdd2359ed5579
|
|
| MD5 |
e04376c7932bad948f8c8565d90de259
|
|
| BLAKE2b-256 |
032739375aa806b92715a904ac7bf257a4635d6efe32f319c4a2eb45ece61d31
|