1
0

feat: update program and cdylib exposed interface

This commit is contained in:
2026-05-27 10:38:45 +08:00
parent 18a55272a3
commit 2c811503a2
4 changed files with 174 additions and 75 deletions

View File

@@ -126,7 +126,7 @@ fn run_ext_unlink(
for index in exts {
program.link_ext(scope, index)?;
}
println!("File extension now is unlinked.");
Ok(())
}
@@ -139,9 +139,12 @@ fn run_ext_list(
// Fetch info
let mut ext_list: HashMap<String, Option<String>> = HashMap::new();
for index in 0..program.exts_len() {
let ext = program.get_ext(index)?;
let self_ext_status = program.resolve_ext(index)?;
let status = program.query_ext(view, index)?;
ext_list.insert(ext.dotted_inner(), status.map(|s| s.get_name().to_string()));
ext_list.insert(
self_ext_status.get_dotted_ext(),
status.map(|s| s.get_name().to_string()),
);
}
// Output by styles