23 lines
462 B
Rust
23 lines
462 B
Rust
use std::collections::BTreeMap;
|
|
use std::path::PathBuf;
|
|
|
|
struct Package {
|
|
name: String,
|
|
path: PathBuf,
|
|
}
|
|
|
|
struct PackageRegistry {
|
|
packages: BTreeMap<String, Package>
|
|
}
|
|
|
|
impl PackageRegistry {
|
|
fn new() -> Self {
|
|
let mut packages = BTreeMap::new();
|
|
packages.insert("builtins".to_string(), Package {
|
|
name: "builtins".to_string(),
|
|
path: "./lib/builtins/".into(),
|
|
});
|
|
Self { packages }
|
|
}
|
|
}
|