pub struct Rzup { /* private fields */ }Expand description
Rzup manages the RISC Zero toolchain components by handling installation, uninstallation, and version management of various tools like the Rust toolchain and cargo extensions.
Implementations§
Source§impl Rzup
impl Rzup
Sourcepub fn new_with_event_handler(
event_handler: impl Fn(RzupEvent) + Send + Sync + 'static,
) -> Result<Self>
pub fn new_with_event_handler( event_handler: impl Fn(RzupEvent) + Send + Sync + 'static, ) -> Result<Self>
Creates a new Rzup instance using default environment paths, and the given event handler.
Sourcepub fn with_paths_urls_creds_platform_and_event_handler(
risc0_dir: impl Into<PathBuf>,
rustup_dir: impl AsRef<Path>,
cargo_dir: impl AsRef<Path>,
base_urls: BaseUrls,
github_token: Option<String>,
aws_creds_factory: impl Fn() -> Option<AwsCredentials> + Send + Sync + 'static,
private_key_getter: impl Fn() -> Result<PrivateKey> + Send + Sync + 'static,
public_key: PublicKey,
platform: Platform,
event_handler: impl Fn(RzupEvent) + Send + Sync + 'static,
) -> Result<Self>
pub fn with_paths_urls_creds_platform_and_event_handler( risc0_dir: impl Into<PathBuf>, rustup_dir: impl AsRef<Path>, cargo_dir: impl AsRef<Path>, base_urls: BaseUrls, github_token: Option<String>, aws_creds_factory: impl Fn() -> Option<AwsCredentials> + Send + Sync + 'static, private_key_getter: impl Fn() -> Result<PrivateKey> + Send + Sync + 'static, public_key: PublicKey, platform: Platform, event_handler: impl Fn(RzupEvent) + Send + Sync + 'static, ) -> Result<Self>
Creates a new Rzup instance with a custom root directory, base URLs, and GitHub token.
§Arguments
risc0_dir- The root directory path for storing components and settingsrustup_dir- The path to rustup’s home directory (usually ~/.rustup)cargo_dir- The path to cargo’s home directory (usually ~/.cargo)base_urls- The base URLs used to communicate with GitHubgithub_token- The token to use when communicating with GitHubaws_creds_factory- Function which gets credentials for communicating with S3private_key_getter- Function which gets the private key for signing uploadspublic_key- The public key used to verify S3 componentsplatform- The platform of the system which we are installing artifacts forevent_handler- Callback for events that provide progress during rzup operations.
Auto Trait Implementations§
impl Freeze for Rzup
impl !RefUnwindSafe for Rzup
impl Send for Rzup
impl Sync for Rzup
impl Unpin for Rzup
impl !UnwindSafe for Rzup
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.