Struct simics_package::package::Package
source · pub struct Package {
pub spec: PackageSpec,
pub target_profile_dir: PathBuf,
}
Expand description
A package, which is built from a specification written in a cargo manifest and a set of artifacts pulled from the target profile directory
Fields§
§spec: PackageSpec
The specification, which is written in [package.metadata.simics] in the crate manifest of the crate to package
target_profile_dir: PathBuf
The target profile directory from which to pull artifacts and output the built package
Implementations§
source§impl Package
impl Package
sourcepub const INNER_PACKAGE_FILENAME: &'static str = "package.tar.gz"
pub const INNER_PACKAGE_FILENAME: &'static str = "package.tar.gz"
The name of the inner package file which decompresses to the package directory
sourcepub const METADATA_FILENAME: &'static str = "ispm-metadata"
pub const METADATA_FILENAME: &'static str = "ispm-metadata"
The name of the file containing metadata for ISPM to use when installing the package
sourcepub const ADDON_TYPE: &'static str = "addon"
pub const ADDON_TYPE: &'static str = "addon"
The name of an addon package type
sourcepub const COMPRESSION_LEVEL: u32 = 6u32
pub const COMPRESSION_LEVEL: u32 = 6u32
Default level used by simics
sourcepub fn from_subcommand(subcommand: &Subcommand) -> Result<Self>
pub fn from_subcommand(subcommand: &Subcommand) -> Result<Self>
Instantiate a package from a cargo subcommand input, which is parsed from command line arguments
sourcepub fn package_dirname(&self) -> Result<String>
pub fn package_dirname(&self) -> Result<String>
Construct the directory name of the package after expansion. It is an error to build a Rust crate package into any type other than an addon package (simics base is not a Rust package)
sourcepub fn full_package_name(&self) -> String
pub fn full_package_name(&self) -> String
Construct the full package name, which includes the host directory name
sourcepub fn package_name(&self) -> String
pub fn package_name(&self) -> String
Construct the package name, which is the package number and version, without an extension
sourcepub fn package_name_with_host(&self) -> String
pub fn package_name_with_host(&self) -> String
Construct the package name with the host directory name
sourcepub fn package_filename(&self) -> String
pub fn package_filename(&self) -> String
Construct the filename for the output of this ISPM package
sourcepub fn set_header_common(header: &mut Header) -> Result<()>
pub fn set_header_common(header: &mut Header) -> Result<()>
Set common options on a tar header. On Unix, the modified time is set to the current time and the uid/gid are set to the current user.
sourcepub fn create_inner_tarball(&self) -> Result<(Vec<u8>, usize)>
pub fn create_inner_tarball(&self) -> Result<(Vec<u8>, usize)>
Create the inner package.tar.gz tarball which expands to the simics package.
sourcepub fn create_tarball(&self) -> Result<Vec<u8>>
pub fn create_tarball(&self) -> Result<Vec<u8>>
Create the outer tarball (actually an ISPM package) containing the inner package and a metadata file used by ISPM
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)