zcash_lightwallet_proto

Crates.iozcash_lightwallet_proto
lib.rszcash_lightwallet_proto
version0.1.1
sourcesrc
created_at2022-10-20 21:47:43.867902
updated_at2022-10-20 21:55:02.556578
descriptionA thin-as-possible rust bindings wrapper for the Zcash lightwalletd gRPC protocol.
homepage
repositoryhttps://github.com/nathan-at-least/zcash_lightwallet_proto
max_upload_size
id692989
size1,865,957
Nathan Wilcox (nathan-at-least)

documentation

README

A thin-as-possible rust bindings wrapper for the Zcash lightwalletd gRPC protocol.

Status

: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.

Build

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.

Build Design

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.

Commit count: 0

cargo fmt