Skip to main content

SysrootProvider

Trait SysrootProvider 

Source
pub trait SysrootProvider: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn can_provide(&self, target: &TargetTriple, host: &HostInfo) -> bool;
    fn resolve(
        &self,
        target: &TargetTriple,
        host: &HostInfo,
        request: &BuildRequest,
    ) -> Result<SysrootResolution, CrossBuildError>;

    // Provided method
    fn priority(&self) -> i32 { ... }
}
Expand description

A sysroot provider supplies the target sysroot (libc, libstd, crt objects).

Required Methods§

Source

fn name(&self) -> &'static str

Returns the unique name of this provider.

Source

fn can_provide(&self, target: &TargetTriple, host: &HostInfo) -> bool

Checks if this provider can handle the given target on this host.

Source

fn resolve( &self, target: &TargetTriple, host: &HostInfo, request: &BuildRequest, ) -> Result<SysrootResolution, CrossBuildError>

Resolves the sysroot for the target.

Provided Methods§

Source

fn priority(&self) -> i32

Returns the priority of this provider (higher = preferred).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§