NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4175 most downloaded on crates.io
Build logic required for Neon projects.
Last release 4 years ago
no release in 18 months
Ships fairly regularly
a new release about every 5 weeks
Most releases are documented
notes for 29 of 35 stable releases
3 versions withdrawn
withdrawn after publishing
10 years old
39 releases · first in 2017
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)
}One column per quarter.
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
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)…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)Added a deprecation warning to neon new
neon new (https://github.com/neon-bindings/neon/pull/722)* 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)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)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)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.
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.
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)
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.
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
EventHandlerAdded 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
Hot fix for neon build in projects with many dependencies.
Hot fix for neon build in projects with many dependencies.
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)Reinstate JsInteger (although it's deprecated) for now, to be removed in 0.2.
JsInteger (although it's deprecated) for now, to be removed in 0.2. (#279)Fix a bug that was causing annoying unnecessary rebuilds (#242).
Fixes to Windows builds (#221, #227), thanks to @hone's tenacious troubleshooting.
TypeScript upgrade fixes (neon-bindings/neon-cli#62, neon-bindings/neon-cli#65).
CLI bugfix (neon-bindings/neon-cli#59).
CLI bugfix (neon-bindings/neon-cli#57).
CLI bugfix (neon-bindings/neon-cli#56).
Better Electron support in CLI's build process.
Ensure failing tests break the build
Error for Throw (#201)neon build to optionally take module names (neon-bindings/neon-cli#48).More robust build scripts for neon-runtime, fixing Homebrew node installations (see #189)
Renamed `neon-sys` to `neon-runtime`
neon-sys to neon-runtimeneon-build as a build dependency (see neon-bindings/neon-cli#46).Exposed `This` trait to allow user-level abstractions involving FunctionCall
This trait to allow user-level abstractions involving FunctionCallbuild.rs to make Windows work (see neon-bindings/neon-cli#42 and neon-bindings/neon-cli#44).Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →