classfmt

Crates.ioclassfmt
lib.rsclassfmt
version0.5.1
sourcesrc
created_at2021-02-25 20:20:17.842304
updated_at2021-05-18 11:18:36.225039
descriptionA library for parsing Java class files
homepage
repositoryhttps://github.com/chickenbreeder/classfmt
max_upload_size
id360680
size68,718
(chickenbreeder)

documentation

https://docs.rs/classfmt

README

classfmt

(This is not even remotely production-ready)

A library for parsing Java class files.

use std::{fs::File, io, io::Read, path::Path};

use classfmt::ClassParser;

fn main() -> io::Result<()> {
    let mut f = File::open(Path::new("./tests/Fields.class"))?;
    let mut buf = Vec::with_capacity(64);
    f.read_to_end(&mut buf)?;

    let class = ClassParser::from_bytes(&buf).parse().unwrap();

    println!("{:#?}", class);
    Ok(())
}
Commit count: 31

cargo fmt