fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
7f751cdd
patching
1"""Rules for building proto libraries in Rust.""" 2 3load ( 4"//proto/prost/private:prost.bzl" , 5_rust_prost_library = "rust_prost_library" , 6_rust_prost_toolchain = "rust_prost_toolchain" , 7) 8 9def rust_prost_library ( name , ** kwargs ): 10"""A rule for generating a Rust library using Prost. 11 12Args: 13name (str): The name of the target. 14**kwargs (dict): Additional keyword arguments for the underlying 15`rust_prost_library` rule. 16""" 17 18# Clippy and Rustfmt will attempt to run on these targets. 19# This is not correct and likely a bug in target detection. 20tags = kwargs . pop ( "tags" , []) 21if "no-clippy" not in tags : 22tags . append ( "no-clippy" ) 23if "no-rustfmt" not in tags : 24tags . append ( "no-rustfmt" ) 25 26_rust_prost_library ( 27name = name , 28tags = tags , 29** kwargs 30) 31 32rust_prost_toolchain = _rust_prost_toolchain