Fix README and publish = false in Cargo.toml

This commit is contained in:
junderw 2023-06-26 01:19:34 -07:00 committed by Mononaut
parent 6e7a525d12
commit 4334b9eac1
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
2 changed files with 9 additions and 9 deletions

View File

@ -4,7 +4,7 @@ version = "0.1.0"
description = "An inefficient re-implementation of the getBlockTemplate algorithm in Rust"
authors = ["mononaut"]
edition = "2021"
exclude = ["index.node"]
publish = false
[lib]
crate-type = ["cdylib"]

View File

@ -2,11 +2,11 @@
**gbt:** rust implementation of the getBlockTemplate algorithm
This project was bootstrapped by [create-neon](https://www.npmjs.com/package/create-neon).
This project was bootstrapped by [napi](https://www.npmjs.com/package/@napi-rs/cli).
## Installing gbt
Installing gbt requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support).
Installing gbt requires a [supported version of Node and Rust](https://github.com/napi-rs/napi-rs#platform-support).
You can install the project with npm. In the project directory, run:
@ -24,7 +24,7 @@ If you have already installed the project and only want to run the build, run:
$ npm run build
```
This command uses the [cargo-cp-artifact](https://github.com/neon-bindings/cargo-cp-artifact) utility to run the Rust build and copy the built library into `./index.node`.
This command uses the [napi build](https://www.npmjs.com/package/@napi-rs/cli) utility to run the Rust build and copy the built library into `./gbt.[TARGET_TRIPLE].node`.
## Exploring gbt
@ -43,11 +43,11 @@ In the project directory, you can run:
### `npm install`
Installs the project, including running `npm run build`.
Installs the project, including running `npm run build-release`.
### `npm build`
Builds the Node addon (`index.node`) from source.
Builds the Node addon (`gbt.[TARGET_TRIPLE].node`) from source.
Additional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm build` and `npm build-*` commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html):
@ -75,7 +75,7 @@ The directory structure of this project is:
gbt/
├── Cargo.toml
├── README.md
├── index.node
├── gbt.[TARGET_TRIPLE].node
├── package.json
├── src/
| └── lib.rs
@ -90,7 +90,7 @@ The Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.htm
This file.
### index.node
### gbt.\[TARGET_TRIPLE\].node
The Node addon—i.e., a binary Node module—generated by building the project. This is the main module for this package, as dictated by the `"main"` key in `package.json`.
@ -114,7 +114,7 @@ Binary artifacts generated by the Rust build.
## Learn More
To learn more about Neon, see the [Neon documentation](https://neon-bindings.com).
To learn more about Neon, see the [Napi-RS documentation](https://napi.rs/docs/introduction/getting-started).
To learn more about Rust, see the [Rust documentation](https://www.rust-lang.org).