docs(cli): add note for --target flag

This commit is contained in:
LongYinan 2021-12-17 17:31:09 +08:00
parent bbd466b69c
commit 01b5a6dc3f
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7

View file

@ -73,6 +73,8 @@ If not set, cli will read the `package.name` field in `Cargo.toml` under `proces
> default `undefined` > 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. 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` This value will be passed to `Cargo build` command directly. eg: `napi build --target x86_64-unknown-linux-musl`