🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

cc

Package Overview
Dependencies
Maintainers
0
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cc - cargo Package Compare versions

Comparing version
1.2.56
to
1.2.57
+1
-1
.cargo_vcs_info.json
{
"git": {
"sha1": "709c27f9aa188db973958c332f2c3e047c732fdf"
"sha1": "77f88665c649ac70792a15a73709ad93a35917ae"
},
"path_in_vcs": ""
}

@@ -7,15 +7,15 @@ # This file is automatically @generated by Cargo.

name = "anyhow"
version = "1.0.101"
version = "1.0.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea"
checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]]
name = "bitflags"
version = "2.10.0"
version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
[[package]]
name = "cc"
version = "1.2.56"
version = "1.2.57"
dependencies = [

@@ -77,3 +77,3 @@ "find-msvc-tools",

"libc",
"r-efi",
"r-efi 5.3.0",
"wasip2",

@@ -84,9 +84,9 @@ ]

name = "getrandom"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
dependencies = [
"cfg-if",
"libc",
"r-efi",
"r-efi 6.0.0",
"wasip2",

@@ -159,11 +159,11 @@ "wasip3",

name = "libc"
version = "0.2.181"
version = "0.2.183"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5"
checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
[[package]]
name = "linux-raw-sys"
version = "0.11.0"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"

@@ -184,5 +184,5 @@ [[package]]

name = "once_cell"
version = "1.21.3"
version = "1.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"

@@ -210,5 +210,5 @@ [[package]]

name = "quote"
version = "1.0.44"
version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
dependencies = [

@@ -225,6 +225,12 @@ "proc-macro2",

[[package]]
name = "r-efi"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
name = "rustix"
version = "1.1.3"
version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34"
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
dependencies = [

@@ -294,5 +300,5 @@ "bitflags",

name = "syn"
version = "2.0.115"
version = "2.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e614ed320ac28113fa64972c4262d5dbc89deacdfd00c34a3e4cea073243c12"
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
dependencies = [

@@ -306,8 +312,8 @@ "proc-macro2",

name = "tempfile"
version = "3.25.0"
version = "3.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1"
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [
"fastrand",
"getrandom 0.4.1",
"getrandom 0.4.2",
"once_cell",

@@ -320,5 +326,5 @@ "rustix",

name = "unicode-ident"
version = "1.0.23"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"

@@ -325,0 +331,0 @@ [[package]]

@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

name = "cc"
version = "1.2.56"
version = "1.2.57"
authors = ["Alex Crichton <alex@alexcrichton.com>"]

@@ -19,0 +19,0 @@ build = false

@@ -10,2 +10,9 @@ # Changelog

## [1.2.57](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.56...cc-v1.2.57) - 2026-03-13
### Other
- Size archiver batches according to argument length not argument count ([#1689](https://github.com/rust-lang/cc-rs/pull/1689))
- Added `Build::env` for setting environment variables of compiler invocations and other child processes ([#1656](https://github.com/rust-lang/cc-rs/pull/1656) [#1682](https://github.com/rust-lang/cc-rs/pull/1682))
## [1.2.56](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.55...cc-v1.2.56) - 2026-02-13

@@ -12,0 +19,0 @@

disallowed-methods = [
{ path = "std::env::var_os", reason = "Please use Build::getenv" },
{ path = "std::env::var", reason = "Please use Build::getenv" },
{ path = "std::env::set_var", reason = "use `GlobalEnv::lock().set`" },
{ path = "std::env::remove_var", reason = "use `GlobalEnv::lock().remove`" },
]
doc-valid-idents = ["AppleClang", "OpenBSD", ".."]

@@ -19,3 +19,3 @@ //! Miscellaneous helpers for running commands

use crate::{Error, ErrorKind, Object};
use crate::{utilities::cargo_env_var_os, Error, ErrorKind, Object};

@@ -312,7 +312,3 @@ #[derive(Clone, Debug)]

// and making the output system-dependent
//
// NOTE: Here we allow using std::env::var (instead of Build::getenv) because
// CARGO_* variables always trigger a rebuild when changed
#[allow(clippy::disallowed_methods)]
let dirname = if let Some(root) = std::env::var_os("CARGO_MANIFEST_DIR") {
let dirname = if let Some(root) = cargo_env_var_os("CARGO_MANIFEST_DIR") {
let root = root.to_string_lossy();

@@ -319,0 +315,0 @@ Cow::Borrowed(dirname.strip_prefix(&*root).unwrap_or(&dirname))

@@ -221,10 +221,7 @@ use std::marker::PhantomData;

use crate::parallel::async_executor::YieldOnce;
use crate::{parallel::async_executor::YieldOnce, utilities::cargo_env_var_os};
use std::{
env::var,
sync::atomic::{
AtomicU32,
Ordering::{AcqRel, Acquire},
},
use std::sync::atomic::{
AtomicU32,
Ordering::{AcqRel, Acquire},
};

@@ -235,3 +232,2 @@

impl JobServer {
#[allow(clippy::disallowed_methods)]
pub(super) fn new() -> Self {

@@ -242,5 +238,4 @@ // Use `NUM_JOBS` if set (it's configured by Cargo) and otherwise

let parallelism = var("NUM_JOBS")
.ok()
.and_then(|j| j.parse::<u32>().ok())
let parallelism = cargo_env_var_os("NUM_JOBS")
.and_then(|j| j.to_str()?.parse::<u32>().ok())
.or_else(|| Some(std::thread::available_parallelism().ok()?.get() as u32))

@@ -247,0 +242,0 @@ .unwrap_or(4);

@@ -1,4 +0,8 @@

use std::{env, mem};
use std::mem;
use crate::{target::TargetInfo, utilities::OnceLock, Error, ErrorKind};
use crate::{
target::TargetInfo,
utilities::{cargo_env_var, OnceLock},
Error, ErrorKind,
};

@@ -18,12 +22,3 @@ #[derive(Debug)]

// `TARGET` must be present.
//
// No need to emit `rerun-if-env-changed` for this,
// as it is controlled by Cargo itself.
#[allow(clippy::disallowed_methods)]
let target_name = env::var("TARGET").map_err(|err| {
Error::new(
ErrorKind::EnvVarNotFound,
format!("failed reading TARGET: {err}"),
)
})?;
let target_name = cargo_env_var("TARGET")?;

@@ -36,16 +31,14 @@ // Parse the full architecture name from the target name.

let cargo_env = |name, fallback: Option<&str>| -> Result<Box<str>, Error> {
// No need to emit `rerun-if-env-changed` for these,
// as they are controlled by Cargo itself.
#[allow(clippy::disallowed_methods)]
match env::var(name) {
Ok(var) => Ok(var.into_boxed_str()),
Err(err) => match fallback {
Some(fallback) => Ok(fallback.into()),
None => Err(Error::new(
ErrorKind::EnvVarNotFound,
format!("did not find fallback information for target `{target_name}`, and failed reading {name}: {err}"),
)),
},
}
let cargo_env = |key, fallback: Option<&str>| match cargo_env_var(key) {
Ok(var) => Ok(var.into_boxed_str()),
Err(err) => match fallback {
Some(fallback) => Ok(fallback.into()),
None => Err(Error::new(
ErrorKind::EnvVarNotFound,
format!(
"did not find fallback information for target `{target_name}`: {}",
err.message
),
)),
},
};

@@ -52,0 +45,0 @@

use std::{
cell::UnsafeCell,
ffi::OsStr,
ffi::{OsStr, OsString},
fmt::{self, Write},

@@ -12,2 +12,4 @@ marker::PhantomData,

use crate::{Error, ErrorKind};
pub(super) struct JoinOsStrs<'a, T> {

@@ -132,1 +134,29 @@ pub(super) slice: &'a [T],

}
/// Access an environment variable that's set by Cargo.
///
/// <https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts>
///
/// Cargo doesn't need to be told about these with `rerun-if-env-changed`, and
/// that we don't want to allow overwriting them with `Build::env`.
#[allow(clippy::disallowed_methods)] // Cargo env, no need for cache busting.
pub(crate) fn cargo_env_var_os(key: &str) -> Option<OsString> {
std::env::var_os(key)
}
pub(crate) fn cargo_env_var(key: &str) -> Result<String, Error> {
if let Some(value) = cargo_env_var_os(key) {
match value.into_string() {
Ok(value) => Ok(value),
Err(value) => Err(Error::new(
ErrorKind::EnvVarNotFound,
format!("environment variable {key} is not valid utf-8: {value:?}"),
)),
}
} else {
Err(Error::new(
ErrorKind::EnvVarNotFound,
format!("environment variable {key} not defined"),
))
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display