2021-07-03 12:18:13 -04:00
|
|
|
[package]
|
|
|
|
|
name = "rustc_transmute"
|
2023-10-18 21:55:15 +00:00
|
|
|
version = "0.0.0"
|
2025-02-20 18:37:58 +00:00
|
|
|
edition = "2024"
|
2021-07-03 12:18:13 -04:00
|
|
|
|
|
|
|
|
[dependencies]
|
2023-10-20 13:37:29 +11:00
|
|
|
# tidy-alphabetical-start
|
2024-10-27 17:21:23 -07:00
|
|
|
rustc_abi = { path = "../rustc_abi", optional = true }
|
2024-02-24 17:22:28 -05:00
|
|
|
rustc_data_structures = { path = "../rustc_data_structures" }
|
|
|
|
|
rustc_hir = { path = "../rustc_hir", optional = true }
|
|
|
|
|
rustc_middle = { path = "../rustc_middle", optional = true }
|
|
|
|
|
rustc_span = { path = "../rustc_span", optional = true }
|
transmutability: Mark edges by ranges, not values
In the `Tree` and `Dfa` representations of a type's layout, store byte
ranges rather than needing to separately store each byte value. This
permits us to, for example, represent a `u8` using a single 0..=255 edge
in the DFA rather than using 256 separate edges.
This leads to drastic performance improvements. For example, on the
author's 2024 MacBook Pro, the time to convert the `Tree` representation
of a `u64` to its equivalent DFA representation drops from ~8.5ms to
~1us, a reduction of ~8,500x. See `bench_dfa_from_tree`.
Similarly, the time to execute a transmutability query from `u64` to
`u64` drops from ~35us to ~1.7us, a reduction of ~20x. See
`bench_transmute`.
2025-04-10 13:45:39 -07:00
|
|
|
smallvec = "1.8.1"
|
2025-09-02 19:09:13 +10:00
|
|
|
tracing = "0.1"
|
2023-10-20 13:37:29 +11:00
|
|
|
# tidy-alphabetical-end
|
2021-07-03 12:18:13 -04:00
|
|
|
|
2025-04-27 07:37:27 +02:00
|
|
|
[dev-dependencies]
|
|
|
|
|
# tidy-alphabetical-start
|
2025-09-02 19:09:13 +10:00
|
|
|
itertools = "0.12"
|
2025-04-27 07:37:27 +02:00
|
|
|
# tidy-alphabetical-end
|
|
|
|
|
|
2021-07-03 12:18:13 -04:00
|
|
|
[features]
|
2025-07-31 13:15:49 +10:00
|
|
|
# tidy-alphabetical-start
|
2021-07-03 12:18:13 -04:00
|
|
|
rustc = [
|
2024-10-27 17:21:23 -07:00
|
|
|
"dep:rustc_abi",
|
2024-07-15 12:40:06 -04:00
|
|
|
"dep:rustc_hir",
|
|
|
|
|
"dep:rustc_middle",
|
|
|
|
|
"dep:rustc_span",
|
2021-07-03 12:18:13 -04:00
|
|
|
]
|
2025-07-31 13:15:49 +10:00
|
|
|
# tidy-alphabetical-end
|