Crates.io | zserio-rs-build |
lib.rs | zserio-rs-build |
version | 0.4.0 |
source | src |
created_at | 2024-08-29 11:59:22.736628 |
updated_at | 2024-10-02 07:12:51.837957 |
description | zserio compiler |
homepage | https://github.com/Danaozhong/rust-zserio |
repository | https://github.com/Danaozhong/rust-zserio |
max_upload_size | |
id | 1356014 |
size | 3,512,459 |
A zserio compiler for Rust. This provides the
zserio-rs-build
tool to generate Rust code for a zserio schema. The generated
code will use the zserio crate for runtime
support.
Install zserio-rs-build using:
cargo install zserio-rs-build
The code generator is executed using the following command:
zserio-rs-build =<code_root_path> -o=<output_directory> <path_to_zserio_files>
This will generate the files needed to read/write zserio
-encoded binary data.
The root
CLI flag is optional, and specifies a crate prefix. If the prefix is
set, a mod.rs
file will be created. In case the code is generated without a
prefix, it is assumed that the crate will be built as a library, and generates
a lib.rs
instead. You must add zserio
as a dependency for the crate
containing the generated code:
cargo add zserio
The version of the zserio
crate used must match the version of zserio-rs-build
used.