Skip to content

Releases: neon-bindings/neon

v0.9.0

26 Jul 13:18
68b1804
Compare
Choose a tag to compare

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

  • Document error causes for Channel::try_send docs (#767)
  • Document neon::object (#740)

Fixes

  • Fix usage of a removed API in legacy buffers (#769)

v0.8.3

02 Jun 17:34
5ec4d1d
Compare
Choose a tag to compare
  • Fix crash caused by non-thread safety in napi_threadsafefunction on early termination (#744)
  • Fix memory leak in Root (#750)

v0.8.2

18 May 14:59
e2cc8cc
Compare
Choose a tag to compare
  • More docs improvements
  • Added a deprecation warning to neon new (#722)

v0.8.1

30 Apr 17:22
14bc607
Compare
Choose a tag to compare
  • Fix legacy-backend for Node 16 (#715)
  • Various docs improvements

v0.8.0

23 Mar 17:39
d5bfee3
Compare
Choose a tag to compare

Fixes

  • as_slice and as_mut_slice properly handle a null 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 by create-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

  • Lint fixes (#609)
  • Lint CI enforcement and cargo fmt (#698)

v0.7.1

22 Mar 13:45
8af9d22
Compare
Choose a tag to compare

Features

  • Added JsDate to N-API backend (#639)
  • Implement JsBuffer::unitialized for N-API backend (#664)

Fixes

  • Do not panic if a Root is leaked after the event loop has stopped (#677)
  • Stubs for features that will not be implemented in the N-API backend are removed (#663)
  • Fix doc URL link (#663)

v0.7.0

05 Jan 16:54
94bb1cd
Compare
Choose a tag to compare

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

09 Dec 20:35
f45f71d
Compare
Choose a tag to compare

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

  • N-API symbols are now loaded dynamically (#646)
  • Build process for N-API is greatly simplified by leveraging dynamic loading (#647)

v0.5.3

24 Nov 17:23
cffe3cf
Compare
Choose a tag to compare

Bug Fixes

Upgrade node-gyp (#623)

  • Fix Windows Node 15
  • Fix Apple M1

Features

Added neon::main macro as a replacement for register_module! (#636)

Known Issues

Builds occassionally fail with Windows, Node 15 and npm 7 (#642)

v0.5.2

16 Nov 17:27
6a3848b
Compare
Choose a tag to compare

Version 0.5.2

CLI

Added support for additional arguments passed to cargo build. Resolves #471.

neon build --release -- --features awesome

N-API