交叉编译需要指定target选项,比如:
# in config.toml [target.x86_64-unknown-linux-musl] rustflags = [ "-C", "linker-flavor=gcc", "-C", "link-self-contained=no", ] # zig cc -target x86_64-linux-musl linker = ".cargo/musl-zcc.bat"