use std::path::PathBuf;
use crate::{ExportRecord, LibId, LibManifest, Symbol};
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum LibSourceSpec {
Symbol(Symbol),
Path(PathBuf),
Url(String),
Bytes(Vec<u8>),
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct LibBootDependency {
pub lib_id: LibId,
pub symbol: Symbol,
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct LibBootReceipt {
pub lib_id: LibId,
pub requested_source: LibSourceSpec,
pub resolved_source: LibSourceSpec,
pub manifest: LibManifest,
pub dependencies: Vec<LibBootDependency>,
pub exports: Vec<ExportRecord>,
}
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct RegistryBootState {
pub receipts: Vec<LibBootReceipt>,
}
impl RegistryBootState {
pub fn new(receipts: Vec<LibBootReceipt>) -> Self {
Self { receipts }
}
}