Struct CliOpts

Source
pub struct CliOpts {
Show 32 fields pub ullbc: bool, pub lib: bool, pub bin: Option<String>, pub mir_promoted: bool, pub mir_optimized: bool, pub input_file: Option<PathBuf>, pub read_llbc: Option<PathBuf>, pub dest_dir: Option<PathBuf>, pub dest_file: Option<PathBuf>, pub use_polonius: bool, pub skip_borrowck: bool, pub no_code_duplication: bool, pub monomorphize: bool, pub extract_opaque_bodies: bool, pub translate_all_methods: bool, pub include: Vec<String>, pub opaque: Vec<String>, pub exclude: Vec<String>, pub remove_associated_types: Vec<String>, pub hide_marker_traits: bool, pub start_from: Vec<String>, pub no_cargo: bool, pub rustc_args: Vec<String>, pub cargo_args: Vec<String>, pub abort_on_error: bool, pub error_on_warnings: bool, pub no_serialize: bool, pub print_original_ullbc: bool, pub print_ullbc: bool, pub print_built_llbc: bool, pub print_llbc: bool, pub no_merge_goto_chains: bool,
}

Fields§

§ullbc: bool

Extract the unstructured LLBC (i.e., don’t reconstruct the control-flow)

§lib: bool

Compile the package’s library

§bin: Option<String>

Compile the specified binary

§mir_promoted: bool

Extract the promoted MIR instead of the built MIR

§mir_optimized: bool

Extract the optimized MIR instead of the built MIR

§input_file: Option<PathBuf>

The input file (the entry point of the crate to extract). This is needed if you want to define a custom entry point (to only extract part of a crate for instance).

§read_llbc: Option<PathBuf>

Read an llbc file and pretty-print it. This is a terrible API, we should use subcommands.

§dest_dir: Option<PathBuf>

The destination directory. Files will be generated as <dest_dir>/<crate_name>.{u}llbc, unless dest_file is set. dest_dir defaults to the current directory.

§dest_file: Option<PathBuf>

The destination file. By default <dest_dir>/<crate_name>.llbc. If this is set we ignore dest_dir.

§use_polonius: bool

If activated, use Polonius’ non-lexical lifetimes (NLL) analysis. Otherwise, use the standard borrow checker.

§skip_borrowck: bool

If activated, this skips borrow-checking of the crate.

§no_code_duplication: bool§monomorphize: bool

Monomorphize the code, replacing generics with their concrete types.

§extract_opaque_bodies: bool

Usually we skip the bodies of foreign methods and structs with private fields. When this flag is on, we don’t.

§translate_all_methods: bool

Usually we skip the provided methods that aren’t used. When this flag is on, we translate them all.

§include: Vec<String>

Whitelist of items to translate. These use the name-matcher syntax.

§opaque: Vec<String>

Blacklist of items to keep opaque. These use the name-matcher syntax.

§exclude: Vec<String>

Blacklist of items to not translate at all. These use the name-matcher syntax.

§remove_associated_types: Vec<String>

List of traits for which we transform associated types to type parameters.

§hide_marker_traits: bool

Whether to hide the Sized, Sync, Send and Unpin marker traits anywhere they show up.

§start_from: Vec<String>

A list of item paths to use as starting points for the translation. We will translate these items and any items they refer to, according to the opacity rules. When absent, we start from the path crate (which translates the whole crate).

§no_cargo: bool

Do not run cargo; instead, run the driver directly.

§rustc_args: Vec<String>

Extra flags to pass to rustc.

§cargo_args: Vec<String>

Extra flags to pass to cargo. Incompatible with --no-cargo.

§abort_on_error: bool

Panic on the first error. This is useful for debugging.

§error_on_warnings: bool

Print the errors as warnings

§no_serialize: bool§print_original_ullbc: bool§print_ullbc: bool§print_built_llbc: bool§print_llbc: bool§no_merge_goto_chains: bool

Implementations§

Source§

impl CliOpts

Source

pub fn validate(&self)

Check that the options are meaningful

Trait Implementations§

Source§

impl Args for CliOpts

Source§

fn group_id() -> Option<Id>

Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
Source§

impl Clone for CliOpts

Source§

fn clone(&self) -> CliOpts

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CliOpts

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CliOpts

Source§

fn default() -> CliOpts

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CliOpts

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl FromArgMatches for CliOpts

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Serialize for CliOpts

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<I, T> ExtractContext<I, ()> for T

§

fn extract_context(self, _original_input: I)

Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<I> RecreateContext<I> for I

§

fn recreate_context(_original_input: I, tail: I) -> I

Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,