Rust build crates.io badge docs.rs badge

nodejs-sys

Bindings for NodeJS' N-API.

Requirements

This crate needs llvm at build-time, since it generates bindings at build-time (by using bindgen).

For Debian/Ubuntu that's a simple apt install llvm libclang-dev.

Features

Different API versions may be selected via feature-flag. See the N-API Version Matrix for details.

Updates

Not all NodeJS Versions change the N-API, so nodejs-sys gets an update only if the relevant headers have been changed between node versions.

See the (autogenerated) changelog for links to detailed upstream commits.

Usage

This crate is very low-level. See neon, they provide N-API Support.

But of course you may also use this crate directly, LogRocket has a nice blog post: Rust and Node.js: A match made in heaven.