1 # Copyright 2023 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # @generated from third_party/rust/BUILD.gn.hbs by tools/crates/gnrt.
8 import("//build/rust/cargo_crate.gni")
11 {{#if this.1.concrete}}
12 cargo_crate("{{this.0}}") {
13 {{#with this.1.concrete}}
15 crate_name = "{{crate_name}}"
20 crate_type = "{{crate_type}}"
21 {{#unless public_visibility}}
23 # Only for usage from third-party crates. Add the crate to
24 # third_party.toml to use it from first-party code.
25 visibility = [ "//third_party/rust/*" ]
27 crate_root = "{{crate_root}}"
39 # Unit tests skipped. Generate with --with-tests to include them.
40 build_native_rust_unit_tests = false
41 edition = "{{edition}}"
42 cargo_pkg_version = "{{cargo_pkg_version}}"
43 {{#with cargo_pkg_authors}}
44 cargo_pkg_authors = "{{this}}"
46 cargo_pkg_name = "{{cargo_pkg_name}}"
47 {{#with cargo_pkg_description}}
48 cargo_pkg_description = "{{gn_escape this}}"
50 library_configs -= [ "//build/config/compiler:chromium_code" ]
51 library_configs += [ "//build/config/compiler:no_chromium_code" ]
52 executable_configs -= [ "//build/config/compiler:chromium_code" ]
53 executable_configs += [ "//build/config/compiler:no_chromium_code" ]
60 {{#each this.packages}}
61 "//third_party/rust/{{this.name}}/{{this.epoch}}:lib",
67 {{#each this.packages}}
68 "//third_party/rust/{{this.name}}/{{this.epoch}}:lib",
76 {{#each aliased_deps}}
77 {{this.0}} = "{{this.1}}"
84 {{#each this.packages}}
85 "//third_party/rust/{{this.name}}/{{this.epoch}}:buildrs_support",
91 {{#each this.packages}}
92 "//third_party/rust/{{this.name}}/{{this.epoch}}:buildrs_support",
106 build_root = "{{build_root}}"
108 {{#each build_script_sources}}
112 {{#with build_script_inputs}}
113 build_script_inputs = [
119 {{#with build_script_outputs}}
120 build_script_outputs = [
142 output_dir = "{{output_dir}}"
148 group("{{this.0}}") {
149 {{#with this.1.group}}
150 public_deps = [":{{concrete_target}}"]