| Crates.io | jdescriptor |
| lib.rs | jdescriptor |
| version | 0.2.0 |
| created_at | 2025-02-12 20:56:19.905003+00 |
| updated_at | 2025-02-13 10:53:57.811313+00 |
| description | Java Bytecode Descriptor Parser for Rust |
| homepage | https://github.com/hextriclosan/rusty-jvm |
| repository | https://github.com/hextriclosan/rusty-jvm |
| max_upload_size | |
| id | 1553477 |
| size | 25,915 |
Effortlessly parse and manipulate Java bytecode descriptors in Rust.
This crate provides a lightweight, efficient, and easy-to-use solution for working with Java class, field, and method descriptors.
To use it, add the following lines to your Cargo.toml file:
[dependencies]
jdescriptor = "0.2.0"
✅ Parse Java Method Signatures – Extract return types, parameters, and more from JVM bytecode descriptors.
✅ Ultra-Lightweight – Zero dependencies and minimal runtime overhead.
✅ Rust & Java Interoperability – Perfect for Rust tools interacting with Java class files.
✅ Beyond Classfiles – Useful for RPC, static analysis, IDE plugins, serialization, and more!
✅ Optimized for Performance – Designed to handle large-scale descriptor processing efficiently.
For more details about Java bytecode descriptors, check out the relevant sections in the Java Virtual Machine Specification (JVMS):
Field Descriptors: Section 4.3.2
Method Descriptors: Section 4.3.3
let parsed: TypeDescriptor = "[[Ljava/lang/String;".parse().unwrap();
println!("Rust representation: {:?}", parsed); // Array(Object("java/lang/String"), 2)
println!("Java representation: {}", parsed); // [[Ljava/lang/String;
let parsed: MethodDescriptor = "(FIB)S".parse().unwrap();
println!("Rust structure: {:?}", parsed); // MethodDescriptor { parameter_types: [Float, Integer, Byte], return_type: Short }
println!("Java representation: {}", parsed); // (FIB)S
.class files and analyze type and method signatures.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.