napi-rs/cli
dependabot[bot] c688fc1b3c
build(deps): bump @octokit/rest from 18.0.14 to 18.0.15
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.0.14 to 18.0.15.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v18.0.14...v18.0.15)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-01 05:55:37 +00:00
..
src fix(cli): mkdir -p is not valid command in powershell 2021-01-15 00:51:42 +08:00
.npmignore feat(cli): new project command 2020-12-23 00:16:45 +08:00
CHANGELOG.md chore: publish 2021-01-15 11:18:40 +08:00
LICENSE refactor(cli): init yarn workspace, move napi-rs package => @napi-rs/cli 2020-12-02 22:34:39 +08:00
package.json build(deps): bump @octokit/rest from 18.0.14 to 18.0.15 2021-02-01 05:55:37 +00:00
README.md refactor(cli): init yarn workspace, move napi-rs package => @napi-rs/cli 2020-12-02 22:34:39 +08:00

@napi-rs/cli

Cli tools for napi-rs

Commands

Debug mode

DEBUG="napi:*" napi [command]

napi build

Build command. Build rust codes and copy the dynamic lib binary file to the dist dir.

--platform

default false

Append platform-arch-[abi] name to dist file. eg: index.darwin-x64.node.

--release

default false

Is release build. This flag will be passed to Cargo directly.

--features

default ''

Cargo features, passthrough to cargo build command.

--config,-c

default package.json

napi-rs config file name. napi-rs config example :

{
  "name": "@native-binding/fib",
  "version": "0.1.0",
  "napi": {
    "name": "fib", // binary name
    "triples": {
      "defaults": true, // default true, if this value is true, will build `x86_64-pc-windows-msvc`, `x86_64-apple-darwin` and `x86_64-unknown-linux-gnu`
      "addition": [
        "x86_64-unknown-linux-musl",
        "x86_64-unknown-freebsd",
        "aarch64-unknown-linux-gnu"
      ]
    }
  }
}

--cargo-name

default undefined

If not set, cli will read the package.name field in Cargo.toml under process.cwd(). The - in the name will be replaced with _.

--target

default undefined

This value will be passed to Cargo build command directly. eg: napi build --target x86_64-unknown-linux-musl

--cargo-flags

default undefined

Other flags you want pass to Cargo build.

napi artifacts

Copy artifact files in Github actions.