Skip to content

Latest commit

 

History

History
30 lines (27 loc) · 983 Bytes

File metadata and controls

30 lines (27 loc) · 983 Bytes

Java classfile parser (WIP)

A java classfile parser written in Rust. Project for learning both Rust and the java classfile structure.

Idea inspired by a video by tsoding.

Instructions

  1. Compile java class javac java/Main.java (Already compiled and included in git repo)
  2. Build: cargo build
  3. Run: ./target/debug/java-parser ./java/Main.class or cargo run -- ./java/Main.class

TODO

  • 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?