Crates.io | ristretto_classfile |
lib.rs | ristretto_classfile |
version | |
source | src |
created_at | 2024-07-09 05:39:22.431941 |
updated_at | 2024-12-13 01:23:01.982947 |
description | A library for reading, writing and verifying Java classfiles. |
homepage | |
repository | https://github.com/theseus-rs/ristretto |
max_upload_size | |
id | 1296655 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Implementation of the JVM Class File Format that is used to read, write and verify Java classes.
Supports reading and writing class files for any version of Java version up to 24. Verification of class files is supported, but is still a work in progress.
use ristretto_classfile::{ClassFile, ConstantPool, Result, Version};
fn main() -> Result<()> {
let mut constant_pool = ConstantPool::default();
let this_class = constant_pool.add_class("Foo")?;
let class_file = ClassFile {
version: Version::Java21 { minor: 0 },
constant_pool,
this_class,
..Default::default()
};
class_file.verify()
}
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in 100% safe Rust.
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.