pub struct Args {Show 14 fields
pub script: Option<PathBuf>,
pub expr: Option<String>,
pub display_ast: bool,
pub dump_bytecode: bool,
pub trace_runtime: bool,
pub trace_runtime_timing: bool,
pub compile_only: bool,
pub no_warnings: bool,
pub extra_nix_paths: Option<Vec<String>>,
pub raw: bool,
pub strict: bool,
pub service_addrs: ServiceUrlsMemory,
pub build_service_addr: String,
pub drv_dumpdir: Option<PathBuf>,
}
Expand description
Provides a CLI interface to trigger evaluation using snix-eval.
Uses configured snix-{ca,}store and snix-build components, and by default a set of builtins similar to these present in Nix.
None of the stores available add to the local /nix/store
location.
The CLI interface is not stable and subject to change.
Fields§
§script: Option<PathBuf>
Path to a script to evaluate
expr: Option<String>
§display_ast: bool
Dump the raw AST to stdout before interpreting
dump_bytecode: bool
Dump the bytecode to stdout before evaluating
trace_runtime: bool
Trace the runtime of the VM
trace_runtime_timing: bool
Capture the time (relative to the start time of evaluation) of all events traced with
--trace-runtime
compile_only: bool
Only compile, but do not execute code. This will make Snix act sort of like a linter.
no_warnings: bool
Don’t print warnings.
extra_nix_paths: Option<Vec<String>>
Additional entries to the Nix expression search path, a colon-separated list of directories
used to resolve <...>
-style lookup paths.
This option may be given multiple times. Paths added through -I take precedence over NIX_PATH.
raw: bool
Print “raw” (unquoted) output.
strict: bool
Strictly evaluate values, traversing them and forcing e.g. elements of lists and attribute sets before printing the return value.
service_addrs: ServiceUrlsMemory
§build_service_addr: String
§drv_dumpdir: Option<PathBuf>
An optional path in which Derivations encountered during evaluation are dumped into, after evaluation. If it doesn’t exist, the directory is created.
Files dumped there are named like they would show up in /nix/store
,
if produced by Nix. Existing files are not overwritten.
This is only for debugging and diffing purposes for post-eval inspection; Snix does not read from these.
Implementations§
Trait Implementations§
Source§impl Args for Args
impl Args for Args
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 CommandFactory for Args
impl CommandFactory for Args
Source§impl FromArgMatches for Args
impl FromArgMatches for Args
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(
&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 Args
impl Parser for Args
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 Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnwindSafe for Args
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request