ristretto_classfile

Crates.ioristretto_classfile
lib.rsristretto_classfile
version
sourcesrc
created_at2024-07-09 05:39:22.431941
updated_at2024-12-13 01:23:01.982947
descriptionA library for reading, writing and verifying Java classfiles.
homepage
repositoryhttps://github.com/theseus-rs/ristretto
max_upload_size
id1296655
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`
size0
Brian Heineman (brianheineman)

documentation

README

Ristretto ClassFile

ci Documentation Code Coverage Benchmarks Latest version License Semantic Versioning

Getting Started

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.

Examples

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()
}

Safety

This crate uses #![forbid(unsafe_code)] to ensure everything is implemented in 100% safe Rust.

License

Licensed under either of

Contribution

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.

VSCode Development Container
GitHub Codespaces
Commit count: 526

cargo fmt