| Crates.io | mokapot |
| lib.rs | mokapot |
| version | 0.24.2 |
| created_at | 2023-08-07 10:07:20.699475+00 |
| updated_at | 2025-12-24 14:38:35.717955+00 |
| description | A library for analyzing and manipulating JVM bytecode |
| homepage | |
| repository | https://github.com/henryhchchc/mokapot |
| max_upload_size | |
| id | 937802 |
| size | 651,383 |
MokaPot is a Rust library for working with JVM bytecode. You can use it to parse, inspect, and analyze Java class files.
Main features:
To add MokaPot to your project, run:
cargo add mokapot
To use the latest commit from GitHub:
cargo add --git https://github.com/henryhchchc/mokapot.git mokapot
cargo update
use mokapot::jvm::class::Class;
use std::fs::File;
fn parse_class_file(path: &str) -> Result<Class, Box<dyn std::error::Error>> {
let mut file = File::open(path)?;
let class = Class::from_reader(&mut file)?;
Ok(class)
}
See the examples directory for more code samples.
MokaIR is an intermediate representation of JVM bytecode in this library. See docs/MokaIR.md for details.
See the project repository for contributing guidelines.
MIT License. See LICENSE for details.