PackageTrack
Sign in Get early access

neon-runtime

Bindings to the Node.js native addon API, used by the Neon implementation.

0.10.1 6.6M downloads/mo #3933 most downloaded on crates.io neon-bindings/neon

What this package is like to depend on

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 28 of 32 stable releases

4 versions withdrawn

withdrawn after publishing

10 years old

39 releases · first in 2017

0 releases in the last 12 months

see the full history below

Release timeline

39 releases · Feb 2017 to May 2022
2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 39
  1. 0.10.1 23 May 2022
    Release notes

    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)
    }
    Open source →
    Release notes

    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)
    }
    
    Open source →
  2. 0.10.0 07 Mar 2022

    Nothing published for this version

  3. 0.10.0-alpha.3 08 Dec 2021 pre-release

    Nothing published for this version

  4. 0.10.0-alpha.2 17 Sep 2021 pre-release

    Nothing published for this version

  5. 0.10.0-alpha.1 30 Aug 2021 pre-release

    Nothing published for this version

  6. 0.10.0-alpha.0 30 Aug 2021 pre-release withdrawn

    Nothing published for this version

  7. 0.9.1 26 Aug 2021
    Release notes
    • Expose the Finalize trait as neon::types::Finalize so that docs are visible
    • Improved docs and build scripts in create-neon to make release builds more discoverable (https://github.com/neon-bindings/neon/pull/771)
    • Update nan to fix an Electron 13 incompatibility (https://github.com/neon-bindings/neon/pull/778)
    Open source →
  8. 0.9.0 26 Jul 2021
    Release notes

    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 (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).

    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 (https://github.com/neon-bindings/neon/pull/752).

    Docs

    • Document error causes for Channel::try_send docs (https://github.com/neon-bindings/neon/pull/767)
    • Document neon::object (https://github.com/neon-bindings/neon/pull/740)

    Fixes

    • Fix usage of a removed API in legacy buffers (https://github.com/neon-bindings/neon/pull/769)
    Open source →
  9. 0.8.3 02 Jun 2021
    Release notes
    • Fix crash caused by non-thread safety in napi_threadsafefunction on early termination (https://github.com/neon-bindings/neon/pull/744)
    • Fix memory leak in Root (https://github.com/neon-bindings/neon/pull/750)
    Open source →
  10. 0.8.2 18 May 2021
    Release notes
    • More docs improvements
    • Added a deprecation warning to neon new (https://github.com/neon-bindings/neon/pull/722)
    Open source →
  11. 0.8.1 30 Apr 2021
    Release notes
    • Fix legacy-backend for Node 16 (https://github.com/neon-bindings/neon/pull/715)
    • Various docs improvements
    Open source →
  12. 0.8.0 23 Mar 2021
    Release notes

    Fixes

    • as_slice and as_mut_slice properly handle a null pointer from an empty buffer (https://github.com/neon-bindings/neon/pull/681)
    • Global drop queue added to avoid panics on N-API 6+ when dropping a Root (https://github.com/neon-bindings/neon/pull/700)

    Features

    • Added neon::reflect::eval (https://github.com/neon-bindings/neon/pull/692)
    • Added create-neon for creating an N-API project (https://github.com/neon-bindings/neon/pull/690)
    • Added details to the README.md generated by create-neon (https://github.com/neon-bindings/neon/pull/697)

    Improvements

    • Switched N-API tests to cargo-cp-artifact (https://github.com/neon-bindings/neon/pull/687)
    • Added impl<T: Finalize> Finalize for Option<T> (https://github.com/neon-bindings/neon/pull/680)
    • Added a N-API migration guide (https://github.com/neon-bindings/neon/pull/685)

    Housekeeping

    • Lint fixes (https://github.com/neon-bindings/neon/pull/609)
    • Lint CI enforcement and cargo fmt (https://github.com/neon-bindings/neon/pull/698)
    Open source →
  13. 0.7.1 04 Feb 2021
    Release notes

    Features

    • Added JsDate to N-API backend (https://github.com/neon-bindings/neon/pull/639)
    • Implement JsBuffer::unitialized for N-API backend (https://github.com/neon-bindings/neon/pull/664)

    Fixes

    • Do not panic if a Root is leaked after the event loop has stopped (https://github.com/neon-bindings/neon/pull/677)
    • Stubs for features that will not be implemented in the N-API backend are removed (https://github.com/neon-bindings/neon/pull/663)
    • Fix doc URL link (https://github.com/neon-bindings/neon/pull/663)
    Open source →
  14. 0.7.0 05 Jan 2021
    Release notes

    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.

    Open source →
  15. 0.6.0 09 Dec 2020
    Release notes

    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.

    N-API

    • N-API symbols are now loaded dynamically (https://github.com/neon-bindings/neon/pull/646)
    • Build process for N-API is greatly simplified by leveraging dynamic loading (https://github.com/neon-bindings/neon/pull/647)
    Open source →
  16. 0.5.3 24 Nov 2020
    Release notes

    Bug Fixes

    Upgrade node-gyp (https://github.com/neon-bindings/neon/pull/623)

    • Fix Windows Node 15
    • Fix Apple M1

    Features

    Added neon::main macro as a replacement for register_module! (https://github.com/neon-bindings/neon/pull/636)

    Known Issues

    Builds occassionally fail with Windows, Node 15 and npm 7 (https://github.com/neon-bindings/neon/issues/642)

    Open source →
  17. 0.5.2 16 Nov 2020
    Release notes

    CLI

    Added support for additional arguments passed to cargo build. Resolves https://github.com/neon-bindings/neon/issues/471.

    neon build --release -- --features awesome
    

    N-API

    Open source →
  18. 0.5.1 28 Oct 2020
    Release notes

    Performance

    • smallvec is used for collecting arguments and yields a small performance gain when calling JsFunction

    Broader Support

    Thanks to @staltz, neon now builds for both iOS and Android with nodejs-mobile.

    Open source →
  19. 0.5.0 12 Oct 2020
    Release notes

    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.

    Bug Fixes

    • Fix stack overflow in DowncastError Display impl (https://github.com/neon-bindings/neon/pull/606)
    Open source →
  20. 0.4.2 23 Sep 2020 withdrawn
    Release notes

    Unpublished / Yanked

    Bug Fixes

    • Fix memory leak and race condition in EventHandler
    Open source →
  21. 0.4.1 18 Sep 2020 withdrawn
    Release notes

    Unpublished / Yanked

    Features

    Try Catch

    Added the cx.try_catch API of RFC 29. This feature is behind the try-catch-api feature flag.

    Bug Fixes

    • Pass async_context to node::MakeCallback (https://github.com/neon-bindings/neon/pull/498)
    • Cache bust neon if node version changes (https://github.com/neon-bindings/neon/pull/388)
    • Fix debug builds in windows (https://github.com/neon-bindings/neon/pull/400)
    • Fix cross compiling architectures (https://github.com/neon-bindings/neon/pull/491)
    • Fix neon new hanging on Windows (https://github.com/neon-bindings/neon/pull/537)

    CI Improvements

    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.

    Open source →
  22. 0.4.0 14 Feb 2020

    Nothing published for this version

  23. 0.3.3 22 Oct 2019
    Release notes

    Hot fix for neon build in projects with many dependencies.

    Open source →
  24. 0.3.2 18 Oct 2019
    Release notes

    Bug fixes and Small Features

    • Disable node module registration on test build, allowing cargo test to be used on neon modules
    • Added support for alternate CARGO_TARGET_DIR locations (e.g., workspaces)
    • Added macros to neon::prelude to improve ergonomics in Rust 2018
    • Link win_delay_hook when building with electron-build-env, fixing Windows Electron
    • Fixed missing __cxa_pure_virtual on Linux
    • Copy native files into OUT_DIR and build there to fix cargo publish and follow best practices
    • Eliminated mem::uniitialized() usage, reducing warnings and fixing an instance of undefined behavior

    Potentially Breaking

    The 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.

    N-API

    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.

    • Added legacy-runtime and n-api feature flags for toggling neon runtime
    • Moved the legacy runtime to nodejs-sys crate
    • Stubbed required n-api implementation
    • Added feature flag to neon-cli to help configuring n-api projects
    Open source →
  25. 0.3.1 22 Aug 2019
    Release notes
    • Build v0.3 project templates by default in the CLI
    Open source →
  26. 0.3.0 22 Aug 2019

    Nothing published for this version

  27. 0.2.0 25 Jul 2018

    Nothing published for this version

  28. 0.1.23 03 Jun 2018
    Release notes
    Open source →
  29. 0.1.22 24 Nov 2017
    Release notes
    • Reinstate JsInteger (although it's deprecated) for now, to be removed in 0.2. (#279)
    Open source →
  30. 0.1.21 14 Nov 2017 withdrawn
    Release notes
    Open source →
  31. 0.1.20 23 Aug 2017
    Release notes
    • Background task API (#214).
    • Fixes to Windows builds (#221, #227), thanks to @hone's tenacious troubleshooting.
    Open source →
  32. 0.1.19 11 Aug 2017
    Release notes Open source →
  33. 0.1.18 28 May 2017
    Release notes
    Open source →
  34. 0.1.17 08 May 2017
    Release notes Open source →
  35. 0.1.16 06 May 2017
    Release notes Open source →
  36. 0.1.15 22 Apr 2017
    Release notes
    • Better Electron support in CLI's build process.
    • Better support for Electron via the artifacts file (neon-bindings/neon-cli#52).
    Open source →
  37. 0.1.14 02 Apr 2017
    Release notes
    • Ensure failing tests break the build (#191)
    • Catch Rust panics and convert them to JS exceptions (#192)
    • Implement Error for Throw (#201)
    • Clean up the CLI and allow neon build to optionally take module names (neon-bindings/neon-cli#48).
    Open source →
  38. 0.1.13 20 Feb 2017
    Release notes
    • More robust build scripts for neon-runtime, fixing Homebrew node installations (see #189)
    Open source →
  39. 0.1.12 17 Feb 2017
    Release notes
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive