cc-rs VS cargo-auditable

Compare cc-rs vs cargo-auditable and see what are their differences.

cc-rs

Rust library for build scripts to compile C/C++ code into a Rust library (by rust-lang)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
cc-rs cargo-auditable
8 23
1,731 553
0.2% 3.8%
9.0 7.8
10 days ago 5 days ago
Rust Rust
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

cc-rs

Posts with mentions or reviews of cc-rs. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-07.
  • RustPython – A Python-3 (CPython >= 3.11.0) Interpreter written in Rust
    8 projects | news.ycombinator.com | 7 Mar 2023
    It does support calling into other compilers and toolchains through build scripts and such. Take cc-rs[0] for example: this allows building C and C++ files natively without even calling an executable yourself.

    In practice, I'd expect libraries to just call make/cmake/ninja for you, or (like openssl-sys) ask you to install the necessary libraries using your favourite package manager.

    [0]: https://github.com/rust-lang/cc-rs

  • Any crates for compiling C ( or other language ) from a rust binary?
    1 project | /r/rust | 8 Jan 2023
    The cc crate (https://github.com/rust-lang/cc-rs) is widely used for compiling C code from Rust (often in a build.rs file for the purpose of wrapping a C library so that it can be used from Rust). However, I believe it generally does expect a C compiler to be present.
  • Calling C code from Rust
    3 projects | dev.to | 17 Aug 2022
    It might be quite tedious to compile static library manually every time we make changes in C code. The better solution is to instead utilize the cc crate, which provides an idiomatic Rust interface to the compiler provided by the host.
  • cc-rs is looking for new maintainers
    1 project | /r/rust | 8 Mar 2022
  • Hello, youki! Faster container runtime is written in Rust
    3 projects | /r/programming | 27 Dec 2021
    https://github.com/alexcrichton/cc-rs This crates lets you shell out to a C compiler when building your Rust project
  • Maintain It with Zig
    16 projects | news.ycombinator.com | 8 Sep 2021
    > You're splitting hairs in a weird way. rustc cannot compile C code. zig can.

    But why do I care? I don't use rustc directly, the build system of choice does. And very few of the major build systems have an issue handling multiple languages.

    Cargo (rust's build system) supports build scripts and the community has already created C/C++ compiler hooks such as https://github.com/alexcrichton/cc-rs

    rustup and cargo also provide easy cross-compilation support, too.

  • Windows can't find link exe
    1 project | /r/rust | 5 Aug 2021
    I think it's getting confused because link.exe is in your PATH. But it's not the link.exe it expects. Link tools are detected using the cc crate so it would need to be fixed there. Would you be willing to open an issue about this?
  • Most loved programming language Rust sparks privacy concerns
    6 projects | /r/rust | 3 Apr 2021
    It’s not super well-documented, but there is an option to change this. --remap-path-prefix $(pwd)= in your RUSTFLAGS will usually do the trick. If you have any C dependencies you’ll also need similar things in CFLAGS, see https://github.com/alexcrichton/cc-rs/issues/593

cargo-auditable

Posts with mentions or reviews of cargo-auditable. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-04.
  • Rust Offline?
    9 projects | /r/rust | 4 May 2023
    Further we use cargo-auditable and cargo-audit as part of both our pipeline and regular scanning of all deployed services. This makes our InfoSec and Legal super happy since it means they can also monitor compliance with licenses and patch/update timings.
  • Hey Rustaceans! Got a question? Ask here (15/2023)!
    15 projects | /r/rust | 10 Apr 2023
    This exists, see cargo auditable.
  • The Rust Implementation Of GNU Coreutils Is Becoming Remarkably Robust
    2 projects | /r/rust | 12 Feb 2023
    The Rust community seems to have settled on a perfectly reasonable way to address bit-rot in statically linked binaries. https://github.com/rust-secure-code/cargo-auditable
  • Release Engineering Is Exhausting So Here's cargo-dist
    8 projects | /r/rust | 1 Feb 2023
    Would you be open to integrating cargo auditable into this pipeline in some form? It seems like a great match.
  • Swift Achieved Dynamic Linking Where Rust Couldn't
    10 projects | news.ycombinator.com | 29 Jan 2023
    > and static compilation probably just hides the problem unless security scanners these days can identify statically compiled vulnerable versions of libraries

    Some scanners like trivy [1] can scan statically compiled binaries, provided they include dependency version information (I think go does this on its own, for rust there's [2], not sure about other languages).

    It also looks into your containers.

    The problem is what to do when it finds a vulnerability. In a fat app with dynamic linking you could exchange the offending library, check that this doesn't break anything for your use case, and be on your way. But with static linking you need to compile a new version, or get whoever can build it to compile a new version. Which seems to be a major drawback of discouraging fat apps.

    1: https://github.com/aquasecurity/trivy

    2: https://github.com/rust-secure-code/cargo-auditable

  • 'cargo auditable' can now be used as a drop-in replacement for Cargo
    5 projects | /r/rust | 9 Dec 2022
    I have investigated a bunch of standardized formats - SPDX, CycloneDX, etc. All of them are unsuitable for a variety of reasons, chief of which are being way too verbose and including timestamps, which would break reproducible builds.
  • sccache now supports GHA as backend
    4 projects | /r/rust | 7 Dec 2022
    The fix for interoperability with cargo auditable has also shipped in the latest release of sccache. You can use the released sccache now instead of building it from git!
  • `cargo audit` can now scan compiled binaries
    6 projects | /r/rust | 2 Nov 2022
    I've been working to bring vulnerability scanning to Rust binaries by creating cargo auditable, which embeds the list of dependencies and their versions into the compiled binary. This lets you audit the binary you actually run, instead of the Cargo.lock file in some repo somewhere.
  • Here's how to patch the upcoming OpenSSL vulnerability in Rust
    2 projects | /r/rust | 30 Oct 2022
    cargo auditable solves this problem by embedding the list of dependencies and their versions into the binaries. But until it becomes part of Cargo and gets enabled by default, static linking will remain problematic.
  • Introducing cargo-auditable: audit Rust binaries for known bugs or vulnerabilities in production
    1 project | /r/rust | 15 Oct 2022

What are some alternatives?

When comparing cc-rs and cargo-auditable you can also consider the following projects:

RIIR - why not Rewrite It In Rust

trivy - Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more

mach - zig game engine & graphics toolkit

auto-fuzz-test - Effortlessly fuzz libraries with large API surfaces

arocc - A C compiler written in Zig.

cargo-supply-chain - Gather author, contributor and publisher data on crates in your dependency graph.

ohmygentool - LLVM/Clang based bindings generator for D language

eve-rs - A simple, intuitive, express-like HTTP library

zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

svntogit-community - Automatic import of svn 'community' repo (read-only mirror)

utfcpp - UTF-8 with C++ in a Portable Way

sandbox - A sand simulation game