pub enum Command<E: Extension> {
Backend(BackendOptions<E>),
Extract {
names: Vec<String>,
packages: Vec<String>,
dry_run: bool,
verbose: u8,
hermeticity: CargoHermeticityOptions,
},
JSON {
output_file: PathOrDash,
kind: Vec<ExportBodyKind>,
use_ids: bool,
include_extra: bool,
},
Serialize {
kind: Vec<ExportBodyKind>,
backend: Option<BackendName>,
},
Tools(ToolsCommand),
CliExtension(E::Command),
}Variants§
Backend(BackendOptions<E>)
Translate to a backend. The translated modules will be written
under the directory <PKG>/proofs/<BACKEND>/extraction, where
<PKG> is the translated cargo package name and <BACKEND>
the name of the backend.
Extract
Run the proof scenarios declared in hax.toml ([scenario.<name>]
tables): named, complete extraction configurations. Without names,
every scenario in scope runs. Scenarios run sequentially; a failing
scenario does not abort the run, failures are reported in a summary
and produce a non-zero exit code.
Fields
names: Vec<String>The scenarios to run. Each name selects every scenario with that name in scope. Absent, every scenario in scope runs.
packages: Vec<String>Restrict the scope to the scenarios extracting the given package. May be repeated.
dry_run: boolPrint the resolved invocations, including the arguments compiled from the scenarios, without running them.
hermeticity: CargoHermeticityOptionsJSON
Export directly as a JSON file
Fields
output_file: PathOrDashPath to the output JSON file, “-” denotes stdout.
kind: Vec<ExportBodyKind>Whether the bodies are exported as THIR, built MIR, const
MIR, or a combination. Repeat this option to extract a
combination (e.g. -k thir -k mir-built). Pass --kind
alone with no value to disable body extraction.
Serialize
Serialize to a haxmeta file, the internal binary format used by hax to
store the ASTs produced by the hax exporter.
Fields
kind: Vec<ExportBodyKind>Whether the bodies are exported as THIR, built MIR, const
MIR, or a combination. Repeat this option to extract a
combination (e.g. -k thir -k mir-built). Pass --kind
alone with no value to disable body extraction.
backend: Option<BackendName>When extracting to a given backend, the exporter is called with different cfg options.
This option allows to set the same flags as cargo hax into would pick.
Tools(ToolsCommand)
Manage the external tools hax depends on (e.g. charon and aeneas).
CliExtension(E::Command)
Implementations§
Source§impl<E: Extension> Command<E>
impl<E: Extension> Command<E>
pub fn body_kinds(&self) -> Vec<ExportBodyKind>
pub fn backend_name(&self) -> Option<BackendName>
Trait Implementations§
Source§impl<'de, E> Deserialize<'de> for Command<E>
impl<'de, E> Deserialize<'de> for Command<E>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<E: Extension> FromArgMatches for Command<E>
impl<E: Extension> FromArgMatches for Command<E>
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, 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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl<E: Extension + JsonSchema> JsonSchema for Command<E>
impl<E: Extension + JsonSchema> JsonSchema for Command<E>
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl<E: Extension> NormalizePaths for Command<E>
impl<E: Extension> NormalizePaths for Command<E>
fn normalize_paths(&mut self)
Source§impl<E: Extension> Subcommand for Command<E>
impl<E: Extension> Subcommand for Command<E>
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandimpl<E: Eq + Extension> Eq for Command<E>
impl<E: Extension> StructuralPartialEq for Command<E>
Auto Trait Implementations§
impl<E> Freeze for Command<E>
impl<E> RefUnwindSafe for Command<E>
impl<E> Send for Command<E>
impl<E> Sync for Command<E>
impl<E> Unpin for Command<E>
impl<E> UnwindSafe for Command<E>
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> 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