Lines Matching defs:crate
37 // "crate": 1, // index into crate array
48 // "edition": "2021", // edition of crate
53 // "root_module": "absolute path to crate",
54 // "label": "//path/target:value", // GN target for the crate
178 // Add all dependencies of this crate, before this crate.
183 // The index of a crate is its position (0-based) in the list of crates.
186 // Add the target to the crate lookup.
200 Crate crate = Crate(crate_root, gen_dir, crate_id, crate_label,
203 crate.SetCompilerArgs(compiler_args);
205 crate.SetCompilerTarget(compiler_target.value());
210 crate.AddConfigItem("test");
211 crate.AddConfigItem("debug_assertions");
214 crate.AddConfigItem(cfg);
224 crate.SetIsProcMacro(outputs[0]);
229 // invoked by the current crate (so we want to record these for all crates,
235 crate.AddRustenv(parts[0], parts[1]);
239 // Add the rest of the crate dependencies.
242 crate.AddDependency(idx, dep->rust_values().crate_name());
245 crate_list.push_back(crate);
267 for (auto& crate : crate_list) {
273 FilePathToUTF8(build_settings->GetFullPath(crate.root()));
276 << " \"crate_id\": " << crate.index() << "," NEWLINE
278 << " \"label\": \"" << crate.label() << "\"," NEWLINE
283 build_settings->GetFullPath(crate.root().GetDir()))
285 auto gen_dir = crate.gen_dir();
298 auto compiler_target = crate.CompilerTarget();
304 auto compiler_args = crate.CompilerArgs();
308 for (auto& arg : crate.CompilerArgs()) {
323 for (auto& dep : crate.dependencies()) {
329 << " \"crate\": " << dep.first << "," NEWLINE
335 rust_project << " \"edition\": \"" << crate.edition() << "\"," NEWLINE;
337 auto proc_macro_target = crate.proc_macro_path();
348 for (const auto& cfg : crate.configs()) {
362 if (!crate.rustenv().empty()) {
366 for (const auto& env : crate.rustenv()) {
383 rust_project << " }"; // end crate
385 rust_project << NEWLINE " ]" NEWLINE; // end crate list