Crate rusp

source ·
Expand description

A toolkit, written in Rust, providing support to work with USP Records and Messages which are encoded in Protobuf bytestreams.

§What is it?

While a Protobuf schema exists which allows generating bindings for several commonly used programming languages, those are either uncomfortable to use and/or highly unsafe. By leveraging the strong Rust type system and the strict compiler, Rust is capable of detecting many incorrect or incomplete uses of the Protobuf encoding at compile time which allows for confident use of the USP protocol. Thise crate provides an abstraction over the automatically generated protobuf De-/Serialisers as well as a tool to work with USP Records and Messages on the commandline.

§What is included?

The toolkit includes:

  • Generated lowlevel Rust Protobuf bindings
  • A library providing:
  • A rusp binary granting access to library functionality via command line. Included functionality at the moment are:
    • Decoding of USP Msg Protobuf bytestreams from standard input
    • Decoding of USP Msg Protobuf bytestreams from file(s)
    • Decoding of USP Record Protobuf bytestreams from standard input
    • Decoding of USP Record Protobuf bytestreams from file(s)
    • Extraction of USP Msg Protobuf bytestreams from the payload of a USP Record Protobuf bytestream
    • Generation of USP Msg Protobuf bytestreams and C char arrays for selected messages and Error

Modules§