Skip to main content

NinjaCommand

Enum NinjaCommand 

Source
pub enum NinjaCommand {
    Stage {
        strict: bool,
        json: bool,
    },
    Build {
        glibc: Option<String>,
        release: bool,
        target: Option<String>,
    },
}

Variants§

§

Stage

fmt, lint & test then stage everything in git if all is good

To provide any specfic environment variables for the executed cargo commands create a workspace metadata section in Cargo.toml (if this is a single crate, you can add the section to the crate Cargo.toml without a problem, if it’s a workspace add it to the workspace Cargo.toml). For example:

[workspace.metadata.ninja-xtask]
env = {
    "LD_LIBRARY_PATH" = false,  # unset variable, do not inherit
    "RUSTFLAGS" = "flag"        # set variable, overwriting inherited value
}

Fields

§strict: bool

add –deny warnings to clippy invocations

§json: bool

output in json format

§

Build

build (optionally with zigbuild for a given glibc version)

Fields

§glibc: Option<String>

build for a specific glibc version (WSL-Ubuntu is 2.35)

§release: bool

build a release build (default is cargo’s default profile, usually debug)

§target: Option<String>

build for a given target

Trait Implementations§

Source§

impl From<&NinjaCommand> for CheckFlags

Source§

fn from(xtask: &NinjaCommand) -> Self

Converts to this type from the input type.
Source§

impl FromArgMatches for NinjaCommand

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<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for NinjaCommand

Source§

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

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

fn augment_subcommands_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§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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.