pub struct CompileOpts {Show 23 fields
pub input: Vec<String>,
pub import_remappings: Vec<ImportRemapping>,
pub base_path: Option<PathBuf>,
pub include_paths: Vec<PathBuf>,
pub allow_paths: Vec<PathBuf>,
pub language: Language,
pub threads: Threads,
pub evm_version: EvmVersion,
pub stop_after: Option<CompilerStage>,
pub optimization: OptimizationMode,
pub out_dir: Option<PathBuf>,
pub emit: Vec<CompilerOutput>,
pub standard_json: bool,
pub color: ColorChoice,
pub verbose: bool,
pub pretty_json: bool,
pub pretty_json_err: bool,
pub error_format: ErrorFormat,
pub error_format_human: HumanEmitterKind,
pub diagnostic_width: Option<usize>,
pub no_warnings: bool,
pub allow: Vec<String>,
pub unstable: UnstableOpts,
/* private fields */
}cli only.Expand description
Compilation configuration.
Fields§
§input: Vec<String>Files to compile, or import remappings.
- specifies standard input.
In Standard JSON mode, no input or - reads from standard input; otherwise, exactly one
input file may be specified.
Import remappings are specified as [context:]prefix=path.
See https://docs.soliditylang.org/en/latest/path-resolution.html#import-remapping.
import_remappings: Vec<ImportRemapping>Import remappings.
This is either added manually when constructing the session or parsed from input into
this field.
See https://docs.soliditylang.org/en/latest/path-resolution.html#import-remapping.
base_path: Option<PathBuf>Use the given path as the root of the source tree.
include_paths: Vec<PathBuf>Directory to search for files.
Can be used multiple times.
allow_paths: Vec<PathBuf>Allow a given path for imports.
language: LanguageSource code language. Only Solidity is currently implemented.
threads: ThreadsNumber of threads to use. Zero specifies the number of logical cores.
evm_version: EvmVersionEVM version.
stop_after: Option<CompilerStage>Stop execution after the given compiler stage.
optimization: OptimizationModeMIR optimization objective.
out_dir: Option<PathBuf>Directory to write output files.
emit: Vec<CompilerOutput>Comma separated list of types of output for the compiler to emit.
standard_json: boolSwitch to Standard JSON input/output mode.
color: ColorChoiceColoring.
verbose: boolUse verbose output.
pretty_json: boolPretty-print JSON output.
Does not include errors. See --pretty-json-err.
pretty_json_err: boolPretty-print error JSON output.
error_format: ErrorFormatHow errors and other messages are produced.
error_format_human: HumanEmitterKindHuman-readable error message style.
diagnostic_width: Option<usize>Terminal width for error message formatting.
no_warnings: boolWhether to disable warnings.
allow: Vec<String>Comma separated list of diagnostic codes to allow.
unstable: UnstableOptsParsed unstable flags.
Implementations§
Source§impl CompileOpts
impl CompileOpts
Sourcepub const fn optimize_mir(&self) -> bool
pub const fn optimize_mir(&self) -> bool
Returns whether MIR optimization passes should run during codegen.
Trait Implementations§
Source§impl Args for CompileOpts
impl Args for CompileOpts
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for CompileOpts
impl Clone for CompileOpts
Source§fn clone(&self) -> CompileOpts
fn clone(&self) -> CompileOpts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CommandFactory for CompileOpts
impl CommandFactory for CompileOpts
Source§impl Debug for CompileOpts
impl Debug for CompileOpts
Source§impl Default for CompileOpts
impl Default for CompileOpts
Source§fn default() -> CompileOpts
fn default() -> CompileOpts
Source§impl FromArgMatches for CompileOpts
impl FromArgMatches for CompileOpts
Source§fn from_arg_matches(
__clap_arg_matches: &ArgMatches,
) -> Result<CompileOpts, Error>
fn from_arg_matches( __clap_arg_matches: &ArgMatches, ) -> Result<CompileOpts, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<CompileOpts, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<CompileOpts, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for CompileOpts
impl Parser for CompileOpts
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for CompileOpts
impl RefUnwindSafe for CompileOpts
impl Send for CompileOpts
impl Sync for CompileOpts
impl Unpin for CompileOpts
impl UnsafeUnpin for CompileOpts
impl UnwindSafe for CompileOpts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more