feat(rust): Add basic Rust extractor
This PR adds a basic Rust extractor using the existing "@io_kythe//kythe/go/extractors/cmd/bazel:extract_kzip" extractor.
Known Issues
The .kzip files produced by this extractor are currently fairly large (~60MB). This will be addressed later on.
@@ -166,3 +166,22 @@ extractor_action(
mnemonics = ["GenProtoDescriptorSet"],
output = "$(ACTION_ID).protobuf.kzip",
)
+
+extractor_action(
+ name = "extract_kzip_rust",
+ args = [
+ "--extra_action=$(EXTRA_ACTION_FILE)",
+ "--language=rust",
+ "--include='\\.(rs|rlib)$$'",
+ "--output=$(output $(ACTION_ID).rust.kzip)",
+ "--rules=$(location //external:vnames_config)",
+ "--scoped=true",
+ "--source='\\.rs$$'",
+ ],
+ data = ["//external:vnames_config"],
+ extractor = "@io_kythe//kythe/go/extractors/cmd/bazel:extract_kzip",
+ mnemonics = [
+ "Rustc",
+ ],
+ output = "$(ACTION_ID).rust.kzip",
+)
