rust-libp2p/protocols/floodsub/regen_structs_proto.sh

14 lines
373 B
Bash
Raw Normal View History

#!/bin/sh
# This script regenerates the `src/rpc_proto.rs` file from `rpc.proto`.
docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \
apt-get update; \
apt-get install -y protobuf-compiler; \
cargo install --version 2.3.0 protobuf-codegen; \
protoc --rust_out . rpc.proto"
sudo chown $USER:$USER *.rs
mv -f rpc.rs ./src/rpc_proto.rs