@napi-rs/cliCli tools for napi-rs
DEBUG="napi:*" napi [command]
napi buildBuild command. Build rust codes and copy the dynamic lib binary file to the dist dir.
--platformdefault
false
Append platform-arch-[abi] name to dist file. eg: index.darwin-x64.node.
--releasedefault
false
Is release build. This flag will be passed to Cargo directly.
--featuresdefault
''
Cargo features, passthrough to cargo build command.
--config,-cdefault
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-namedefault
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 _.
--targetdefault
undefined
This value will be passed to Cargo build command directly. eg: napi build --target x86_64-unknown-linux-musl
--cargo-flagsdefault
undefined
Other flags you want pass to Cargo build.
napi artifactsCopy artifact files in Github actions.