[BREAKGLASS] Append-only mirror of github.com/signalapp/neon
Go to file
2021-04-27 11:12:24 -07:00
.cargo Simplify clippy lint workflows with the -Zpackage-features RFC 2021-03-13 18:17:23 -05:00
.github/workflows Github worflow: replace Node 15 by node 16 2021-04-27 15:39:47 +02:00
cli Bump y18n from 4.0.0 to 4.0.1 in /cli 2021-04-01 06:09:09 +00:00
crates Fix build with Node 16 2021-04-27 14:45:57 +02:00
create-neon v0.8.0 2021-03-22 10:07:52 -04:00
dev update branch name 2020-10-08 15:39:00 +02:00
src Semantic links to stdlib. 2021-04-07 09:05:10 -07:00
test feat(neon): Add a drop queue for safely dropping Root without leaking on N-API 6+ 2021-03-16 15:54:32 -04:00
.editorconfig run cli, static, and dynamic tests on CI, add tests for cache busting 2019-01-18 15:23:36 -08:00
.gitignore - Move test helpers into dev/ directory 2021-03-08 21:51:23 -08:00
AUTHORS.md v0.8.0 2021-03-22 10:07:52 -04:00
build.rs We didn't actually need the CI flag after all; just #[ignore] the static tests for all Rust versions except beta. 2019-09-30 13:23:39 -07:00
Cargo.toml v0.8.0 2021-03-22 10:07:52 -04:00
CODE_OF_CONDUCT.md Switching to the Contributor Covenant code of conduct. The Rust CoC is pretty good, but the CC CoC is a bit more polished and consistent, and also stated in a way that's less tied to one specific project. 2017-09-22 14:58:50 -07:00
CONTRIBUTING.md update rfcs main branch references 2020-10-08 15:47:17 +02:00
LICENSE-APACHE Move neon-cli files into cli subdirectory, and restore temporarily-moved neon files back to project root. 2017-09-17 23:26:08 -07:00
LICENSE-MIT Relicensing! Like Neon itself, the neon CLI is now dual-licensed under 2017-09-02 05:26:06 -07:00
MIGRATION_GUIDE.md v0.8.0 2021-03-22 10:07:52 -04:00
neon.png change image to png 2018-12-23 20:59:05 -08:00
README.md update README to mention Node 16 support 2021-04-27 11:12:24 -07:00
RELEASES.md v0.8.0 2021-03-22 10:07:52 -04:00

neon

Cargo npm Linux Build Status macOS Build Status Windows Build Status

Rust bindings for writing safe and fast native Node.js modules.

Getting started

Once you have the platform dependencies installed, getting started is as simple as:

$ npm install -g neon-cli
$ neon new my-project

Then see the Hello World guide for writing your first Hello World in Neon!

Docs

See our Neon fundamentals docs and our API docs.

N-API Migration Guide

We've ported Neon to a new backend based on N-API, which will be the basis for Neon 1.0.

Read the new migration guide to learn how to port your Neon projects to N-API!

Platform Support

Operating Systems

Linux macOS Windows

Node.js

Node 10 Node 12 Node 14 Node 16

Support for LTS versions of Node and current are expected. If you're using a different version of Node and believe it should be supported, let us know.

Rust

Neon supports Rust stable version 1.18 and higher. We test on the latest stable, beta, and nightly versions of Rust.

A Taste...

fn make_an_array(mut cx: FunctionContext) -> JsResult<JsArray> {
    // Create some values:
    let n = cx.number(9000);
    let s = cx.string("hello");
    let b = cx.boolean(true);

    // Create a new array:
    let array: Handle<JsArray> = cx.empty_array();

    // Push the values into the array:
    array.set(&mut cx, 0, n)?;
    array.set(&mut cx, 1, s)?;
    array.set(&mut cx, 2, b)?;

    // Return the array:
    Ok(array)
}

register_module!(mut cx, {
    cx.export_function("makeAnArray", make_an_array)
})

For more examples, see our examples repo.

Get Involved

The Neon community is just getting started and there's tons of fun to be had. Come play! :)

The Rust Bindings community Slack is open to all; use the Slackin app to receive an invitation.

License

Licensed under either of

at your option.