← Назад к ресурсам

Oxidizium

Rewrites parts of Minecraft in Rust Lang

Modrinth cursed game-mechanics optimization

Описание

# Oxidizium - Inject Ferris into your server! 🦀 --- ## Summary This Fabric mod replaces certain Minecraft Java Edition methods with native rust equivalents. Every rust function is tested with the in-house testing utility to ensure that it is functionally equal to vanilla Minecraft. This mod is intended to be used server-side, but can be used on the client (with minor rendering bugs). Currently, this mod replaces the following Java classes with Rust: - MathHelper Many more classes are planned in the future, however mostly low-level classes will be tackled in the beginning. --- ## Compatibility As of now, Oxidizium is very compatible with the majority of mods, with specific compatibility with Lithium. Feel free to PR any of your own Rust native code! --- ## Backends Oxidizium comes with 3 backends by default: Panama, Nalim, and Membrane. The backend will be in the jar and mod name. Each backend is slightly different, so read about them below: ### Project Panama Project Panama is a Java 22+ feature that allows for low latency native code execution. This works on any Minecraft version from 1.14.3 to modern MC. #### Usage **You must install Java 22 or above to use Project Panama!** The following JVM arguments are recommended, but not *currently* required for Java 25 and below: `--enable-preview --enable-native-access=ALL-UNNAMED` Using a newer Java version is likely to improve performance more than Java 22. I recommend using [GraalVM](https://www.graalvm.org/downloads/) for the best performance, however be warned that it is possible (though very unlikely) that GraalVM could break mods. Use a distribution such as [Temurin](https://adoptium.net/) if you want to be completely safe. ### Nalim Nalim is a 3rd-party library that enables near-native latency when executing native code. It is roughly 3x faster than Project Panama for leaf (quick) calls and was ~50x faster vs pre-FFM Panama on JDK 19, per the [Nalim README](https://github.com/apangin/nalim#performance). Nalim historically broke on Java 21+ because Loom [JEP 444](https://openjdk.org/jeps/444) made the JVMCI nmethod entry barrier mandatory for every GC. Oxidizium ships a [Nalim jar patched by FurryMileon](https://github.com/FurryMileon/nalim) that emits a "no-op" barrier sequence after the tail-call so JVMCI validation passes without any runtime overhead — the barrier bytes are dead code (placed after `jmp rax` / `br x9`). #### Usage The following JVM arguments are **required** to run Nalim: `-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI` ### Membrane Membrane works similar to Nalim, though may not be as affective as Nalim (benchmarks soon). It is an **experimental** backend and is not recommended to be used in production. Like Nalim, it used to require Java 20 and below, but thanks to an included [patched Membrane jar by QPCrummer](https://github.com/QPCrummer/MembraneFFI), it works great in all Minecraft versions using Java 21 and 25! #### Usage The following JVM arguments are **required** to run Membrane: `-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI` The following JVM argument is **recommended**, but not required yet: `-XX:+EnableDynamicAgentLoading`