start on package system
This commit is contained in:
parent
ec87f29c5c
commit
a1f953e989
|
@ -3,6 +3,7 @@ mod frontend;
|
|||
mod literals;
|
||||
mod parser;
|
||||
mod rtlil;
|
||||
mod package;
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
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 }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue