This crate simplifies writing build scripts for Exonum and Exonum services.
Since Protobuf is the Exonum default serialization format, build scripts are mostly used to compile Protobuf files and generate corresponding code. Generated code is used later by the Exonum core and services.
There are several predefined sets of protobuf sources available for use. Currently presented sets:
- Crypto sources: all the necessary crypto types used in services
and system proto-files. These types are
Hash
,PublicKey
andSignature
. - Exonum sources: types used in core and in system services such as the supervisor.
- Common sources: types that can be used by various parts of Exonum.
- MerkleDB sources: types representing proofs of existence of element in database.
Consult the crate docs for more details.
Sample build.rs
using exonum-build
:
use exonum_build::ProtobufGenerator;
fn main() {
ProtobufGenerator::with_mod_name("protobuf_mod.rs")
.with_input_dir("src/proto")
.with_crypto()
.generate();
}
Include exonum-build
as a dependency in your Cargo.toml
:
[dependencies]
exonum-build = "0.13.0-rc.2"
exonum-build
is licensed under the Apache License (Version 2.0).
See LICENSE for details.