Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/project-model/src/lib.rs')
-rw-r--r--crates/project-model/src/lib.rs19
1 files changed, 18 insertions, 1 deletions
diff --git a/crates/project-model/src/lib.rs b/crates/project-model/src/lib.rs
index 2dd9c54e0c..1913db11fa 100644
--- a/crates/project-model/src/lib.rs
+++ b/crates/project-model/src/lib.rs
@@ -16,7 +16,24 @@
//! * Lowering of concrete model to a [`base_db::CrateGraph`]
pub mod project_json;
-pub mod toolchain_info;
+pub mod toolchain_info {
+ pub mod rustc_cfg;
+ pub mod target_data_layout;
+ pub mod target_triple;
+
+ use std::path::Path;
+
+ use crate::{ManifestPath, Sysroot};
+
+ #[derive(Copy, Clone)]
+ pub enum QueryConfig<'a> {
+ /// Directly invoke `rustc` to query the desired information.
+ Rustc(&'a Sysroot, &'a Path),
+ /// Attempt to use cargo to query the desired information, honoring cargo configurations.
+ /// If this fails, falls back to invoking `rustc` directly.
+ Cargo(&'a Sysroot, &'a ManifestPath),
+ }
+}
mod build_dependencies;
mod cargo_workspace;