# `fabric-rs-codegen`
[](https://crates.io/crates/fabric-rs-codegen)
[](https://docs.rs/fabric-rs-codegen)
[](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`.