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-cliVerified import paths — ran on the pinned version, not inferred.
Creates a new Neon project, builds the native Rust module, and runs a simple test to verify the module loads and works.
Ensure your Neon module uses N-API only. Remove any legacy backend dependencies.
Update Rust code to use usize for length-related values.
Remove usage of This trait. The declare_types macro was already removed.
Ensure exported function names use camelCase in JavaScript, or rename Rust functions accordingly.
Update JsFunction usage to remove generic parameter.
Upgrade to v0.10.1 or later. Ensure external data has 'static lifetime.
Run 'npx neon' instead, or install globally with 'npm install -g neon-cli'.
Add 'neon = "0.10"' to [dependencies] in Cargo.toml.
Run 'npx neon build' to rebuild the native module. Ensure Node.js version matches the module's target.