NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #2812 most downloaded on crates.io
A safe abstraction layer for Node.js.
Last release 5 days ago
02 Oct 2026
Ships fairly regularly
a new release about every 4 months
Most releases are documented
notes for 33 of 49 stable releases
7 versions withdrawn
withdrawn after publishing
11 years old
84 releases · first in 2015
Deferred::settle() and Deferred::try_settle()
Nothing published for this version
One column per quarter.
Hotfix for Node-API versions lower than 5 ( #1106 ).
Hotfix for Node-API versions lower than 5 (#1106).
New functionality that has not yet stabilized is published under feature flags, so the only breaking changes that we expect to publish are those that…
Our strong commitment to compatibility since the 1.0 release remains unchanged. New functionality that has not yet stabilized is published under feature flags, so the only breaking changes that we expect to publish are those that affect the unstable features, or, as always, safety bugfixes.
Hotfix for Node-API versions lower than 5 (https://github.com/neon-bindings/neon/pull/1106).
FromArgs impl on T: TryFromJs and add cx.{arg, arg_opt} (https://github.com/neon-bindings/neon/pull/1096)With (https://github.com/neon-bindings/neon/pull/1086)JsBox::{deref, as_inner} to get long-lived reference to JsBox contents (https://github.com/neon-bindings/neon/pull/1087)TryIntoJs and TryFromJs take Cx instead of generic Context (https://github.com/neon-bindings/neon/pull/1062)Result types in #[export] (https://github.com/neon-bindings/neon/pull/1057)Cx instead of generic Context (https://github.com/neon-bindings/neon/pull/1048)With for TryIntoJs (https://github.com/neon-bindings/neon/pull/1059)#[export] (https://github.com/neon-bindings/neon/pull/1055)TryIntoJs and TryFromJs for common container types (https://github.com/neon-bindings/neon/pull/1066)Cx in exported functions (https://github.com/neon-bindings/neon/pull/1068)#[export] macro (https://github.com/neon-bindings/neon/pull/1025)npm init neon --lib (https://github.com/neon-bindings/neon/pull/1014 and https://github.com/neon-bindings/neon/pull/1041)Breaking Changes (unstable features only)
Nothing published for this version
Nothing published for this version
Deprecated feature flags were removed
The release of Neon 1.0 marks our commitment to backwards-compatibility: starting with 1.0.0, Neon users can be confident that future upgrades to Neon 1.x versions should never require code changes (with the possible exception of safety bugfixes, which we expect to be rare). We also do not anticipate releasing new major versions often and do not have any plans to do so for now.
JsFunction (#989)JsArray::new takes a usize instead of a u32 (#988)Context::global read a key and added Context::global_object (#987)unhandledRejection with JsPromise::to_future (#1008)cargo-cp-artifact help (#998)Patch to enable new feature flags in docs.rs.
Patch to enable new feature flags in docs.rs.
Added UTF-16 functions to JsString ( #944 ).
Managed traitJsBigInt (#963).JsString (#944).Send constraints (#979)sys feature (#970)cargo-cp-artifact0.1.8 fixes sending additional arguments on Windows (#972).
Managed traitJsBigInt (https://github.com/neon-bindings/neon/pull/963).JsString (https://github.com/neon-bindings/neon/pull/944).Send constraints (https://github.com/neon-bindings/neon/pull/979)sys feature (https://github.com/neon-bindings/neon/pull/970)cargo-cp-artifact0.1.8 fixes sending additional arguments on Windows (https://github.com/neon-bindings/neon/pull/972).
Trait neon::This has been removed. This was primarily added for use with the declare_types! macro to generate classes. The macro was removed and This
neon::object::ThisTrait neon::object::This has been removed. This was primarily added for use with the declare_types! macro to generate classes. The macro was removed and This is no longer needed. Additionally, the This argument on JsFunction was found to be invalid because it asserted at compile time a type for this that could change at runtime. (Note that this was not unsound because the type would be checked by Node-API and result in a panic.)
JsFunction::thisJsFunction::this was changed to perform a downcast and be fallible. This is in line with similar APIs (e.g., Object::get). Additionally, an infallible version, JsValue::this_value was added that does not perform a downcast.
Electron began using pointer compression on JavaScript values that is incompatible with external buffers. As a preventative measure, JsArrayBuffer::external and JsBuffer::external have been placed behind a feature flag that warns of Electron incompatibility.
execute_scoped to allow valid code to compile. (#919)from_slice helper on TypedArray (#925)JsTypedArray construction and type aliases (#909)Channel (#934)JsBox to prevent undefined behavior when multiple native add-ons are used (#907)TypedArray (#909)Channel docs (#925)cargo-cp-artifact0.1.7 includes a fix to unlink .node files before copying to address common code signing errors on macOS (#921).
Deprecate feature flags for accepted RFCs
Pre-release of a major milestone for Neon. 1.0.
neon::result::JsResultExt in favor of more general neon::result::ResultExt (#904)argument, argument_ops, len) use usize instead of i32 (#889)neon::meta::version returns semver@1 version instead of 0.9 (#912)Object.freeze and Object.seal (#891)JoinHandle from sending an event on a ChannelJsPromise to JsFutureTypedArray borrows (#877)JsArrayBuffer::external and JsBuffer::external (#897)Pre-release of a major milestone for Neon. 1.0.
neon::result::JsResultExt in favor of more general neon::result::ResultExt (https://github.com/neon-bindings/neon/pull/904)argument, argument_ops, len) use usize instead of i32 (https://github.com/neon-bindings/neon/pull/889)neon::meta::version returns semver@1 version instead of 0.9 (https://github.com/neon-bindings/neon/pull/912)Object.freeze and Object.seal (https://github.com/neon-bindings/neon/pull/891)JoinHandle from sending an event on a ChannelJsPromise to JsFutureTypedArray borrows (https://github.com/neon-bindings/neon/pull/877)JsArrayBuffer::external and JsBuffer::external (https://github.com/neon-bindings/neon/pull/897)Object::get docs (https://github.com/neon-bindings/neon/pull/903)cargo-cp-artirfact into the monorepo (https://github.com/neon-bindings/neon/pull/905)Nothing published for this version
Fix a soundness hole in JsArrayBuffer::external and JsBuffer::external ( #897 ).
Fix a soundness hole in JsArrayBuffer::external
and JsBuffer::external (#897).
Thanks to @Cassy343 for finding the issue!
In previous versions of Neon, it was possible to create a JsArrayBuffer or JsBuffer that references data without the 'static lifetime.
pub fn soundness_hole(mut cx: FunctionContext) -> JsResult<JsArrayBuffer> {
let mut data = vec![0u8, 1, 2, 3];
// Creating an external from `&mut [u8]` instead of `Vec<u8>` since there is a blanket impl
// of `AsMut<T> for &mut T`
let buf = JsArrayBuffer::external(&mut cx, data.as_mut_slice());
// `buf` is still holding a reference to `data`!
drop(data);
Ok(buf)
}Fix a soundness hole in JsArrayBuffer::external
and JsBuffer::external (https://github.com/neon-bindings/neon/pull/897).
Thanks to @Cassy343 for finding the issue!
In previous versions of Neon, it was possible to create a JsArrayBuffer or JsBuffer that references data without the 'static lifetime.
pub fn soundness_hole(mut cx: FunctionContext) -> JsResult<JsArrayBuffer> {
let mut data = vec![0u8, 1, 2, 3];
// Creating an external from `&mut [u8]` instead of `Vec<u8>` since there is a blanket impl
// of `AsMut<T> for &mut T`
let buf = JsArrayBuffer::external(&mut cx, data.as_mut_slice());
// `buf` is still holding a reference to `data`!
drop(data);
Ok(buf)
}
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Expose the Finalize trait as neon::Finalize so that docs are visible
Finalize trait as neon::types::Finalize so that docs are visiblecreate-neon to make release builds more
discoverable (https://github.com/neon-bindings/neon/pull/771)nan to fix an Electron 13 incompatibility (https://github.com/neon-bindings/neon/pull/778)Nothing published for this version
…to Rust channels. The types are available as deprecated aliases (https://github.com/neon-bindings/neon/pull/752).
Channel, formerly EventQueue, are now cloneable. Clones share a backing queue to take advantage of an optimization in Node threadsafe functions. Additionally, when specifying Node API 6 or higher (napi-6), calling cx.channel() will return a shared queue (https://github.com/neon-bindings/neon/pull/739).
The change may cause a performance regression in some pathological use cases (https://github.com/neon-bindings/neon/issues/762).
EventQueue and EventQueueError have been renamed to Channel and ChannelError respectively to clarify their function and similarity to Rust channels. The types are available as deprecated aliases (https://github.com/neon-bindings/neon/pull/752).
Channel::try_send docs (https://github.com/neon-bindings/neon/pull/767)neon::object (https://github.com/neon-bindings/neon/pull/740)Fix crash caused by non-thread safety in napi_threadsafefunction on early termination
Root (https://github.com/neon-bindings/neon/pull/750)Nothing published for this version
Added a deprecation warning to neon new
neon new (https://github.com/neon-bindings/neon/pull/722)Nothing published for this version
* Fix legacy-backend for Node 16 (https://github.com/neon-bindings/neon/pull/715) * Various docs improvements
legacy-backend for Node 16 (https://github.com/neon-bindings/neon/pull/715)Nothing published for this version
as_slice and as_mut_slice properly handle a null pointer from an empty buffer
as_slice and as_mut_slice properly handle a null pointer from an empty buffer (https://github.com/neon-bindings/neon/pull/681)Root (https://github.com/neon-bindings/neon/pull/700)neon::reflect::eval (https://github.com/neon-bindings/neon/pull/692)create-neon for creating an N-API project (https://github.com/neon-bindings/neon/pull/690)README.md generated by create-neon (https://github.com/neon-bindings/neon/pull/697)cargo-cp-artifact (https://github.com/neon-bindings/neon/pull/687)impl<T: Finalize> Finalize for Option<T> (https://github.com/neon-bindings/neon/pull/680)cargo fmt (https://github.com/neon-bindings/neon/pull/698)Nothing published for this version
Implement JsBuffer::unitialized for N-API backend
JsDate to N-API backend (https://github.com/neon-bindings/neon/pull/639)JsBuffer::unitialized for N-API backend (https://github.com/neon-bindings/neon/pull/664)Root is leaked after the event loop has stopped (https://github.com/neon-bindings/neon/pull/677)Nothing published for this version
Neon supports a large number of different Node versions which may have different N-API requirements. Neon now supports selecting the minimum required
Neon supports a large number of different Node versions which may have different N-API requirements. Neon now supports selecting the minimum required N-API version required by a module. For example, for N-API Version 4:
neon = { version = "0.7", default-features = false, features = ["napi-4"] }
If the Neon module is loaded in an older version of Node that does not support that N-API version, a panic message will inform the user.
A prerelease version of EventQueue for calling into the main JavaScript thread from Rust threads can be enabled with the event-queue-api feature flag. The API is considered unstable and may change in the future until the RFC is merged.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
The cx.try_catch(..) API has been updated to return T: Sized instead of T: Value (https://github.com/neon-bindings/neon/pull/631). This API is strictl
The cx.try_catch(..) API has been updated to return T: Sized instead of T: Value (https://github.com/neon-bindings/neon/pull/631). This API is strictly more powerful and allows users to return both JavaScript and Rust values from try_catch closures.
Nothing published for this version
Added neon::main macro as a replacement for register_module!
Upgrade node-gyp (https://github.com/neon-bindings/neon/pull/623)
Added neon::main macro as a replacement for register_module! (https://github.com/neon-bindings/neon/pull/636)
Builds occassionally fail with Windows, Node 15 and npm 7 (https://github.com/neon-bindings/neon/issues/642)
Nothing published for this version
Added support for additional arguments passed to cargo build. Resolves https://github.com/neon-bindings/neon/issues/471.
Added support for additional arguments passed to cargo build. Resolves https://github.com/neon-bindings/neon/issues/471.
neon build --release -- --features awesome
NPM_CONFIG_DISTURL supportsmallvec is used for collecting arguments and yields a small performance gain when calling JsFunction
smallvec is used for collecting arguments and yields a small performance gain when calling JsFunctionThanks to @staltz, neon now builds for both iOS and Android with nodejs-mobile.
Nothing published for this version
Versions 0.4.1 and 0.4.2 included a breaking change in neon-runtime. At the time, this was considered acceptable because neon-runtime is considered an…
Re-publish
Versions 0.4.1 and 0.4.2 included a breaking change in neon-runtime. At the time, this was considered acceptable because neon-runtime is considered an internal crate and not part of the public API. However, it was discovered, after publishing, that neon-serde, a commonly used crate in the neon ecosystem, contained a direct dependency on neon-runtime. In order to best support users, versions 0.4.1 and 0.4.2 were "yanked" and re-published as 0.5.0.
Additionally, the team is working with the authors of neon-serde to remove the dependency on neon-runtime to prevent future issues.
DowncastError Display impl (https://github.com/neon-bindings/neon/pull/606)Fix memory leak and race condition in EventHandler
Unpublished / Yanked
EventHandlerNothing published for this version
Nothing published for this version
Nothing published for this version
Added the cx.try_catch API of RFC 29. This feature is behind the try-catch-api feature flag.
Unpublished / Yanked
Added the cx.try_catch API of RFC 29. This feature is behind the try-catch-api feature flag.
async_context to node::MakeCallback (https://github.com/neon-bindings/neon/pull/498)The Neon Project now uses Github Actions thanks to @lhr0909! As part of this change, CI now runs on all of our supported platforms (macOS, Windows, linux) and Node versions.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Hot fix for neon build in projects with many dependencies.
Hot fix for neon build in projects with many dependencies.
Nothing published for this version
Disable node module registration on test build, allowing cargo test to be used on neon modules
cargo test to be used on neon modulesCARGO_TARGET_DIR locations (e.g., workspaces)neon::prelude to improve ergonomics in Rust 2018win_delay_hook when building with electron-build-env, fixing Windows Electron__cxa_pure_virtual on LinuxOUT_DIR and build there to fix cargo publish and follow best practicesmem::uniitialized() usage, reducing warnings and fixing an instance of undefined behaviorThe macOS link arguments were moved from neon-cli to neon-build. This is more idiomatic, but makes neon-build required for macOS builds where it was unnecessary before.
Since neon-build has been included in the project template since 0.1 this change was not deemed significant enough to warrant a major revision.
Neon 0.3.2 lays the groundwork for the next major revision. Development of Neon against an ABI stable Node API (N-API) will occur on main.
legacy-runtime and n-api feature flags for toggling neon runtimenodejs-sys craten-api implementationfeature flag to neon-cli to help configuring n-api projectsBuild v0.3 project templates by default in the CLI
Nothing published for this version
Nothing published for this version
Optimization in Scope structures, thanks to @maciejhirsz
Scope structures, thanks to @maciejhirsz (#282)Task API, thanks to @kjvalencik (#291)Your coding agent can read these notes before it upgrades. Set up the MCP server →