Crates.io | hao |
lib.rs | hao |
version | 0.0.3 |
source | src |
created_at | 2022-09-15 04:00:02.688802 |
updated_at | 2023-05-17 05:38:31.88257 |
description | .net binary reader |
homepage | |
repository | https://github.com/pigeonhands/hao |
max_upload_size | |
id | 666288 |
size | 319,497 |
(verb) (-a) to catch in a net, fish (with a net).
Kua taha ngā rā i hao ai i te ika o te moana, o te wai māori. / The days have passed to net the fish of the ocean and fresh water.
A libarary for reading and (eventually) writing .net assembiles and modules in rust.
this example will print out c# code of each type and its fields
use hao::{Module, Result};
fn main() -> Result<()>{
let module = Metadata::from_path(r#"Example.Net.dll"#).unwrap();
for ty in module.types().values() {
println!("{} {{", ty);
for field in ty.fields().values() {
println!("\t{};", field);
}
println!("}}");
}
Ok(())
}
You can see more examples in the example directory of the repository.