From 01b5a6dc3f2811555e8bc8ec479cd03d339586f5 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 17 Dec 2021 17:31:09 +0800 Subject: [PATCH] docs(cli): add note for --target flag --- cli/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/README.md b/cli/README.md index e17b3520..ef7bbab6 100644 --- a/cli/README.md +++ b/cli/README.md @@ -73,6 +73,8 @@ If not set, cli will read the `package.name` field in `Cargo.toml` under `proces > default `undefined` +> Note you should have `rustup` installed if omit the `--target` flag. The `@napi-rs/cli` will try to find the default target on your system via `rustup` if no `--target` specified. + You can also define this value using the `RUST_TARGET` environment variable. This value will be passed to `Cargo build` command directly. eg: `napi build --target x86_64-unknown-linux-musl`