I am using the cargo crate to build a rust project using the cargo::ops::compile()
function. I also have a custom target in a json file.
我正在使用Cargo::Ops::Compile()函数使用Cargo::Ops::Compile()函数构建铁锈项目。我在一个json文件中也有一个定制目标。
How do I use that target file to build the project to the correct target? Is there a place for a target in the CompileOptions
struct? I know that there is rustc_target_args
in that struct, do I have to manually convert my target to a list of rustc arguments?
如何使用目标文件将项目构建到正确目标?CompileOptions结构中是否有目标的位置?我知道该结构中有rustc_Target_args,我是否必须手动将目标转换为一组rustc参数?
更多回答
优秀答案推荐
我是一名优秀的程序员,十分优秀!