corretto

Crates.iocorretto
lib.rscorretto
version0.1.0
sourcesrc
created_at2023-10-01 23:53:21.696917
updated_at2023-10-01 23:53:21.696917
descriptionLibrary for installing and finding info about Corretto OpenJDK.
homepage
repositoryhttps://github.com/JohnScience/corretto
max_upload_size
id989509
size13,393
Dmitrii - Demenev (JohnScience)

documentation

https://docs.rs/corretto

README

Library for installing and finding info about Corretto OpenJDK

Crates.io Downloads Documentation License Dependency Status

Get programmatic access to the Corretto OpenJDK distributions.

According to Amazon,

Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK). Corretto comes with long-term support that includes performance enhancements and security fixes. Corretto is certified as compatible with the Java SE standard and is used internally at Amazon for many production services. With Corretto, you can develop and run Java applications on operating systems such as Amazon Linux 2, Windows, and macOS.

Usage

use corretto::{VersionInfo, Version, Os, CpuArch, Ext, JdkDesc, DownloadError};

#[tokio::main]
async fn main() -> Result<(), DownloadError> {
    let version_info = VersionInfo::fetch().await?;
    let latest_lts = version_info.latest_lts();
    let jdk_desc = JdkDesc::new(
        latest_lts,
        CpuArch::X64,
        Os::Linux,
        Ext::TarGz,
    );
    let download_url = jdk_desc.url();
    let path = download_url.download_tmp().await?;
    // ..
    Ok(())
}
Commit count: 6

cargo fmt