Skip to content

Commit 5d9b288

Browse files
committed
Add CONTRIBUTING.md
1 parent cf6b886 commit 5d9b288

5 files changed

Lines changed: 138 additions & 103 deletions

File tree

CONTRIBUTING.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# @kurrent/bridge
2+
3+
## Building
4+
5+
Building requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support).
6+
7+
To run the build, run:
8+
9+
```sh
10+
$ npm run build
11+
```
12+
13+
This command uses the [@neon-rs/cli](https://www.npmjs.com/package/@neon-rs/cli) utility to assemble the binary Node addon from the output of `cargo`.
14+
15+
## Exploring
16+
17+
After building, you can explore its exports at the Node console:
18+
19+
```sh
20+
$ npm i
21+
$ npm run build
22+
$ node
23+
> var client = require('.').createClient("kurrentdb://admin:changeit@localhost:8080?tls=false")
24+
```
25+
26+
## Available Scripts
27+
28+
In the project directory, you can run:
29+
30+
#### `npm run build`
31+
32+
Builds the Node addon (`index.node`) from source, generating a release build with `cargo --release`.
33+
34+
Additional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm run build` and similar commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html):
35+
36+
```
37+
npm run build -- --feature=beetle
38+
```
39+
40+
#### `npm run debug`
41+
42+
Similar to `npm run build` but generates a debug build with `cargo`.
43+
44+
#### `npm run cross`
45+
46+
Similar to `npm run build` but uses [cross-rs](https://github.com/cross-rs/cross) to cross-compile for another platform. Use the [`CARGO_BUILD_TARGET`](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget) environment variable to select the build target.
47+
48+
#### `npm run release`
49+
50+
Initiate a full build and publication of a new patch release of this library via GitHub Actions.
51+
52+
#### `npm run dryrun`
53+
54+
Initiate a dry run of a patch release of this library via GitHub Actions. This performs a full build but does not publish the final result.
55+
56+
#### `npm test`
57+
58+
Runs the unit tests by calling `cargo test`. You can learn more about [adding tests to your Rust code](https://doc.rust-lang.org/book/ch11-01-writing-tests.html) from the [Rust book](https://doc.rust-lang.org/book/).
59+
60+
## Project Layout
61+
62+
The directory structure of this project is:
63+
64+
```
65+
kurrentdb-bridge-client/
66+
├── Cargo.toml
67+
├── README.md
68+
├── lib/
69+
├── src/
70+
| ├── index.mts
71+
| └── index.cts
72+
├── crates/
73+
| └── bridge/
74+
| └── src/
75+
| └── lib.rs
76+
├── platforms/
77+
├── package.json
78+
└── target/
79+
```
80+
81+
| Entry | Purpose |
82+
|----------------|------------------------------------------------------------------------------------------------------------------------------------------|
83+
| `Cargo.toml` | The Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.html), which informs the `cargo` command. |
84+
| `README.md` | This file. |
85+
| `lib/` | The directory containing the generated output from [tsc](https://typescriptlang.org). |
86+
| `src/` | The directory containing the TypeScript source files. |
87+
| `index.mts` | Entry point for when this library is loaded via [ESM `import`](https://nodejs.org/api/esm.html#modules-ecmascript-modules) syntax. |
88+
| `index.cts` | Entry point for when this library is loaded via [CJS `require`](https://nodejs.org/api/modules.html#requireid). |
89+
| `crates/` | The directory tree containing the Rust source code for the project. |
90+
| `lib.rs` | Entry point for the Rust source code. |
91+
| `platforms/` | The directory containing distributions of the binary addon backend for each platform supported by this library. |
92+
| `package.json` | The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. |
93+
| `target/` | Binary artifacts generated by the Rust build. |
94+
95+
## Learn More
96+
97+
Learn more about:
98+
99+
- [Neon](https://neon-bindings.com).
100+
- [Rust](https://www.rust-lang.org).
101+
- [Node](https://nodejs.org).

KurrentLogo-Black.png

41.4 KB
Loading

KurrentLogo-Plum.png

56.3 KB
Loading

KurrentLogo-White.png

43.4 KB
Loading

README.md

Lines changed: 37 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,37 @@
1-
# @kurrent/bridge
2-
3-
This project was bootstrapped by [create-neon](https://www.npmjs.com/package/create-neon).
4-
5-
## Building
6-
7-
Building requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support).
8-
9-
To run the build, run:
10-
11-
```sh
12-
$ npm run build
13-
```
14-
15-
This command uses the [@neon-rs/cli](https://www.npmjs.com/package/@neon-rs/cli) utility to assemble the binary Node addon from the output of `cargo`.
16-
17-
## Exploring
18-
19-
After building, you can explore its exports at the Node console:
20-
21-
```sh
22-
$ npm i
23-
$ npm run build
24-
$ node
25-
> var client = require('.').createClient("kurrentdb://admin:changeit@localhost:8080?tls=false")
26-
```
27-
28-
## Available Scripts
29-
30-
In the project directory, you can run:
31-
32-
#### `npm run build`
33-
34-
Builds the Node addon (`index.node`) from source, generating a release build with `cargo --release`.
35-
36-
Additional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm run build` and similar commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html):
37-
38-
```
39-
npm run build -- --feature=beetle
40-
```
41-
42-
#### `npm run debug`
43-
44-
Similar to `npm run build` but generates a debug build with `cargo`.
45-
46-
#### `npm run cross`
47-
48-
Similar to `npm run build` but uses [cross-rs](https://github.com/cross-rs/cross) to cross-compile for another platform. Use the [`CARGO_BUILD_TARGET`](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget) environment variable to select the build target.
49-
50-
#### `npm run release`
51-
52-
Initiate a full build and publication of a new patch release of this library via GitHub Actions.
53-
54-
#### `npm run dryrun`
55-
56-
Initiate a dry run of a patch release of this library via GitHub Actions. This performs a full build but does not publish the final result.
57-
58-
#### `npm test`
59-
60-
Runs the unit tests by calling `cargo test`. You can learn more about [adding tests to your Rust code](https://doc.rust-lang.org/book/ch11-01-writing-tests.html) from the [Rust book](https://doc.rust-lang.org/book/).
61-
62-
## Project Layout
63-
64-
The directory structure of this project is:
65-
66-
```
67-
kurrentdb-bridge-client/
68-
├── Cargo.toml
69-
├── README.md
70-
├── lib/
71-
├── src/
72-
| ├── index.mts
73-
| └── index.cts
74-
├── crates/
75-
| └── bridge/
76-
| └── src/
77-
| └── lib.rs
78-
├── platforms/
79-
├── package.json
80-
└── target/
81-
```
82-
83-
| Entry | Purpose |
84-
|----------------|------------------------------------------------------------------------------------------------------------------------------------------|
85-
| `Cargo.toml` | The Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.html), which informs the `cargo` command. |
86-
| `README.md` | This file. |
87-
| `lib/` | The directory containing the generated output from [tsc](https://typescriptlang.org). |
88-
| `src/` | The directory containing the TypeScript source files. |
89-
| `index.mts` | Entry point for when this library is loaded via [ESM `import`](https://nodejs.org/api/esm.html#modules-ecmascript-modules) syntax. |
90-
| `index.cts` | Entry point for when this library is loaded via [CJS `require`](https://nodejs.org/api/modules.html#requireid). |
91-
| `crates/` | The directory tree containing the Rust source code for the project. |
92-
| `lib.rs` | Entry point for the Rust source code. |
93-
| `platforms/` | The directory containing distributions of the binary addon backend for each platform supported by this library. |
94-
| `package.json` | The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. |
95-
| `target/` | Binary artifacts generated by the Rust build. |
96-
97-
## Learn More
98-
99-
Learn more about:
100-
101-
- [Neon](https://neon-bindings.com).
102-
- [Rust](https://www.rust-lang.org).
103-
- [Node](https://nodejs.org).
1+
<a href="https://kurrent.io">
2+
<picture>
3+
<source media="(prefers-color-scheme: dark)" srcset="KurrentLogo-White.png">
4+
<source media="(prefers-color-scheme: light)" srcset="KurrentLogo-Black.png">
5+
<img alt="Kurrent" src="KurrentLogo-Plum.png" height="50%" width="50%">
6+
</picture>
7+
</a>
8+
9+
# @kurrent/bridge
10+
11+
[![Test](https://github.com/EventStore/kurrentdb-bridge-client/actions/workflows/test.yml/badge.svg)](https://github.com/EventStore/EventStore-Streaming/actions/workflows/build-surge.yml)
12+
13+
14+
## Overview
15+
16+
The library improves the performance of the [KurrentDB NodeJS client](https://github.com/EventStore/KurrentDB-Client-NodeJS) by
17+
integrating the Rust implementation through native addons. It uses
18+
[Neon](https://github.com/neon-bindings/neon) to create bindings and leverages
19+
Rust's high-performance characteristics within the Node.js ecosystem.
20+
21+
## Contributing
22+
23+
Contributions are welcome! Please read the [contribution guidelines](CONTRIBUTING.md) for more information on how to get started.
24+
25+
## Support
26+
27+
Information on support can be found on our website: [Kurrent Support](https://kurrent.io/support/)
28+
29+
## Communities
30+
31+
- [Discuss](https://discuss.kurrent.io/)
32+
- [Discord (Kurrent)](https://discord.gg/Phn9pmCw3t)
33+
- [Discord (ddd-cqrs-es)](https://discord.com/invite/sEZGSHNNbH)
34+
35+
## Licensing
36+
37+
View [Kurrent's licensing information](https://github.com/EventStore/kurrentdb-bridge-client/blob/master/LICENSE.md)

0 commit comments

Comments
 (0)