chore: restructure and update deps
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
🪞👃🪞 2025-04-06 01:16:30 +03:00
parent 6bc456c814
commit 07f6f82268
22 changed files with 298 additions and 108 deletions

14
core/src/exports.rs Normal file
View file

@ -0,0 +1,14 @@
use crate::*;
impl Module {
/// Collect all exported methods.
pub fn load_exports (self: Arc<Self>) -> Usually<Arc<Self>> {
if self.verbose {
println!(" {DIM}(load-exports){RESET}");
}
let directory = ExportDirectory::parse(self.pe.as_ref())?;
let export_map = directory.get_export_map(self.pe.as_ref())?;
let exports = export_map.into_iter().map(|(k, v)|(k.into(), v)).collect();
*self.exports.write().unwrap() = exports;
Ok(self)
}
}