A java classfile parser written in Rust. Project for learning both Rust and the java classfile structure.
Idea inspired by a video by tsoding.
- Compile java class
javac java/Main.java(Already compiled and included in git repo) - Build:
cargo build - Run:
./target/debug/java-parser ./java/Main.classorcargo run -- ./java/Main.class
- Parse complete file:
- magic;
- minor_version;
- major_version;
- constant_pool_count;
- constant_pool[constant_pool_count-1];
- access_flags;
- this_class;
- super_class;
- interfaces_count;
- interfaces[interfaces_count];
- fields_count;
- fields[fields_count];
- methods_count;
- methods[methods_count];
- attributes_count;
- attributes[attributes_count];
- Command line args instead of hardcoded file
- Create basic JVM?