Registry / devops / neon-cli

neon-cli

JSON →
library0.10.1jsnpmunverified

Official command-line tool for creating, building, and loading native Rust/Node.js modules using the Neon bindings framework. Current stable version is 0.10.1, targeting Node >=8 and N-API. The CLI provides scaffolding and build infrastructure for Neon projects; the core Neon library (separate package) enables high-performance Rust addons with a safe, idiomatic Rust API. Differentiates from napi-rs with a more Rust-centric declarative API and a mature macro-based approach. Release cadence is periodic with major versions (1.0.0-alpha pre-releases available).

npm install neon-cli
INSTALL
IMPORT
SIG · NEON-CLI
N
neon-cli
devopsjavascriptv0.10.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

neon
import { neon } from 'neon-cli'
const neon = require('neon-cli')
The CLI is primarily used as a command-line tool, not imported programmatically. However, if imported, it provides programmatic APIs. Use ESM import syntax.
build
import { build } from 'neon-cli'
const build = require('neon-cli').build
Programmatic build function. Available from v0.10.0+.
load
import { load } from 'neon-cli'
const load = require('neon-cli/build').load
Loads a Neon module into Node.js. Correct import is from 'neon-cli' directly.

Creates a new Neon project, builds the native Rust module, and runs a simple test to verify the module loads and works.

npx neon new my-project cd my-project npm install npx neon build npx node -e "const m = require('./native'); console.log(m.hello())"
neon --version
Debug
Known issues
breakingRemoval of legacy backend in v1.0.0-alpha.1: only Node-API is supported going forward.
fix
Ensure your Neon module uses N-API only. Remove any legacy backend dependencies.
affects: >=1.0.0-alpha.1
breakingLength APIs (argument, argument_ops, len) now use usize instead of i32 in v1.0.0-alpha.1.
fix
Update Rust code to use usize for length-related values.
affects: >=1.0.0-alpha.1
breakingRemoval of neon::object::This trait in v1.0.0-alpha.2.
fix
Remove usage of This trait. The declare_types macro was already removed.
affects: >=1.0.0-alpha.2
breakingSnake_case to camelCase conversion when exporting functions in v1.1.0-alpha.2.
fix
Ensure exported function names use camelCase in JavaScript, or rename Rust functions accordingly.
affects: >=1.1.0-alpha.2
breakingRemoval of generic parameter from JsFunction in v1.0.0.
fix
Update JsFunction usage to remove generic parameter.
affects: >=1.0.0-alpha.4
gotchaSoundness hole in JsArrayBuffer::external and JsBuffer::external (fixed in v0.10.1). Previous versions allowed creating buffers without 'static lifetime.
fix
Upgrade to v0.10.1 or later. Ensure external data has 'static lifetime.
affects: <0.10.1
Errors
Common errors & fixes
neon: command not found
neon-cli not installed globally or npx not used.
fix
Run 'npx neon' instead, or install globally with 'npm install -g neon-cli'.
error[E0433]: failed to resolve: could not find `neon` in the crate root
Missing neon dependency in Cargo.toml.
fix
Add 'neon = "0.10"' to [dependencies] in Cargo.toml.
Error: Module did not self-register
Neon module not built correctly or Node.js ABI mismatch.
fix
Run 'npx neon build' to rebuild the native module. Ensure Node.js version matches the module's target.
Upgrade
Version history
0.10.1latest on npm
Audit
Dependencies
neonrequiredRuntime library for Neon modules; the CLI creates projects that depend on it
Agent activity
4 hits · last 30 days
node
4
Resources