fabric-rs-codegen 0.3.2

Pure-Rust JVM classfile writer, JAR SDK indexer, Rust binding emitter, and Mixin/Subclass bytecode generator for FLR v2
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# `fabric-rs-codegen`

[![crates.io](https://img.shields.io/crates/v/fabric-rs-codegen.svg)](https://crates.io/crates/fabric-rs-codegen)
[![docs.rs](https://docs.rs/fabric-rs-codegen/badge.svg)](https://docs.rs/fabric-rs-codegen)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/MSDOS-N/FLR/blob/main/LICENSE)

Pure-Rust JVM bytecode synthesizer, JAR SDK indexer, and Rust binding generator for [**FLR v2**](https://github.com/MSDOS-N/FLR).

## Modules

- **`jvm_writer`**: Complete pure-Rust JVM `.class` file serializer (`ClassWriter`, `CodeWriter`, `MethodWriter`, `FieldWriter`, annotations, constant pool, and full `StackMapTable` frame generation passing `java -Xverify:all`).
- **`class_reader`**: Fast JVM classfile parser used both to index Minecraft / Fabric JARs into `.flridx` (`build_sdk_index_from_jars`) and to relocate precompiled loader templates (`relocate_class_bytes`).
- **`bootstrap_gen`**: Generates isolated `dev/fabricrs/mod_<clean_id>/RustBootstrap.class`, `FlrLoader.class` (`FlrRuntimeLoader` or `FlrThinLoader`), and `NativeBridge.class`.
- **`mixin_gen` & `subclass_gen`**: Emits Mixin classes, `MixinTrampolines`, `*.mixins.json`, `*.refmap.json`, custom Java subclass `.class` files, `flrSuper_*` `invokespecial` super bridges, and `SubclassTrampolines`.
- **`rust_emitter`**: Generates typed Rust wrapper structs (`emit_rust_binding`) powering `bind_class!` and `cargo fabric bindings`.