4 releases (2 breaking)

0.5.1 Jan 6, 2025
0.5.0 Jan 6, 2025
0.4.0 Oct 2, 2024
0.3.2 Aug 29, 2024

#787 in Build Utils

Download history 30/week @ 2024-11-30 74/week @ 2024-12-07 23/week @ 2024-12-14 3/week @ 2024-12-21 259/week @ 2025-01-04 42/week @ 2025-01-11 2/week @ 2025-01-18

59 downloads per month

BSD-3-Clause

2.5MB
27K SLoC

Contains (JAR file, 2.5MB) src/internal/parser/antlr-rust.jar

zserio-rs-build

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.

Quick Start

Install zserio-rs-build using:

cargo install zserio-rs-build

Generate zserio Bindings

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.

Dependencies

~5–13MB
~156K SLoC