rust/compiler/rustc_public/Cargo.toml
Alona Enraght-Moony e7b84604cb rustc_public: Make Id types !Send / !Sync
These types are Id's to a table stored in TLS, so using them from
another tread will either panic, or give wrong results.

Therefor, I've added a `ThreadLocalIndex` marker type, which ensures types
arn't `Send`/`Sync`.

This is a breaking change for users of the `rustc_public` crate.

Zulip Discussion: https://rust-lang.zulipchat.com/#narrow/channel/320896-project-stable-mir/topic/WDYM.20.22should.20not.20.20be.20shared.20across.20threads.22/with/547374171
2025-11-19 19:46:18 +00:00

31 lines
938 B
TOML

[package]
name = "rustc_public"
version = "0.1.0-preview"
edition = "2024"
[dependencies]
# tidy-alphabetical-start
rustc_abi = { path = "../rustc_abi" }
rustc_hir = { path = "../rustc_hir" }
rustc_middle = { path = "../rustc_middle" }
rustc_public_bridge = { path = "../rustc_public_bridge" }
rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
scoped-tls = "1.0"
serde = { version = "1.0.125", features = ["derive"] }
tracing = "0.1"
# tidy-alphabetical-end
[dev-dependencies]
# tidy-alphabetical-start
serde_json = "1.0.142"
# tidy-alphabetical-end
[features]
# tidy-alphabetical-start
# Provides access to APIs that expose internals of the rust compiler.
# APIs enabled by this feature are unstable. They can be removed or modified
# at any point and they are not included in the crate's semantic versioning.
rustc_internal = []
# tidy-alphabetical-end