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 the Neon CLI.
$ npm install --global neon-cli

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

Crash-Free Memory Management

Neon works together with the JS garbage collector so allocations are always properly managed.

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

Easy Parallelism

Safely run multiple threads, which is easy with convenient Rust 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: