Skip to content

Commit 46ae155

Browse files
authored
Rollup merge of #132579 - RalfJung:rustc-std-workspace-crates, r=Amanieu
add rustc std workspace crate sources This adds the sources for the crates listed at https://crates.io/search?q=rustc-std-workspace in this repo. The first commit adds the original sources as downloaded from crates.io (with `Cargo.toml.orig` moved back over `Cargo.toml`), and adds a README explaining what this is about. The 2nd commit updates the sources to make the core and alloc crates re-exports of the "actual" core and alloc crates, as was already the case with `std`, and also adds a `repository` link to the manifest so one can figure out where to find these crates. I bumped the version for the core and alloc crates in the hope that the new versions can be published on crates.io shortly after this PR lands. See [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/rustc-std-workspace-core.20crate.20is.20empty) for a bit more context. r? `@Amanieu`
2 parents 909574e + b127458 commit 46ae155

File tree

10 files changed

+62
-0
lines changed

10 files changed

+62
-0
lines changed

Cargo.lock

+12
Original file line numberDiff line numberDiff line change
@@ -3196,6 +3196,18 @@ version = "0.1.0"
31963196
source = "registry+https://github.com/rust-lang/crates.io-index"
31973197
checksum = "e5c9f15eec8235d7cb775ee6f81891db79b98fd54ba1ad8fae565b88ef1ae4e2"
31983198

3199+
[[package]]
3200+
name = "rustc-std-workspace-alloc"
3201+
version = "1.0.1"
3202+
3203+
[[package]]
3204+
name = "rustc-std-workspace-core"
3205+
version = "1.0.1"
3206+
3207+
[[package]]
3208+
name = "rustc-std-workspace-std"
3209+
version = "1.0.1"
3210+
31993211
[[package]]
32003212
name = "rustc_abi"
32013213
version = "0.0.0"

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ resolver = "2"
33
members = [
44
"compiler/rustc",
55
"src/etc/test-float-parse",
6+
"src/rustc-std-workspace/rustc-std-workspace-core",
7+
"src/rustc-std-workspace/rustc-std-workspace-alloc",
8+
"src/rustc-std-workspace/rustc-std-workspace-std",
69
"src/rustdoc-json-types",
710
"src/tools/build_helper",
811
"src/tools/cargotest",

library/rustc-std-workspace-core/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ it'll look like
2727

2828
when Cargo invokes the compiler, satisfying the implicit `extern crate core`
2929
directive injected by the compiler.
30+
31+
The sources for the crates.io version can be found in
32+
[`src/rustc-std-workspace`](../../src/rustc-std-workspace).

src/rustc-std-workspace/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
See [`library/rustc-std-workspace-core/README.md`](../../library/rustc-std-workspace-core/README.md) for context.
2+
3+
These are the crates.io versions of these crates, as opposed to the versions
4+
in `library` which are the ones used inside the rustc workspace.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "rustc-std-workspace-alloc"
3+
version = "1.0.1"
4+
authors = ["Alex Crichton <[email protected]>"]
5+
edition = "2021"
6+
license = 'MIT/Apache-2.0'
7+
description = """
8+
crate for integration of crates.io crates into rust-lang/rust standard library workspace
9+
"""
10+
11+
repository = "https://github.com/rust-lang/rust/tree/master/src/rustc-std-workspace"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#![no_std]
2+
extern crate alloc as the_alloc;
3+
pub use the_alloc::*;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "rustc-std-workspace-core"
3+
version = "1.0.1"
4+
authors = ["Alex Crichton <[email protected]>"]
5+
edition = "2021"
6+
license = "MIT/Apache-2.0"
7+
description = """
8+
crate for integration of crates.io crates into rust-lang/rust standard library workspace
9+
"""
10+
11+
repository = "https://github.com/rust-lang/rust/tree/master/src/rustc-std-workspace"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#![no_std]
2+
extern crate core as the_core;
3+
pub use the_core::*;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "rustc-std-workspace-std"
3+
version = "1.0.1"
4+
authors = ["Alex Crichton <[email protected]>"]
5+
edition = "2021"
6+
license = "MIT/Apache-2.0"
7+
description = """
8+
crate for integration of crates.io crates into rust-lang/rust standard library workspace
9+
"""
10+
11+
repository = "https://github.com/rust-lang/rust/tree/master/src/rustc-std-workspace"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub use std::*;

0 commit comments

Comments
 (0)