O'Reilly logo

Mastering Rust by Vesa Kaihlavirta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JavaScript/Node.js and Neon

The neon library present at http://neon.rustbridge.io/, contains an abstraction layer and assorted tools for writing Rust that behaves like a native Node.js module. It's partially written in JavaScript: there's a command-line program, neon, in the neon-cli package, a JavaScript side support library, and a Rust side support library. Node.js itself has good support for loading native modules, and neon uses that same support.

Following through these examples requires Node.js to be installed locally and its package manager npm to be found along the path. The command-line support tool, neon-cli, itself is installed via npm by running this command:

npm install neon-cli 

You may opt for installing neon-cli globally by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required