mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 02:43:24 +00:00
Implement OSDK functionalities and opt-in OSDK for asterinas
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
bc9bce9dea
commit
f97d0f1260
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use std::{collections::HashMap, fs::File, io::Read, ops::Add, process::Command, str::FromStr};
|
||||
use std::{collections::HashMap, fs::File, io::Read, ops::Add, path::PathBuf, process::Command, str::FromStr};
|
||||
|
||||
use json::JsonValue;
|
||||
use proc_macro2::{Group, TokenStream};
|
||||
@ -11,6 +11,7 @@ use crate::COMPONENT_FILE_NAME;
|
||||
#[derive(Debug)]
|
||||
pub struct ComponentInfo {
|
||||
name: String,
|
||||
/// The absolute path to the component
|
||||
path: String,
|
||||
priority: u16,
|
||||
}
|
||||
@ -87,13 +88,14 @@ pub fn component_generate() -> Vec<ComponentInfo> {
|
||||
};
|
||||
let component_info = ComponentInfo {
|
||||
name: package["name"].as_str().unwrap().to_string(),
|
||||
path: path.to_owned(),
|
||||
path: PathBuf::from(&workspace_root).join(path).to_str().unwrap().to_string(),
|
||||
priority: *mapping
|
||||
.get(&package["name"].as_str().unwrap().to_string())
|
||||
.unwrap(),
|
||||
};
|
||||
components_info.push(component_info)
|
||||
}
|
||||
|
||||
components_info
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user