/classfmt

(WIP) Library for parsing Java class files

Primary LanguageRustApache License 2.0Apache-2.0

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(())
}