I'm just getting started with Rust, and I wanna build and run 'Hello-Rust' demo created by cargo new hello-rust
.
but errors happened as follows:
$HOME/.cargo/bin/cargo metadata --verbose --format-version 1 --all-features --filter-platform aarch64-apple-darwin
stdout : error: failed to parse the cfg fromrustc --print=cfg
, got:
lib___.rlib
lib___.dylib
lib___.dylib
lib___.a
lib___.dylib
$HOME/.rustup/toolchains/stable-aarch64-apple-darwin
off
packed
unpacked
debug_assertions
panic="unwind"
proc_macro
target_arch="aarch64"
target_endian="little"
target_env=""
target_family="unix"
target_feature="aes"
target_feature="crc"
target_feature="dit"
target_feature="dotprod"
target_feature="dpb"
target_feature="dpb2"
target_feature="fcma"
target_feature="fhm"
target_feature="flagm"
target_feature="fp16"
target_feature="frintts"
target_feature="jsconv"
target_feature="lor"
target_feature="lse"
target_feature="neon"
target_feature="paca"
target_feature="pacg"
target_feature="pan"
target_feature="pmuv3"
target_feature="ras"
target_feature="rcpc"
target_feature="rcpc2"
target_feature="rdm"
target_feature="sb"
target_feature="sha2"
target_feature="sha3"
target_feature="ssbs"
target_feature="vh"
target_has_atomic="128"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_os="macOS"
target_pointer_width="64"
target_vendor="apple"
unixCaused by:
failed to parse `` as a cfg expression: expected identifier, but cfg expression endedstderr :
I installed rust by curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
and did nothing except checking the version by cargo -V & rustc -V
.
my rustc,cargo version is 1.71.0, and my OS version is MacOS13.4