Crates.io | zcash_lightwallet_proto |
lib.rs | zcash_lightwallet_proto |
version | 0.1.1 |
source | src |
created_at | 2022-10-20 21:47:43.867902 |
updated_at | 2022-10-20 21:55:02.556578 |
description | A thin-as-possible rust bindings wrapper for the Zcash lightwalletd gRPC protocol. |
homepage | |
repository | https://github.com/nathan-at-least/zcash_lightwallet_proto |
max_upload_size | |
id | 692989 |
size | 1,865,957 |
A thin-as-possible rust bindings wrapper for the Zcash lightwalletd gRPC protocol.
:warning: ⚠ This is a proof-of-concept prototype and should not be used in production.
This repository is a proof of concept at creating a minimal modular rust bindings crate for the Lightwalletd protocol. The librustzcash project may integrate grpc bindings directly which would be better maintained and vetted for production use in the future, see librustzcash issue #585.
This crate depends on protobuf-codegen-pure
which will be imminently superceded by protobug-codegen
according to the docs.
This crate relies on protobuf-codegen-pure
to generate bindings without requiring any build toolchains outside of cargo
(namely there's no requirement for protoc
to be installed).
So a standard cargo build
should work.
The .proto
files are imported directly from lightwalletd as a git subtree within the ./subtree
directory. This design is intended to enable safe tracking of upstream changes by updating the subtree without other manual copying or editing of .proto
files.
The build.rs
script uses protobuf-codegen-pure
to generate rust mods, writing them into $OUT_DIR/generated-source/
. Additionally a container.rs
source file is written with pub mod ${MODNAME};
for each .proto
generated rust mod.
The lib.rs
directly include!()
's the container.rs
, which pulls in each generated submod.
Unfortunately API docs are not produced from the upstream .proto
files with this current design. A nice improvement would be to ensure rust API docs are automatically generated from upstream .proto
API documentation.