jarit

!!! This crate currently does nothing. This crate exists only to reserve the name

The idea

The idea behind this project is best explained with an example: Let's say you have the Minecraft server.jar. The problem you face is that it has many imperfections, and overall has to deal with garbage collection, single-threading, and sometimes unoptimized code. All of these problems will result in a server that can only host a few hundred players instead of thousands.

To fix this, you could theoretically rewrite the whole jar, but that would take forever. A better approach would instead be to take the jar, decompile it, edit it, and then compile an optimized version of the jar.

For example, take the following method.

java // --snip public void hello_world() { System.out.println("Hello World!"); } // --snip

Once the jar containing this method has been decompiled, jarit can start looking for exactly this method in the specified class with exactly this body. Once this pattern is found, the body or even the whole function can be replaced by a rust function using jni. After all optimizations have been applied, the jar can be compiled and the result will hopefully be an optimized jar.

Why is this crate called jarit?

As described in the Idea section, this crate is intended to be used to edit jar files. So jar + edit = jarit.

Contributing

If you like the idea behind this crate, please consider contributing. Any help is greatly appreciated.

For a concept on how this crate should be structured, see the CONCEPT.md file or concept module.