mirror of
https://codeberg.org/unspeaker/vestal.git
synced 2025-12-14 06:06:41 +01:00
This commit is contained in:
parent
6bc456c814
commit
07f6f82268
22 changed files with 298 additions and 108 deletions
14
core/src/exports.rs
Normal file
14
core/src/exports.rs
Normal 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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue