cfbc-0.1.9
توضیحات
CFB code generator
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cfbc-0.1.9 |
| نام | cfbc |
| نسخه کتابخانه | 0.1.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Nervos Core Dev |
| ایمیل نویسنده | dev@nervos.org |
| آدرس صفحه اصلی | http://github.com/nervosnetwork/cfb |
| آدرس اینترنتی | https://pypi.org/project/cfbc/ |
| مجوز | MIT |
# CFB Encoding
## [](https://travis-ci.com/nervosnetwork/cfb)
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.rs` to the project in the same
directory with the file `<name>_generated.rs` generated by `flatc -r`.
- Add crate `flatbuffers-verifier` as a dependency in Cargo.toml.
- Use the same version of `flatbuffers` as in `flatbuffers-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.
نیازمندی
| مقدار | نام |
|---|---|
| - | docopt |
| - | Jinja2 |
| - | flatbuffers |
نحوه نصب
نصب پکیج whl cfbc-0.1.9:
pip install cfbc-0.1.9.whl
نصب پکیج tar.gz cfbc-0.1.9:
pip install cfbc-0.1.9.tar.gz