1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//! # Ristretto VM
//!
//! [](https://codecov.io/gh/theseus-rs/ristretto)
//! [](https://bencher.dev/perf/theseus-rs-ristretto)
//! [](https://github.com/theseus-rs/ristretto#license)
//! [](https://semver.org/spec/v2.0.0.html)
//!
//! Ristretto VM is a Java Virtual Machine implementation written in pure Rust. It executes Java
//! bytecode by interpreting class files loaded through the Ristretto classloader.
//!
//! ## Features
//!
//! - Bytecode interpretation with no dependencies on existing JVM implementations
//! - Pure Rust implementation for memory safety and performance
//! - Support for Java class loading and execution
//! - Configurable VM parameters
//! - Basic JIT compilation capabilities
//!
//! ## Example
//!
//! ```rust,no_run
//! use ristretto_vm::{VM, Configuration, ConfigurationBuilder};
//! use ristretto_classloader::ClassPath;
//!
//! // Create a VM configuration
//! let configuration = ConfigurationBuilder::new()
//! .class_path("/path/to/classes".into())
//! .build()?;
//!
//! // Create the VM instance
//! let mut vm = VM::new(configuration)?;
//!
//! // Execute main method of a class
//! vm.execute_main("com.example.Main", vec![])?;
//! # Ok::<(), ristretto_classfile::Error>(())
//! ```
//!
//! ## Safety
//!
//! This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in 100% safe Rust.
// Disable pedantic clippy lint due to error when running clippy on this crate
// cargo clippyerror: allocating a local array larger than 16384 bytes
// |
// = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_stack_arrays
// note: the lint level is defined here
// --> ristretto_vm/src/lib.rs:25:9
// |
// 25 | #![deny(clippy::pedantic)]
// | ^^^^^^^^^^^^^^^^
// = note: `#[deny(clippy::large_stack_arrays)]` implied by `#[deny(clippy::pedantic)]`
// #![deny(clippy::pedantic)]
pub
pub use ;
pub use ;
pub use Frame;
pub use JavaError;
pub use JavaObject;
pub use LocalVariables;
pub use OperandStack;
pub use ;
pub use Thread;
pub use VM;