https://github.com/pigeonhands/hao
Reads and writes .NET assemblies and modules in rust (WIP)
https://github.com/pigeonhands/hao
Last synced: 27 days ago
JSON representation
Reads and writes .NET assemblies and modules in rust (WIP)
- Host: GitHub
- URL: https://github.com/pigeonhands/hao
- Owner: pigeonhands
- Created: 2023-04-28T06:17:20.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-06T01:22:09.000Z (almost 2 years ago)
- Last Synced: 2025-05-01T06:17:31.881Z (about 1 month ago)
- Language: Rust
- Homepage:
- Size: 1.51 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
hao
=======(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.[![github-badge]][github-link]
[![crates-hao-badge]][crates-hao]
[![docs][docs-hao-badge]][docs-hao]
![License][license-badge][license-badge]:https://img.shields.io/crates/l/hao.svg?style=for-the-badge
[github-badge]: https://img.shields.io/badge/github-pigeonhands/hao-8da0cb?style=for-the-badge&labelColor=555555&logo=github
[github-link]: https://github.com/pigeonhands/hao
[actions-badge]: https://img.shields.io/github/actions/workflow/status/pigeonhands/hao/ci.yml?branch=master&style=for-the-badge
[actions-url]: https://github.com/pigeonhands/hao/actions
[crates-hao-badge]: https://img.shields.io/crates/v/hao.svg?style=for-the-badge&color=fc8d62&logo=rust
[crates-hao]: https://crates.io/crates/hao
[docs-hao-badge]: https://img.shields.io/badge/docs.rs-hao-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs
[docs-hao]: https://docs.rs/hao-----
A libarary for reading and (eventually) writing .net assembiles and modules in rust.
## Example
this example will print out c# code of each type and its fields
```rust
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](https://github.com/pigeonhands/hao/tree/master/examples) directory of the repository.