Releases: neon-bindings/neon
v0.9.0
Performance
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 (#739).
The change may cause a performance regression in some pathological use cases (#762).
Deprecation
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 (#752).
Docs
Fixes
- Fix usage of a removed API in legacy buffers (#769)
v0.8.3
v0.8.2
v0.8.1
v0.8.0
Fixes
as_slice
andas_mut_slice
properly handle anull
pointer from an empty buffer (#681)- Global drop queue added to avoid panics on N-API 6+ when dropping a
Root
(#700)
Features
- Added
neon::reflect::eval
(#692) - Added
create-neon
for creating an N-API project (#690) - Added details to the
README.md
generated bycreate-neon
(#697)
Improvements
- Switched N-API tests to
cargo-cp-artifact
(#687) - Added
impl<T: Finalize> Finalize for Option<T>
(#680) - Added a N-API migration guide (#685)
Housekeeping
v0.7.1
v0.7.0
N-API
Version Selection
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.
Threadsafe Functions
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.
v0.6.0
The cx.try_catch(..)
API has been updated to return T: Sized
instead of T: Value
(#631). This API is strictly more powerful and allows users to return both JavaScript and Rust values from try_catch
closures.
N-API
v0.5.3
v0.5.2
Version 0.5.2
CLI
Added support for additional arguments passed to cargo build
. Resolves #471.
neon build --release -- --features awesome
N-API
- Improved arguments performance
- Add redirect and
NPM_CONFIG_DISTURL
support