How I Shoved a Rust Inference Engine into Six Language Runtimes (and Nobody Got Hurt)
A dev packed a Rust inference engine into six languages — now you can run ML models from Python to PHP, with only a few FFI tears shed.

A developer going by py-teleos decided that Rust alone wasn't enough, so they embedded their inference engine into six language runtimes: Python, Ruby, PHP, Java, Node.js, and Go. It looks like a cross between a hedgehog and an eel, but apparently it works.
How and Why?
The idea is simple: there's a native Rust library that runs machine learning models (like ONNX or custom ones). Around it, the author built wrappers for each of the six languages via FFI, C ABI, and a bit of magic. Now developers can run inference from their favorite language without leaving their comfort zone.
Pros:
- Rust performance (no GC, no slowdown).
- Single engine — fewer chances that the Python model computes differently than the Java one.
- No need to learn Rust if you're writing PHP (though maybe you should).
Cons:
- Wrappers are an extra layer that can bug out.
- If you're a JavaScript fan, get ready to compile the native module for every platform. Welcome to node-gyp hell.
Why This Isn't Just Hype?
Similar projects exist, but this one stands out for its simplicity: everything is open-source, and you can see how the author struggled with FFI. For startups that want to prototype quickly in Python and then ship in production on Go, this saves time. It's also a great example of how Rust is becoming the glue for the whole ecosystem — not just systems programming, but ML too.
METABYTE's take: If you also want to crossbreed Rust with something incompatible but fear it'll all fall apart — we know how to do it painlessly. Just don't try to embed Rust into Excel; we've tried. VBA gets offended. 🤖
NEXT STEP
Liked the approach?
We apply the same principles to client projects: AI, automation, products that don't die after launch.