Skip to content

docs: Cargo.toml - Update rustc dep upstream reference#5

Closed
polarathene wants to merge 1 commit intosunfishcode:mainfrom
polarathene:patch-1
Closed

docs: Cargo.toml - Update rustc dep upstream reference#5
polarathene wants to merge 1 commit intosunfishcode:mainfrom
polarathene:patch-1

Conversation

@polarathene
Copy link

@polarathene polarathene commented Feb 26, 2026

UPDATE: Looking at alexcrichton/dlmalloc-rs vs sunfishcode/rustix-dlmalloc history, it seems you're maintaining the fork for rustix support by rewriting history with a rebase to sync for updates? I'll raise this PR upstream at alexcrichton/dlmalloc-rs instead then 👍 (EDIT: Done)


This appears to have changed in 2020 with Rust 1.47.

The reference doesn't quite communicate the context for usage here in this crate? I assume it's related to building the std lib with nightly? The comment might benefit from a little more context regarding that but I doubt most readers care (if they don't grok the provided context)? 😅

@polarathene
Copy link
Author

Using git blame shows the addition was contributed in this commit from Nov 2018, which then references upstream for details: rust-lang/rust#56092

That reference is a bit more clearer with intent.

gimli-rs/addr2line has the following commentary for their Cargo.toml:

[dependencies]
# ...

# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' }
alloc = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-alloc' }


[features]
# ...

# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
rustc-dep-of-std = ['core', 'alloc', 'gimli/rustc-dep-of-std']

That same Nov 2018 commit shows that the cfg-if dep is unrelated to other two deps for supporting rustc-dep-of-std, so it shouldn't be grouped contextually with those 😓

cfg-if was added here (commit from March 2022) and PR in Jan 2024 at alexcrichton/dlmalloc-rs (prior to forking into sunfishcode/rustix-dlmalloc).


Additionally it seems since Rust 1.89 (Aug 2025), there is no longer a need for compiler_builtins, only core?

Looking at some projects that dropped it, I didn't see any change to a rust-version field in Cargo.toml, so AFAIU this is only relevant to nightly? (unless at some point the ability to build libstd becomes stable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant