Geekgineer / needle-rs
Public258 KB WASM runtime for Needle a 26M-parameter tool-calling transformer. Runs in browser, Cloudflare Workers, and Node.js. No backend required.
needle-rs is a pure Rust and WebAssembly runtime for the Needle AI model — a tiny 26-million parameter transformer that maps user questions plus a list of available tools into a precise JSON function call. Everything runs locally on the user's device with no internet connection needed, making it ideal for privacy-sensitive applications. The project supports deploying the same model to web browsers, command-line tools, Python applications, Cloudflare Workers, and even embedded devices. It achieves bit-for-bit accuracy matching the official Python implementation and is released under the MIT open-source license.
How It Works
You learn about needle-rs — a tiny AI model that can figure out which tool or function to call based on a user's question, without sending anything to the cloud.
Depending on where you want to run it, you install with a single command — whether that's in your web project, Python app, or just download the small program.
The model comes to life in under a second — a 26-million parameter brain that fits entirely on your device, no internet required.
It runs directly in JavaScript, keeping all user queries completely private on their own device.
You run it as a simple command, perfect for scripts and automation.
You import it like any other Python library and call it from your code.
You provide a simple list of your functions — like 'get_weather', 'send_email', or 'book_flight' — along with what each one needs.
A user types something like 'What's the weather in Paris?' and needle-rs reads both the question and your tool list to figure out the right call.
The model returns exactly the JSON your code needs — the function name and all arguments filled in correctly, ready to execute.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.