Rust Node

Don’t Let Node Plugins Scare You!

Neon makes writing native Node.js modules safe and fun, so you can hack without fear.

(Work in progress! See the safety checklist issue to track our progress.)

# Install Rust.
$ curl -sSf | sh

# Install the Neon CLI.
$ npm install --global neon-cli

# Create a new project!
$ neon new my-project

Crash-Free Memory Management

Neon integrates with the V8 garbage collector automatically and safely, so memory handles are always properly tracked.

fn hello(call: Call) → JsResult<JsString> {
    // safely tracked throughout this function!
    let val = JsString::new(call.scope, "hello, Node")

Easy Parallelism

Safely run multithreaded Rust, which is easy with convenient parallel APIs like Rayon.

lines.into_par_iter()             // iterate in parallel
     .map(|line| wc(line, word))  // count words for each
     .sum()                       // calculate the total

Learn More

Neon is a work in progress. Watch this talk to learn more about the state of the project: