Dor*_*her 9 rust smartcontracts nearprotocol
如果您在构建 Rust 应用程序时遇到此问题
error[E0463]: can't find crate for core| = note: the "wasm32-unknown-unknown" target may not be installed
要解决此错误,请运行
rustup target add wasm32-unknown-unknown
在文件中,这应该可以解决问题
Rya*_*yan 14
要解决此错误,请运行:
rustup target add wasm32-unknown-unknown
在终端中,这应该可以解决问题。
注意:我只是在这里发布作为原始问题提出者 Dorian Crutcher 在他们的问题中已经写下的答案。但这个建议对我也很有效。
nai*_*eai 11
对于遇到此问题的未来读者(主要是我自己),还有另一个可能导致此错误或类似错误的重要因素,但很难意识到:Rust 和/或 Cargo 的版本冲突。这意味着即使在运行后它仍然存在rustup target add wasm32-unknown-unknown。
就我而言,我是同时rust安装的,这导致了一系列混乱和冲突。您应该确保仅从. 仔细检查系统上的每个包管理器,因为可能已作为另一个包的依赖项安装,例如在我的情况下。此类软件包应通过货物本身卸载和管理,从而保留在.brewrustuprustuprustcargo-nextestrustup