Rust language protobuf for OpenFMB operational use cases
Rust programming language Protocol Buffer (protobuf) definitions based on the OpenFMB operational use case data model located here.
Including in your project
There are a couple of methods for adding these definitions to your project in your Cargo.toml file.
From crates.io
[]
# 'prost' is the Rust protobuf library that is currently used by OpenFMB
= "0.6.1"
# Rust defintions for OpenFMB data model
= "*" # <- Change to the version you prefer
From the GitLab repository
[]
# 'prost' is the Rust protobuf library that is currently used by OpenFMB
= "0.6.1"
# Rust defintions for OpenFMB data model
= { = "https://gitlab.com/openfmb/psm/ops/protobuf/rust-openfmb-ops-protobuf.git", = "<release-tag-label>" }
Using
After adding the depencency in your project's Cargo.toml file, you are ready to include the protobuf definitions into your source files like this:
extern crate prost;
use *;
extern crate rust_openfmb_ops_protobuf;
use *;
After importing the crate, you can now start using the protobuf definitions like this:
Encoding OpenFMB profile to protobuf
Decoding from protobuf to OpenFMB profileName
Copyright
See the COPYRIGHT file for copyright information of information contained in this repository.
License
Unless otherwise noted, all files in this repository are distributed under the Apache Version 2.0 license found in the LICENSE file.