Skip to main content

Crate hao

Crate hao 

Source
Expand description

hao reads, edits, creates and writes .NET assemblies.

The entry point is Module:

use hao::Module;

let module = Module::from_path("Example.dll").unwrap();

for ty in module.all_types() {
    let ty = ty.get();
    println!("{}", ty.full_name());
    for method in &ty.methods {
        println!("\t{}", method.get().name);
    }
}

Modules are written with Module::write, which rebuilds the metadata from the entries.

Entries are backed by Rc<RefCell<_>>, or Arc<RwLock<_>> with the sync feature.

Loading is strict: malformed metadata is an error rather than being skipped.

Re-exports§

pub use dotnet::module::resolver;
pub use dotnet::Module;

Modules§

dotnet
error
io
sync
Shared ownership primitives. Rc/RefCell by default, Arc/RwLock with the sync feature.