| Crates.io | jclassfile |
| lib.rs | jclassfile |
| version | 0.3.0 |
| created_at | 2025-05-23 21:37:22.187075+00 |
| updated_at | 2025-08-26 14:00:49.293377+00 |
| description | Java class files parser |
| homepage | https://github.com/hextriclosan/rusty-jvm/tree/main/jclassfile |
| repository | https://github.com/hextriclosan/rusty-jvm |
| max_upload_size | |
| id | 1686756 |
| size | 76,196 |
This crate reads and parses Java class files, following the Java Virtual Machine Specification (JVMS), Chapter §4.
While there are other crates with similar functionality, the jclassfile crate stands out for its extensive testing within the rusty-jvm project.
It has been used to parse thousands of OpenJDK standard library classes and is also exercised through numerous integration tests within the project.
The following sections of the Java Virtual Machine Specification (JVMS, Java SE 23 Edition) are implemented:
The ClassFile Structure (§4.1)
The Constant Pool (§4.4)
Fields (§4.5)
Methods (§4.6)
Attributes (§4.7)
Format Checking (§4.8)
Constraints on Java Virtual Machine Code (§4.9)
Verification of class Files (§4.10)
pub fn main() {
let file_content = include_bytes!("HelloWorld.class");
let class_file = jclassfile::class_file::parse(file_content).unwrap();
println!("{:?}", class_file);
}
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License – see the LICENSE file for details.