{"id":18674112,"url":"https://github.com/nervosnetwork/cfb","last_synced_at":"2025-04-12T01:55:31.660Z","repository":{"id":49052085,"uuid":"172616089","full_name":"nervosnetwork/cfb","owner":"nervosnetwork","description":"CFB (Canonical FlatBuffers) is a restricted variant of FlatBuffers for producing unequivocal transfer syntax.","archived":false,"fork":false,"pushed_at":"2021-06-30T00:53:13.000Z","size":271,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-14T12:01:31.512Z","etag":null,"topics":["encoding","serialization"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nervosnetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-26T01:41:05.000Z","updated_at":"2021-09-24T19:47:06.000Z","dependencies_parsed_at":"2022-09-10T19:22:23.685Z","dependency_job_id":null,"html_url":"https://github.com/nervosnetwork/cfb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fcfb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fcfb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fcfb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fcfb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nervosnetwork","download_url":"https://codeload.github.com/nervosnetwork/cfb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248441517,"owners_count":21104010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encoding","serialization"],"created_at":"2024-11-07T09:17:32.213Z","updated_at":"2025-04-12T01:55:31.638Z","avatar_url":"https://github.com/nervosnetwork.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CFB Encoding\n\n## [![Build Status](https://travis-ci.com/nervosnetwork/cfb.svg?branch=master)](https://travis-ci.com/nervosnetwork/cfb)\n\nCFB (Canonical FlatBuffers) is a restricted variant of FlatBuffers for producing unequivocal transfer syntax.\n\nCKB no longer uses CFB, see [nervosnetwork/rfcs#136](https://github.com/nervosnetwork/rfcs/pull/136).\n\nAnd CFB has not reached the defined scope since we decided to move on. However, the generated verifier is still useful since the current Rust Flatbuffer generator just panics on invalid input.\n\n## Usage\n\nInstall the code geneartor as commane line utility:\n\n```\npip install -U cfbc\n```\n\nFirst generate bfbs file from fbs:\n\n```\nflatc -b --schema example.fbs\n```\n\nThen generate rust files from bfbs:\n\n```\ncfbc example.bfbs\n```\n\n### Use Verifier with flatbuffers rust\n\n-   Add the generated `\u003cname\u003e_generated_verifier.rs` to the project in the same\n    directory with the file `\u003cname\u003e_generated.rs` generated by `flatc -r`.\n-   Add crate `flatbuffers-verifier` as a dependency in Cargo.toml.\n-   Use the same version of `flatbuffers` as in `flatbuffers-verifier`.\n\n```\nflatbuffers-verifier = \"0.2.0\"\nflatbuffers = \"0.6.0\"\n```\n\nThe crate `flatbuffers-verifier` defines a function `get_root`, which is intended to replace the\nfunction with the same name in `flatbuffers`. This function will verify the\nbuffer, and returns a `Result` to indicate whether the buffer is valid.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervosnetwork%2Fcfb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnervosnetwork%2Fcfb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervosnetwork%2Fcfb/lists"}