首页 > 其他分享 >cargo rustc

cargo rustc

时间:2023-04-18 10:56:16浏览次数:36  
标签:cargo target rustc xxx feature atomic

RUSTC_BOOTSTRAP=1

如果需要在稳定版编译器上执行一些夜间发布功能,可以设置该环境变量。

$ cargo rustc -- -Zunpretty=expanded
   Compiling xxx v0.1.0 (F:\xxx)
error: the option `Z` is only accepted on the nightly compiler


$ RUSTC_BOOTSTRAP=1 cargo rustc -- -Z unpretty=expanded
   Compiling xxx v0.1.0 (F:\xxx)
#![feature(prelude_import)]
#![windows_subsystem = "console"]
#[prelude_import]
use std::prelude::rust_2021::*;
#[macro_use]
extern crate std;

打印cfg

$ cargo rustc -- --print cfg
   Compiling xxx v0.1.0 (F:\xxx)
debug_assertions
panic="unwind"
target_arch="x86_64"
target_endian="little"
target_env="msvc"
target_family="windows"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_os="windows"
target_pointer_width="64"
target_vendor="pc"
windows

标签:cargo,target,rustc,xxx,feature,atomic
From: https://www.cnblogs.com/develon/p/17328776.html

相关文章

  • Rust编程语言入门之cargo、crates.io
    cargo、crates.io本章内容通过releaseprofile来自定义构建在https://crates.io/上发布库通过workspaces组织大工程从https://crates.io/来安装库使用自定义命令扩展cargo一、通过releaseprofile来自定义构建releaseprofile(发布配置)releaseprofile:是预......
  • Azure虚拟桌面专题之十一:解决DomainTrustCheck失败导致会话主机状态不可用问题
    在创建完主机池并添加会话主机之后,在主机池概述中发现虚拟机总数和不可用状态数量一样,也就是说所有的虚拟机状态都处于不可用刚开始创建之后的几分钟内状态不可用是正常现象......
  • cargo update failed
    https://blog.csdn.net/weixin_39420106/article/details/127345581?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTR......
  • 13.进一步认识Cargo及crates.io
    一、使用发布配置来定制构建Rust中的发布配置是一系列预定义好的配置方案,它们的配置选项各有不同,都允许程序员对细节进行定制修改。Cargo最常用的配置有两种:执行cargob......
  • ubuntu上cargo run报错error: failed to run custom build command for `openssl-sys
    这是因为使用reqwest的包,用到了openssl的库。按照提示"Makesureyoualsohavethedevelopmentpackagesofopensslinstalled.libssl-devonUbuntuoropenssl-deve......
  • 在rust语言中使用Cargo命令输出汇编文档
    首先来一波效果展示:(这是我使用方法二输出的文档,使用vscode工具查看的结果) 正文如下: 一、您可以使用Cargo的cargorustc命令直接向rustc发送参数:方法一:1cargorus......
  • Rust cargo镜像加速
    推荐使用科大的注册服务来提升拉取依赖的速度,地址:https://mirrors.ustc.edu.cn/help/crates.io-index.html1.部分依赖镜像支持【也就是添加一个镜像地址,在拉取依赖的......
  • 如何在 RUST 的官方包管理器 CARGO 中发布项目!
    如何在RUST的官方包管理器CARGO中发布项目!介绍货物是系统和语言包管理器锈.大多数Rust开发人员使用这个工具来管理他们的项目,因为货物为您处理许多任务,例如......