Skip to content
This repository was archived by the owner on Mar 1, 2019. It is now read-only.

Include more info the rustc invocation/compilation #19

Merged
merged 1 commit into from
Sep 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub struct Analysis {
/// The Config used to generate this analysis data.
pub config: Config,
pub version: Option<String>,
pub compilation: Option<CompilationOptions>,
pub prelude: Option<CratePreludeData>,
pub imports: Vec<Import>,
pub defs: Vec<Def>,
Expand All @@ -53,6 +54,7 @@ impl Analysis {
config,
version: option_env!("CARGO_PKG_VERSION").map(|s| s.to_string()),
prelude: None,
compilation: None,
imports: vec![],
defs: vec![],
impls: vec![],
Expand Down Expand Up @@ -115,6 +117,16 @@ pub struct SpanData {
pub column_end: span::Column<span::OneIndexed>,
}

#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))]
#[derive(Debug, Clone)]
pub struct CompilationOptions {
pub directory: PathBuf,
pub program: String,
pub arguments: Vec<String>,
pub output: PathBuf,
}

#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))]
#[derive(Debug, Clone)]
Expand Down