首页 > 其他分享 >sccache 基于rust 类似ccache 的编译cache 工具

sccache 基于rust 类似ccache 的编译cache 工具

时间:2023-01-01 20:56:22浏览次数:52  
标签:基于 cache 编译 sccache ccache https rust

sccache 类似ccache 的编译cache 工具,支持基于本地磁盘,或者云对象存储

特性

  • 基于c/c++ ,rust 编译
  • 支持增量编译

rust 集成使用

可以通过定义build.rustc-wrapper ,

  • 基于配置文件
    参考配置$HOME/.cargo/config.toml, 注意需要1.40 版本的cargo
 
[build]
rustc-wrapper = "/path/to/sccache"
  • 基于环境变量
    RUSTC_WRAPPER
 
export RUSTC_WRAPPER=/path/to/sccache
cargo build

说明

对于rust 项目的快速构建sccache是一个不错的选择

参考资料

https://github.com/mozilla/sccache
https://ccache.dev/
https://github.com/mozilla/sccache/blob/main/docs/DistributedQuickstart.md
https://github.com/mozilla/sccache/blob/main/docs/Jenkins.md

标签:基于,cache,编译,sccache,ccache,https,rust
From: https://www.cnblogs.com/rongfengliang/p/17018565.html

相关文章