Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neon-bindings/examples
A collection of examples of Neon
https://github.com/neon-bindings/examples
examples native-module neon node rust v8
Last synced: about 2 months ago
JSON representation
A collection of examples of Neon
- Host: GitHub
- URL: https://github.com/neon-bindings/examples
- Owner: neon-bindings
- Created: 2018-11-09T05:18:07.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T18:03:43.000Z (11 months ago)
- Last Synced: 2024-08-02T15:37:44.738Z (5 months ago)
- Topics: examples, native-module, neon, node, rust, v8
- Homepage:
- Size: 3.75 MB
- Stars: 319
- Watchers: 12
- Forks: 43
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - examples - bindings | 230 | (Others)
README
# neon-examples
![Github Actions](https://github.com/neon-bindings/examples/workflows/Test/badge.svg?branch=main)
Examples and common patterns for [Neon][neon].
All examples are for [`napi-backend`][napi-migration]. For examples using `legacy-backend` see the [`legacy`][legacy] branch.
[neon]: https://github.com/neon-bindings/neon
[napi-migration]: https://github.com/neon-bindings/neon/blob/main/MIGRATION_GUIDE.md#n-api-migration-guide
[legacy]: https://github.com/neon-bindings/examples/tree/legacy## Table of Contents
| Example | Description |
| ------------------------------ | ------------------------------------------ |
| [`async-sqlite`][async-sqlite] | Async interface to a SQLite database |
| [`cpu-count`][cpu-count] | Return the number of CPUs |
| [`gzip-stream`][gzip-stream] | Asynchronously compress a stream of data |
| [`hello-world`][hello-world] | Return a JS String with a greeting message |
| [`tokio-fetch`][tokio-fetch] | Asynchronously fetch a node release date |[async-sqlite]: examples/async-sqlite
[cpu-count]: examples/cpu-count
[gzip-stream]: examples/gzip-stream
[hello-world]: examples/hello-world
[tokio-fetch]: examples/tokio-fetch## Contributing
### Setup
The `examples` repository uses the npm 7 [workspaces] feature.
[workspaces]: https://docs.npmjs.com/cli/v7/using-npm/workspaces
```
# npm 7 is required
npm --versiongit clone https://github.com/neon-bindings/examples.git
cd examples
npm install
```### Tests
```
npm test
```