Skip to main content

Crit

Struct Crit 

Source
pub struct Crit {
    pub debug: Option<bool>,
    pub banner: Option<String>,
    pub rustflags: Option<BTreeMap<String, String>>,
    pub feature_excludes: Option<Vec<String>>,
    pub cross_args: Option<Vec<String>>,
    pub arch: Vec<String>,
    pub vendor: Vec<String>,
    pub os: Vec<String>,
    pub abi: Vec<String>,
    pub target_excludes: Option<Vec<String>>,
    pub binary_extensions: Option<Vec<String>>,
    /* private fields */
}
Expand description

Crit models a multiplatform build operation.

Fields§

§debug: Option<bool>

debug enables additional logging.

§banner: Option<String>

banner denotes an optional parent directory prefix (e.g. “hello-1.0”).

§rustflags: Option<BTreeMap<String, String>>

rustflags maps target triple patterns to custom RUSTFLAGS settings (default: $RUSTFLAGS).

§feature_excludes: Option<Vec<String>>

feature_excludes skips matching features.

§cross_args: Option<Vec<String>>

cross_args forwards additional flags to cross.

§arch: Vec<String>

arch collects enabled chipets.

§vendor: Vec<String>

vendor collects enabled vendors.

§os: Vec<String>

os collects enabled operating systems.

§abi: Vec<String>

abi collects enabled chipset/libc variants.

§target_excludes: Option<Vec<String>>

target_excludes skips targets.

§binary_extensions: Option<Vec<String>>

binary_extensions selects file extensions to collate (default: DEFAULT_BINARY_EXTENSIONS).

Implementations§

Source§

impl Crit

Source

pub fn load(pth: &str) -> Result<Self, CritError>

load generates a Crit.

Source

pub fn update_targets(&mut self) -> Result<(), CritError>

update_targets refreshes the targets cache.

Source

pub fn build_target( &self, target: &str, bin_dir_path: &Path, ) -> Result<(), CritError>

build_target executes a cross build.

Source

pub fn run(&mut self) -> Result<(), CritError>

run builds targets.

Trait Implementations§

Source§

impl Debug for Crit

Source§

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

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

impl Default for Crit

Source§

fn default() -> Crit

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

impl<'de> Deserialize<'de> for Crit

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 Serialize for Crit

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§

§

impl Freeze for Crit

§

impl RefUnwindSafe for Crit

§

impl Send for Crit

§

impl Sync for Crit

§

impl Unpin for Crit

§

impl UnsafeUnpin for Crit

§

impl UnwindSafe for Crit

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 = 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.
Source§

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