commit:     6405a3603445e08233f1c7578dae0da58c13f1ae
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 23 08:33:14 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun 23 12:19:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6405a360

dev-lang/rust: add 1.88.0_beta20250622

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 dev-lang/rust-bin/Manifest                         |  29 +
 .../rust-bin/rust-bin-1.88.0_beta20250622.ebuild   | 314 ++++++++
 dev-lang/rust-common/Manifest                      |   2 +
 .../rust-common-1.88.0_beta20250622.ebuild         |  73 ++
 dev-lang/rust/Manifest                             |   3 +
 dev-lang/rust/rust-1.88.0_beta20250622.ebuild      | 835 +++++++++++++++++++++
 sys-devel/rust-std/Manifest                        |   2 +
 .../rust-std/rust-std-1.88.0_beta20250622.ebuild   | 179 +++++
 8 files changed, 1437 insertions(+)

diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
index 5547424f99d6..c41972b06f14 100644
--- a/dev-lang/rust-bin/Manifest
+++ b/dev-lang/rust-bin/Manifest
@@ -607,6 +607,34 @@ DIST 
rust-1.88.0_beta20250603-x86_64-unknown-linux-gnu.tar.xz 197138936 BLAKE2B
 DIST rust-1.88.0_beta20250603-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
146997de22c3cc525a98474a8d362c7d834428285640cf1297362ebecb6289b2bcb48cf9e7f9bf1f67e690ff4155042047f583e692cc482897bb3ded12db96ee
 SHA512 
5807a50f84d8b14e94b2e03b7b14a63ae12116359495523a8939be907bfcd1d106910a94f34a259edca62e7a1e0eab5454e9fabd617d651e70c109648ef1d7cc
 DIST rust-1.88.0_beta20250603-x86_64-unknown-linux-musl.tar.xz 290897768 
BLAKE2B 
03ec29cfbc09cd4e7932b22818fd63c36b718513d8fa5f235cc2817d70ec1eec7489c6565c4cfe27f6c9758f83330b794094a033fe84850b2a537b0780bfdd31
 SHA512 
8d56a657f9b9093dedf01768f658d9179521aec9169b302df978795938d3757574237dfb963aa0a92b4cfa95b4406724bd845212199b42810239468eaf1e4daf
 DIST rust-1.88.0_beta20250603-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 
d73633555a7f696387c975143718c502be47753a617d4a1a9163899dacf804cc965e7e0bafd10f22c7da3bd34f4c704100e3ec1533118cd4bbd52c9ddb6599f4
 SHA512 
35537f1b005c453357dab4326767bd00cbd38e82d905f5b7dca53355f07f38b408efe8418401587695e36a5ee12e68846b90ba6f06157bb2d8b4297b504a7128
+DIST rust-1.88.0_beta20250622-aarch64-unknown-linux-gnu.tar.xz 165290656 
BLAKE2B 
26a5a2a3b64d7de4fb3ce238c37dc8f011d44b38d170af822612b6b211e5cb68c701165bc7fec606b1cd78c9eecc6242a19a595eb737a845b4ed312ddcce7fbb
 SHA512 
b0fc537296e91a3450ae35ab089cbbe169f5ff1dc420097de494fc1f4a1563e3104c8876954d1d21fc2bf5d5b33fea9b685e3169affb6c0083d7f2496102f2e3
+DIST rust-1.88.0_beta20250622-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
06da4d97a50e48be62bfb51537f694b1dabbf2c1d3dd8d45385240c1cb06dbb8c9057dc91947b0d97b9eab009d8ff1b2493f0ef89b600aad2113f657cd18249c
 SHA512 
5c2f8c43ea506730330563ee3daac68032fdb908a59cf9bb54bbbe72180145367bf452a9c83fb4cd58af34115c61b2089a85b234f02bcfdf5d11a73c18c34ddd
+DIST rust-1.88.0_beta20250622-aarch64-unknown-linux-musl.tar.xz 243902008 
BLAKE2B 
faf1180b4072cc683e76241f1e469728e0b24ac28eb527da3aa2f85711964a3fbc2512382fcf82d72840b294076ae3f157c0379fd48ddcda842f2e5ca85236a4
 SHA512 
64b5d91ed3a71c8877598803d287cb0d93f0f86c1f6d56789693c8c09995e0c3dc91c492a47297d609b96190d726bfa91bb5f89fc111cd6138c9d949d3747a25
+DIST rust-1.88.0_beta20250622-aarch64-unknown-linux-musl.tar.xz.asc 801 
BLAKE2B 
f14d6554f81df70327c822fadafb9c5556e82d99b777c501afbb32056e0642a25482ae634dab72a7c0abb65185b883d40ed03d9d6203066c2f216bf950020885
 SHA512 
13c7bd11ccbef7e4075f04a1c9f3ad5ba7f8ce2ad2f2e8b4c694681fa642d6156fd4b7060f54efad2dbb6cc8873503b3cda0e62f6c86f1721f4c41aad35ab5dd
+DIST rust-1.88.0_beta20250622-arm-unknown-linux-gnueabi.tar.xz 229423900 
BLAKE2B 
48e924cf85603c829d1e30ff19c810afef795b61b5be67dff0f8aac370a4691811d43f797f335b5060861e1f1922de53e2bbcfd8fc59618eed38f9867e490a96
 SHA512 
87003a13ae3a64064fd3f709f3afa001602c44fbe6491f64054629d58defc6a95ca8781dc3b4234c2deedaa0b901c3e61704b42f4e939b69b0ce8bf72c7d23da
+DIST rust-1.88.0_beta20250622-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 
d472a83139d904547fc3cab76dc0e68a69e97804b7842637ae221fdb77aa1c4e374fe889bcfe03e1a8320b69e017fc5ddc66bafc8d74be852205629031d54367
 SHA512 
da0f95fd45e00148777df5cb6efe444e0d1c820012eec13c3436fa78f90aa7b026bcf39a0a7c8a00a151a9917d67b606a6212ee4ac19966b56e478df3a35a10f
+DIST rust-1.88.0_beta20250622-arm-unknown-linux-gnueabihf.tar.xz 229870700 
BLAKE2B 
962ddc9546be93b85ed3333c7f45214ceadffc4f85f95cc62109917e27daecae630381426f88270f3a353d9176edfe32b3b8ce3409d02276e7020d314e5acd8a
 SHA512 
9326a39083c2c3d3c90856a96e18d2f8be9cdd1eb2b3f5001d07dee2e4cf5dd84e15f455ab8b75390d219753898b2927e2719ccd8fc62183d95ccb7a363c60cd
+DIST rust-1.88.0_beta20250622-arm-unknown-linux-gnueabihf.tar.xz.asc 801 
BLAKE2B 
ab901eb30509cd7b430f5dd69189403959185659543a21b52329a3513628579d1876c6047758a600c30fc7625a990db35c51d6e813b16defe94517ef5fdd9238
 SHA512 
58f32c8c5045b8c28758a9b744826f051af36f9f42dbd41b1e3c7e317d1bb9d7e7eef4ba71da943cbcf0f426683248670488e0c12ea256809966d56f03933449
+DIST rust-1.88.0_beta20250622-armv7-unknown-linux-gnueabihf.tar.xz 235590732 
BLAKE2B 
73bdda8cacd9561233c67a64ed009316ecf06571422eb1717e94d8802cce998af9c7db5d1e2602bdb3d58e6100246041c60cf07812f59ceb3996d8f1f723564f
 SHA512 
13aad8fae16d388bf26d6004df21744ced0cd6d971ec69244a9792d904e7ef9d0448124fea6f94b91d83fda7ef40a6aff8119c342cb65cef465e4b6f43f0af26
+DIST rust-1.88.0_beta20250622-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 
BLAKE2B 
6df33da93a430adef012e2a182299b57cdeb866bfbe047674342ccb3551aff9ea9f23da8d91c91e955e5c3204b249177c56170fbdb27c00cd5499b003335a5f1
 SHA512 
4cfa1a85b918c79f902503c94084b07b7d6786cf56b18948374f33b74bc79ed74c370cfcb171953de0582c70066f27a551f19f1d739525b5b5ef2f0c4b8d3f13
+DIST rust-1.88.0_beta20250622-i686-unknown-linux-gnu.tar.xz 261904308 BLAKE2B 
8f5785beadc2059aefbf7642e312f3089b288ace20655c65bb1f0a27aa626edf7cba7b15e77e3557b7ffc3665a0f6efe8b0aa3e8f4c67f86c73bec32a0015b3d
 SHA512 
1cb43a86d602e84bb0af5c79e07a57c47ee5c42c1addbd2c4ebe781c82dfba5a866bd1e9f7590939a51454902b1565497606b1fffccd16d872c80c86d7ab98bd
+DIST rust-1.88.0_beta20250622-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
a0c135cf4d808d3c3ca2030cc04ad055f8771a90f7ab0932dd26266122db7040fdf455f58a4187b843d14beff28111e71527ee84775a03a803754d81abf9cd66
 SHA512 
f0ebb82afa6051d91cf618970918601f7639c51d2927a7d2f73fc355b9cea6e554a07eb74fdec5499eb6336b40d725df8723188d2c6b194fa0b934890b57b87b
+DIST rust-1.88.0_beta20250622-loongarch64-unknown-linux-gnu.tar.xz 261429648 
BLAKE2B 
bbc43d2280b3c163b03b7ab304913a2ff08ef975566624b70d8510bddf7bb00f40be6d3b6f91f0b2f3e9e49e84d88602abe4e3eec3d46f53550a575745af21ab
 SHA512 
de8e331ce8a03a701e08368ff04f1fd40774c10e87d78c504be442d98b024986bcc67c4b27bd9ce2e1b1a5b3b59849b0e2bfeb8ea7f4a22d658e6435628b3a5d
+DIST rust-1.88.0_beta20250622-loongarch64-unknown-linux-gnu.tar.xz.asc 801 
BLAKE2B 
aa7c723a74799bb1107e99f5203174b07ae5d41248e6af47e3f18c2c6b9c9b3493df53e1e1475e3766585e1ab2503cba3b05988dfd9ba16a8edb214dbdbf0369
 SHA512 
351c14ce8341b3a4a9ad32d434cde22285f193d877470a87adbfe590354b7525f21f0f0eeb667f58e0d80e232c4600b311ff21e046a01d5eef76d5a6d7bc8071
+DIST rust-1.88.0_beta20250622-powerpc-unknown-linux-gnu.tar.xz 255600732 
BLAKE2B 
c0677d147d23eb4436048a358b8fb389c302c4c113d22cc6d9f4abd6b5d09ace5c463f7d8d3438c37858117ef63de7362f47884cf77a3af08575886473967782
 SHA512 
23d891b0907244d1adb10f5d034ece2a05d4937b702902a0d086d801deee65e100f7fa47178780cdf40d4af6cae2a064c1afe5689532233e0867d910b9a6e20c
+DIST rust-1.88.0_beta20250622-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
7b0c588d85dc70b619948d87016e007cca16e54b2896e18d8a6f3438d0d0a232ca2d7a61a954f560922698ff1f4caabe3b511c91686dcffba601fedf15ef8581
 SHA512 
8c4486d8f0da73853db678565e4e3a4da79400f64bbe9a2dc12f24cb44ea25d209d53c3f27fc6f982ce18f0b65e5f26753982f54b1510084562df61cc41d8831
+DIST rust-1.88.0_beta20250622-powerpc64-unknown-linux-gnu.tar.xz 255553888 
BLAKE2B 
fd196626b4b7ea6931c4acc55f337cebfed69694660e94ab78584f6ededebe7201ff3a82c0601605b465bea381abf49e461737243807debe6e581274eabce97f
 SHA512 
bac8aa39f9eb38973d518f885a5bb0b244869c49171b0c6d901584e8b44ba5bf299c61777c6a23f1685b266bb46964b93223ff3fdee1654a800d4c31274cfd7c
+DIST rust-1.88.0_beta20250622-powerpc64-unknown-linux-gnu.tar.xz.asc 801 
BLAKE2B 
95b47b3197614e4bd99d3c6f3b3bfd9650340ab53c7ef1c41d5c27869dde76a24618be578209d4d817fbd85c98f9e51d29a3cbfafc7ad75740d908a95ca1fec3
 SHA512 
0d38331f410c99e1ade66926565a6fcc39653f9eec5925185e67edd6784ac48dc82a0dba0f1e19e804130871dfa9da4d61a4814f3804b732bfd4407b9d95ff90
+DIST rust-1.88.0_beta20250622-powerpc64le-unknown-linux-gnu.tar.xz 270417284 
BLAKE2B 
04519e9f749e5fe12d6d5b3da0c4bedea0a45b1d72703db7ed4b77ce6a87e7cfa771cf5b751a62121fa447688a79e4196e35967a4e8daf83e809ba190bb6c567
 SHA512 
bac05b5cdc7fd56063c705e4ea140c50b6ea45a4af51a8ee496eb064c7fa0211fbd55f2b5bbe5b6da89dc882e3a7336c8fc588a6296ae3537fb36b8e2b950ecf
+DIST rust-1.88.0_beta20250622-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 
BLAKE2B 
b1489990f33f7577b7e0055dad6b6498101011d4fd7c81c58f722e3362c1fd248dc0f4c017ecd5c92e74fa6706a5864b9a89d458e1e3906900776cfe04ac7cc4
 SHA512 
a373199e11f143aaf9b704dd1e06aeb773554c0d152961b02e2d2b822d54553bfbab859138c97409964a4f693630be9ebefd385ce8dfd35db50fe008d67972a7
+DIST rust-1.88.0_beta20250622-riscv64gc-unknown-linux-gnu.tar.xz 250211600 
BLAKE2B 
e9c177997c497e6d7457b54c93dd82aa59564e04deadc9b0a39c88e0bce323f067a13861eb457d4f776c6024dd2026592c3defe1ab3d4d7193aab8e7b27fb9e4
 SHA512 
2d66f1d9caf6bfca2ed2f1a6a0d2e130dc05e68992faf0331152f4a8aab6d4a1e31c882256d82a8b54ff127cd495c141f3557c388beccc72d1f9d5f97b25d94c
+DIST rust-1.88.0_beta20250622-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 
BLAKE2B 
efee78363f2c9f80b02bd450e963b84ee142253d7d116b17a5a2865404bd496b5f94aef2ea6afa7aa10ac11069b459fad1603c53685d40d17abf60dc082d3438
 SHA512 
a205239cd2b336bf4f34ab8286b4a9a95d3c517618a4fae78e010c5f5d024748055cec609dacc545e3ae5a737807022e0854e166e2190303dc326ad57f2bac6b
+DIST rust-1.88.0_beta20250622-s390x-unknown-linux-gnu.tar.xz 239957892 BLAKE2B 
5a76fb5e3c11096e4bb1341cfa3fc7bda52a6906cc83e05fc3d19c198063ac49ccfacdf37f66cb674bbf00f48cd9ad655d99f433f611afd3476a95038b70008c
 SHA512 
7c5896832c7ad595a715e7304fb845f3b0a1e346ba51e092d20220959a89c31a8e9cac1a93527377c0b224dfdc3483bbb98123a6a91f64ca05b04ae127918f5a
+DIST rust-1.88.0_beta20250622-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
be73be0a9326aeb277026fba5a025fc312249d435e40658570fa42b0f14b0f2f6e058e513430ae30517e2e4ed7d510c07ce3f4673e278f06eab6e313ab86404d
 SHA512 
2868411b4ac65e91a88f96f049654bd3bdb6ad0af113dd086cbd1c0d955149fe4ee9666ac49ac19a7c5066f5f81c9d83251f50c912c1e45212b9fb28ce369701
+DIST rust-1.88.0_beta20250622-x86_64-unknown-linux-gnu.tar.xz 196899620 
BLAKE2B 
82d0f4e016bdbfe2f22a8b62e5306616be44e654244dd5eda7bd5305d37852f23f0cb1a5fd53f29011bec9cae8cfd3ac885b93d6ad58b6580099185486a32136
 SHA512 
358a9384a5084f2f85b32ab42f8232f43966d522460c1e41d253083eba3b583e33fc3700a03be70f5ee2c547d68618b6a8899fab267c2c427254019e89b9151b
+DIST rust-1.88.0_beta20250622-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 
61c667da3fa09da2900f4c00c6f8d22ca91c35adadee181fb9ea55ea1ad8fcae6ed3eef02ecb752190ea2f978c4e01b8e08655aa88a3a6ce40436779275db1ce
 SHA512 
5cc69877e6989b101914f505b0aa28d1776e346ffc62298333c01ba55caa7e3ec4cd99e5ab62ce1a44004982289c92972c358e21d973e00798c41a42a15d4ee9
+DIST rust-1.88.0_beta20250622-x86_64-unknown-linux-musl.tar.xz 290994224 
BLAKE2B 
fc4888d179fc2ee0b6e33bacf6c0062e673644368ba833e3234236b82509781cb0af10b666f6d78a53269525acbc41abffd2fda62ab6f685f286998187ca337d
 SHA512 
2be0414d341df202c374893acf25413b1fc9bd5cbd7566f8928591de28ba1308dbfa0cccc7728c1100f7b7045764f22acc22e2e4f0a0196177d8aa9e3033957a
+DIST rust-1.88.0_beta20250622-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 
e0865b44455222237880c64fb8562da7df1bde342f7a35bf7137b5f912f1043069f596b57b6de8f617a675c9f0c8cb4f268c17c6c6ad802cc473de734bea00fb
 SHA512 
1c0c49caa62b5ea1c8207292fee5df9ff8e2dab70a34bdeda586a9cf0691e874f100c9d858f2d7ccf6563136da3e2f1a4cf060ff9c39c4218ac207d2a5741f91
 DIST rust-src-1.74.1.tar.xz 2544036 BLAKE2B 
d95431b69f102782f51878ff73ce8802cac6dab7909497c3231d1c479b95dc2a618cc6efd8bac9c6bd59a2b10dc6be05199f1e1bd74e45cc640ee52352c29268
 SHA512 
11467d0936193c5a5be8c2eba1aefe2b7028af48494698863de2c4057d68ce33dcee1fc66dc2d68b1d32f0202ce49e9b906727849de8f8d904dd07930e76d5a4
 DIST rust-src-1.75.0.tar.xz 2570256 BLAKE2B 
9db7ccff07ffe6991233e9f530321fd6ba48c561dcf1226537afa70c7d045421d8e83c5300b0866ec6fccfaae96dd67b9f204e9e0e12108c0c766d467cd78909
 SHA512 
e7565cea2f1658a05237a698e38880df2544319b41b6d8b0805db5f1f94fd3bb4f986967d0440fcdfe3a135e33246f3c747665b964f57ff5942f56133af78cdd
 DIST rust-src-1.76.0.tar.xz 2590884 BLAKE2B 
d1a6215dab34d7b10c3177d2b248f997d3a846388f3442567572880aa5c5bc51b56398f5d4dc32727cee7c9dbef494430d6534a76b66c4ae5ac4fed07266644d
 SHA512 
39d2fe58fae8c8c5a6cb3fb1ef2a1c7548c018fef6ccea531659fdfecd68a4aa77125299d2cbe5b58e500337b4d074928318fa9ebce358af500d0ef27260e3ca
@@ -625,3 +653,4 @@ DIST rust-src-1.86.0.tar.xz 3053544 BLAKE2B 
2d1d8a4be4f9dc9355ce9a2d1599e0a57c5d
 DIST rust-src-1.87.0.tar.xz 3119800 BLAKE2B 
6429eb419f17109537a2a5463b0c68f504b3cb0f55766e18f73cf053883b06eedc934ab4598756790cec147ff41c4eb30a807d2ce0b7e6af33310710fdc5a8c1
 SHA512 
9747c60268d772b7c6e7694260c0808d2b8a42028f5606499c81595d76f5bc32c9acf6b4b9aad168235f8fd77d980c56bc4afc3d40f5d0374b23d3e66e3de390
 DIST rust-src-1.88.0_beta20250526.tar.xz 3154796 BLAKE2B 
9c4cfd252edce814ce8621d189f3a4aa16ba7a350ae9d28644bf56daba8422e7e9bde63394d89870b94a021e55eeb1986d16d1b57afb8a8990e67ea7e175502e
 SHA512 
c0e7185791433bf79db118d01476e28201970505adfebb425c86d1fac766c61ef57ae69aed34d538aee235e62cd5b00de882f04b36f1f227d64beb276915d053
 DIST rust-src-1.88.0_beta20250603.tar.xz 3154768 BLAKE2B 
11dbb689364a67762299a5dbfd77d69f3d92166d19a3e14b1d411368bd52632da5244856aabc8b09380d9f569e9b0b42dbe140093b982663e70147e642b4f696
 SHA512 
ee5a73570fce94dd67c32dbed964c0358b26420dd213898cabf9d24e675d50f2cbb325f23c00f2aa0e53e587512f73d48561bfd3c0be8ff9f6cd941533db63ce
+DIST rust-src-1.88.0_beta20250622.tar.xz 3154588 BLAKE2B 
ab443fd5ef65486e8a56d34d0cf0759b39c9586a0e43d3c3fe4299b5120a4f7c8fb88d1f2b2bc153c79fd0e6ad370d1b8baa4edbb69d0a89cb9094b5f15f6125
 SHA512 
aeb2b1cd6ff261198b39f4fa43b88e3fc121e999bf0bb71cb4167932e81c90411eed9dbbbd328c15735f83811a64b504615acb82a4783e9d9fd9d676cde63545

diff --git a/dev-lang/rust-bin/rust-bin-1.88.0_beta20250622.ebuild 
b/dev-lang/rust-bin/rust-bin-1.88.0_beta20250622.ebuild
new file mode 100644
index 000000000000..ef8fe8615c5c
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.88.0_beta20250622.ebuild
@@ -0,0 +1,314 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 20 )
+LLVM_OPTIONAL="yes"
+
+inherit edo llvm-r1 multilib prefix rust-toolchain verify-sig multilib-minimal 
optfeature
+
+if [[ ${PV} == *9999* ]]; then
+       # We need to fetch a tarball in src_unpack
+       PROPERTIES+=" live"
+elif [[ ${PV} == *beta* ]]; then
+       # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep 
"xz_url.*rust-src"
+       betaver=${PV//*beta}
+       BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+       
RUST_TOOLCHAIN_BASEURL=https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/
+       SRC_URI="$(rust_all_arch_uris rust-beta rust-${PV})
+               rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/rust-src-beta.tar.xz -> 
rust-src-${PV}.tar.xz )
+       "
+else
+       # curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep 
"xz_url.*rust-src"
+       SRC_URI="$(rust_all_arch_uris "${PV}")
+               rust-src? ( 
${RUST_TOOLCHAIN_BASEURL%/}/2025-01-30/rust-src-${PV}.tar.xz )
+       "
+       KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 
~sparc ~x86"
+fi
+
+GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}";
 # omit trailing slash
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/";
+
+if [[ ${PV} != *9999* && ${PV} != *beta* ]] ; then
+       # Keep this separate to allow easy commenting out if not yet built
+       SRC_URI+=" sparc? ( 
${GENTOO_BIN_BASEURI}/rust-${PVR}-sparc64-unknown-linux-gnu.tar.xz ) "
+       SRC_URI+=" mips? (
+               abi_mips_o32? (
+                       big-endian?  ( 
${GENTOO_BIN_BASEURI}/rust-${PVR}-mips-unknown-linux-gnu.tar.xz )
+                       !big-endian? ( 
${GENTOO_BIN_BASEURI}/rust-${PVR}-mipsel-unknown-linux-gnu.tar.xz )
+               )
+               abi_mips_n64? (
+                       big-endian?  ( 
${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64-unknown-linux-gnuabi64.tar.xz )
+                       !big-endian? ( 
${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64el-unknown-linux-gnuabi64.tar.xz )
+               )
+       )"
+       SRC_URI+=" riscv? (
+               elibc_musl? ( 
${GENTOO_BIN_BASEURI}/rust-${PVR}-riscv64gc-unknown-linux-musl.tar.xz )
+       )"
+       SRC_URI+=" ppc64? ( elibc_musl? (
+               big-endian?  ( 
${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64-unknown-linux-musl.tar.xz )
+               !big-endian? ( 
${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64le-unknown-linux-musl.tar.xz )
+       ) )"
+fi
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual 
stable
+IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src 
rustfmt"
+
+RDEPEND="
+       >=app-eselect/eselect-rust-20190311
+       dev-libs/openssl
+       sys-apps/lsb-release
+       || (
+               llvm-runtimes/libgcc
+               sys-devel/gcc:*
+       )
+       !dev-lang/rust:stable
+       !dev-lang/rust-bin:stable
+"
+BDEPEND="
+       prefix? ( dev-util/patchelf )
+       verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+[[ ${PV} == *9999* ]] && BDEPEND+=" net-misc/curl"
+
+REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
+
+# stripping rust may break it (at least on x86_64)
+# https://github.com/rust-lang/rust/issues/112286
+RESTRICT="strip"
+
+QA_PREBUILT="
+       opt/rust-bin-${SLOT}/bin/.*
+       opt/rust-bin-${SLOT}/lib/.*.so*
+       opt/rust-bin-${SLOT}/libexec/.*
+       opt/rust-bin-${SLOT}/lib/rustlib/.*/bin/.*
+       opt/rust-bin-${SLOT}/lib/rustlib/.*/lib/.*
+"
+
+# An rmeta file is custom binary format that contains the metadata for the 
crate.
+# rmeta files do not support linking, since they do not contain compiled 
object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="opt/${PN}-${SLOT}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc"
+
+src_unpack() {
+       if [[ ${PV} == *9999* ]]; then
+               # We need to fetch the latest nightly listing and get the 
apprapriate src_uri for our arch
+               local rust_bin_url rustc_src_url
+               # Cut down on webrequests by fetching the nightly toml once
+               curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > 
"${WORKDIR}/channel-rust-nightly.toml" ||
+                       die "Failed to fetch nightly revision info"
+               rustc_src_url=$(grep 'xz_url.*rust-src' 
"${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
+               rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" 
"${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
+               einfo "Using nightly Rust from: ${rust_bin_url}"
+
+               if use rust-src; then
+                       einfo "Using nightly Rust-src from: ${rustc_src_url}"
+                       # We need to fetch the rust-src tarball
+                       einfo "Fetching nightly rust-src tarball ..."
+                       curl --progress-bar -L "${rustc_src_url}" -o 
"${WORKDIR}/rust-src-${PV}.tar.xz" ||
+                               die "Failed to fetch nightly rust-src tarball."
+                       # no verify-sig here, just unpack it
+                       tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die 
"Failed to unpack nightly rust-src tarball"
+               fi
+
+               einfo "Fetching nightly Rust tarball ..."
+               curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to 
fetch nightly tarball"
+               if use verify-sig; then
+                       einfo "Fetching nightly signature ..."
+                       curl --progress-bar -L "${rust_bin_url}.asc" -O || die 
"Failed to fetch nightly signature"
+                       verify-sig_verify_detached 
"${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \
+                               "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc"
+               fi
+               tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die 
"Failed to unpack nightly tarball"
+       else
+               # sadly rust-src tarball does not have corresponding .asc file
+               # so do partial verification
+               if use verify-sig; then
+                       for f in ${A}; do
+                               if [[ -f ${DISTDIR}/${f}.asc ]]; then
+                                       verify-sig_verify_detached 
"${DISTDIR}/${f}" "${DISTDIR}/${f}.asc"
+                               fi
+                       done
+               fi
+
+               default_src_unpack
+
+       fi
+       case ${PV} in
+               *9999*)
+                       mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die
+                       ;;
+               *beta*)
+                       mv "${WORKDIR}/rust-beta-$(rust_abi)" "${S}" || die
+                       ;;
+               *)
+                       mv "${WORKDIR}/rust-${PV}-$(rust_abi)" "${S}" || die
+                       ;;
+       esac
+}
+
+patchelf_for_bin() {
+       local filetype=$(file -b ${1})
+       if [[ ${filetype} == *ELF*interpreter* ]]; then
+               einfo "${1}'s interpreter changed"
+               patchelf ${1} --set-interpreter ${2} || die
+       elif [[ ${filetype} == *script* ]]; then
+               hprefixify ${1}
+       fi
+}
+
+rust_native_abi_install() {
+       pushd "${S}" >/dev/null || die
+       local analysis="$(grep 'analysis' ./components || die "analysis not 
found in components")"
+       local std="$(grep 'std' ./components || die "std not found in 
components")"
+       local components=( "rustc" "cargo" "${std}" )
+       use doc && components+=( "rust-docs" )
+       use clippy && components+=( "clippy-preview" )
+       use rustfmt && components+=( "rustfmt-preview" )
+       use rust-analyzer && components+=( "rust-analyzer-preview" 
"${analysis}" )
+       # Rust component 'rust-src' is extracted from separate archive
+       if use rust-src; then
+               einfo "Combining rust and rust-src installers"
+               case ${PV} in
+                       *9999*)
+                               mv -v "${WORKDIR}/rust-src-nightly/rust-src" 
"${S}" || die
+                               ;;
+                       *beta*)
+                               mv -v "${WORKDIR}/rust-src-beta/rust-src" 
"${S}" || die
+                               ;;
+                       *)
+                               mv -v "${WORKDIR}/rust-src-${PV}/rust-src" 
"${S}" || die
+                               ;;
+               esac
+               echo rust-src >> ./components || die
+               components+=( "rust-src" )
+       fi
+       edo ./install.sh \
+               --components="$(IFS=,; echo "${components[*]}")" \
+               --disable-verify \
+               --prefix="${ED}/opt/rust-bin-${SLOT}" \
+               --mandir="${ED}/opt/rust-bin-${SLOT}/man" \
+               --disable-ldconfig
+
+       docompress /opt/${P}/man/
+
+       if use prefix; then
+               local interpreter=$(patchelf --print-interpreter 
"${EPREFIX}"/bin/bash)
+               ebegin "Changing interpreter to ${interpreter} for Gentoo 
prefix at ${ED}/opt/${SLOT}/bin"
+               find "${ED}/opt/${SLOT}/bin" -type f -print0 | \
+                       while IFS=  read -r -d '' filename; do
+                               patchelf_for_bin ${filename} ${interpreter} \; 
|| die
+                       done
+               eend $?
+       fi
+
+       local symlinks=(
+               cargo
+               rustc
+               rustdoc
+               rust-gdb
+               rust-gdbgui
+               rust-lldb
+       )
+
+       use clippy && symlinks+=( clippy-driver cargo-clippy )
+       use rustfmt && symlinks+=( rustfmt cargo-fmt )
+       use rust-analyzer && symlinks+=( rust-analyzer )
+
+       einfo "installing eselect-rust symlinks and paths"
+       local i
+       for i in "${symlinks[@]}"; do
+               # we need realpath on /usr/bin/* symlink return 
version-appended binary path.
+               # so /usr/bin/rustc should point to 
/opt/rust-bin-<ver>/bin/rustc-<ver>
+               local ver_i="${i}-bin-${SLOT}"
+               ln -v "${ED}/opt/rust-bin-${SLOT}/bin/${i}" 
"${ED}/opt/rust-bin-${SLOT}/bin/${ver_i}" || die
+               dosym -r "/opt/rust-bin-${SLOT}/bin/${ver_i}" 
"/usr/bin/${ver_i}"
+       done
+
+       # symlinks to switch components to active rust in eselect
+       dosym -r "/opt/rust-bin-${SLOT}/lib" "/usr/lib/rust/lib-bin-${SLOT}"
+       dosym -r "/opt/rust-bin-${SLOT}/man" "/usr/lib/rust/man-bin-${SLOT}"
+       dosym -r "/opt/rust-bin-${SLOT}/lib/rustlib" 
"/usr/lib/rustlib-bin-${SLOT}"
+       dosym -r "/opt/rust-bin-${SLOT}/share/doc/rust" 
"/usr/share/doc/rust-bin-${SLOT}"
+
+       # make all capital underscored variable
+       local CARGO_TRIPLET="$(rust_abi)"
+       CARGO_TRIPLET="${CARGO_TRIPLET//-/_}"
+       CARGO_TRIPLET="${CARGO_TRIPLET^^}"
+       cat <<-_EOF_ > "${T}/50${P}"
+               MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${SLOT}"
+       $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C 
target-feature=-crt-static\"")
+       _EOF_
+       doenvd "${T}/50${P}"
+
+       # note: eselect-rust adds EROOT to all paths below
+       cat <<-_EOF_ > "${T}/provider-${PN}-${SLOT}"
+       /usr/bin/cargo
+       /usr/bin/rustdoc
+       /usr/bin/rust-gdb
+       /usr/bin/rust-gdbgui
+       /usr/bin/rust-lldb
+       /usr/lib/rustlib
+       /usr/lib/rust/lib
+       /usr/lib/rust/man
+       /usr/share/doc/rust
+       _EOF_
+
+       if use clippy; then
+               echo /usr/bin/clippy-driver >> "${T}/provider-${PN}-${SLOT}"
+               echo /usr/bin/cargo-clippy >> "${T}/provider-${PN}-${SLOT}"
+       fi
+       if use rustfmt; then
+               echo /usr/bin/rustfmt >> "${T}/provider-${PN}-${SLOT}"
+               echo /usr/bin/cargo-fmt >> "${T}/provider-${PN}-${SLOT}"
+       fi
+       if use rust-analyzer; then
+               echo /usr/bin/rust-analyzer >> "${T}/provider-${PN}-${SLOT}"
+       fi
+
+       insinto /etc/env.d/rust
+       doins "${T}/provider-${PN}-${SLOT}"
+       popd >/dev/null || die
+}
+
+multilib_src_install() {
+       if multilib_is_native_abi; then
+               rust_native_abi_install
+       else
+               local rust_target
+               rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
+               dodir "/opt/${P}/lib/rustlib"
+               cp -vr 
"${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
+                       "${ED}/opt/${P}/lib/rustlib" || die
+       fi
+
+       # BUG: installs x86_64 binary on other arches
+       rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die
+}
+
+pkg_postinst() {
+       eselect rust update
+
+       if has_version dev-debug/gdb || has_version llvm-core/lldb; then
+               elog "Rust installs helper scripts for calling GDB and LLDB,"
+               elog "for convenience they are installed under 
/usr/bin/rust-{gdb,lldb}-${PV}."
+       fi
+
+       if has_version app-editors/emacs; then
+               optfeature "emacs support for rust" app-emacs/rust-mode
+       fi
+
+       if has_version app-editors/gvim || has_version app-editors/vim; then
+               optfeature "vim support for rust" app-vim/rust-vim
+       fi
+}
+
+pkg_postrm() {
+       eselect rust cleanup
+}

diff --git a/dev-lang/rust-common/Manifest b/dev-lang/rust-common/Manifest
index d3114e8f0b09..0ec88ac75efc 100644
--- a/dev-lang/rust-common/Manifest
+++ b/dev-lang/rust-common/Manifest
@@ -16,3 +16,5 @@ DIST rustc-1.88.0_beta20250526-src.tar.xz 283223628 BLAKE2B 
1c21853c0b7edcafd877
 DIST rustc-1.88.0_beta20250526-src.tar.xz.asc 801 BLAKE2B 
a412d72e4e0f273f03f3fee41abe1aeda03f77339891469e994f3a6bde0cd3836a1da087d908e732e90cd3285743a4a3c728c718ad1dda5daf7cca9de3be2c52
 SHA512 
45f208555f8b2fd3b21ac4cdc8fd7a110dc53fedbbe8d11542f105c5c8657a628309c8ff4520eb2c740cf3e784bfea0f21832b71b19a356b1b99fc7d0f04f607
 DIST rustc-1.88.0_beta20250603-src.tar.xz 283255312 BLAKE2B 
5b46509c46c4fbb10c4b3cee3edf9a1428c4b0f54d8f4d6a042e9776e05242988c933a90654538cf9806c4d1ee1c01ff3ecdcb1711fd7240cacbf5cbeff9a96b
 SHA512 
ebc5f2175fc7ac8b89ee68d3089272ea444cfa9375a13c989c64a267b050c1065eaa124263b440ba6513a4b6ba4c8efbf58f3a78b4d94bd0e658dfab5ca0a8e5
 DIST rustc-1.88.0_beta20250603-src.tar.xz.asc 801 BLAKE2B 
426fe3cf64ecbc5564feeb1c2c784b98d4aa71184006b1430c86d1b98f91592e850feefa0f6e91142f1b5c227556041cd32628aed7bacd43dddd252dc111b73f
 SHA512 
ba4336934071fff1d9abe44d50fced7bd2fd1f6a5c116b8d17312d6ec5d143664fb570fba90f6cf417c5220cd9f42b2bb1695d73e915451b1dd2f726a451c7ec
+DIST rustc-1.88.0_beta20250622-src.tar.xz 283275068 BLAKE2B 
a681a91b45c27a51abea3006d482a98b42d5f9459a39a5d01415ec3adbf7d4ea72c5e2738ecd8d0a1738cd926a1e72c7a9ef99e23e7b5932a6781d4d541c277d
 SHA512 
89aa97ad68f311783dea3728c9c3674f445fa95ad5bac109ccce82e8cc20a15d1aaae6528617f7febec722b6a9657b0c205cdba1c5adf07ca70cad6dc5184228
+DIST rustc-1.88.0_beta20250622-src.tar.xz.asc 801 BLAKE2B 
637a7bb29a19179c7f804ca3267e1d15103455f0dc428d9b440faeb12455377edbef71bf2308607e08a176f89d6ed73aa15841f06c089c060e9c4a2d5f317420
 SHA512 
d43922db5bf0f1f01695e95b06eabaa64bb72b033c30b8a66624f9abe1bfc361aad1739a81be263b7b5137d9f3570dc9c22f5703e3a162cf852173e505e81655

diff --git a/dev-lang/rust-common/rust-common-1.88.0_beta20250622.ebuild 
b/dev-lang/rust-common/rust-common-1.88.0_beta20250622.ebuild
new file mode 100644
index 000000000000..26c4792d0fb5
--- /dev/null
+++ b/dev-lang/rust-common/rust-common-1.88.0_beta20250622.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+inherit shell-completion verify-sig
+
+DESCRIPTION="Common files shared between multiple slots of Rust"
+HOMEPAGE="https://www.rust-lang.org/";
+
+if [[ ${PV} = *9999* ]]; then
+       inherit git-r3
+       # In case cargo is not in sync we'll fetch it as a submodule
+       # Nightly users will probably already have the repo cloned and 
up-to-date anyway.
+       EGIT_REPO_URI="https://github.com/rust-lang/rust.git";
+       EGIT_SUBMODULES=( "-*" "src/tools/cargo" )
+elif [[ ${PV} == *beta* ]]; then
+       # Identify the snapshot date of the beta release:
+       # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep 
beta-src.tar.xz
+       MY_PV=beta
+       betaver=${PV//*beta}
+       BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+       
SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz
 -> rustc-${PV}-src.tar.xz
+               verify-sig? ( 
https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc
+                       -> rustc-${PV}-src.tar.xz.asc )
+       "
+       S="${WORKDIR}/rustc-${MY_PV}-src"
+else
+       MY_PV=${PV}
+       SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz
+               verify-sig? ( 
https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz.asc )
+       "
+       S="${WORKDIR}/rustc-${MY_PV}-src"
+       KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc 
~x86"
+fi
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="0"
+
+# Legacy non-slotted versions bash completions will collide.
+RDEPEND="
+       !dev-lang/rust:stable
+       !dev-lang/rust-bin:stable
+"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-rust )"
+
+src_unpack() {
+       if [[ ${PV} == *9999* ]]; then
+               git-r3_src_unpack
+       else
+               if use verify-sig ; then
+                       verify-sig_verify_detached 
"${DISTDIR}"/rustc-${PV}-src.tar.xz "${DISTDIR}"/rustc-${PV}-src.tar.xz.asc
+               fi
+
+               # Avoid unpacking the whole tarball which would need check-reqs
+               tar -xf "${DISTDIR}"/rustc-${PV}-src.tar.xz \
+                       
"rustc-${MY_PV}-src/src/tools/cargo/src/etc/"{_cargo,cargo.bashcomp.sh} || die
+       fi
+}
+
+src_configure() {
+       :
+}
+
+src_compile() {
+       :
+}
+
+src_install() {
+       newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+       dozshcomp src/tools/cargo/src/etc/_cargo
+}

diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 62016751082f..6a4f8b472522 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -16,6 +16,7 @@ DIST rust-patches-1.86.0-r2.tar.bz2 5980 BLAKE2B 
179d6acc8c7006eac4d00e073ec1f54
 DIST rust-patches-1.87.0-r1.tar.bz2 4635 BLAKE2B 
d813ec4a602d3bb879927a44a0b9f752aac255e31dfd13c56ab71b3fae7ce46a742c1d2e7494a7e17728f1edb2327ddd6ad6ebabc0c47d66326b766bbd323fbd
 SHA512 
596ffe744a5849b443f077bbd4edbcbb240b9ac51c9d53e0e436e46d7c93a6734477d22eba4a066a0cf474503a6357a72dfa124e594f645be6f50d9bd25bdb10
 DIST rust-patches-1.88.0_beta20250526.tar.bz2 4073 BLAKE2B 
4ae2fd9d87116ee6f779e60ffcbed16ef778fd4e87d4f6f8e2588348b7d0aa28de3627f8c2d43cef540b2422278d4018618c6f0da6936be03de68aba3420f5a4
 SHA512 
8f775901aff2c0da66c01e20c983ca965eddf38cd106d055b6e480e9ca73418abc416fe28215d4f700eb8cce52a90808c0513d23d495977ac19a3b5d82e109ff
 DIST rust-patches-1.88.0_beta20250603.tar.bz2 4080 BLAKE2B 
13e7ae1de79d91a2b7a6ee1368141ec0c9676a507c2a88b7dd1070e785482fe444f0e885055b9900d68ecab41f18ed1fd99c24a690e95219d387ac141c958e23
 SHA512 
a9929d66e583fcc21423008f5b6c0b7953715685f526c632433d4b25539810a422f8ca6f9a334664f9ad80f09a674a38e818d96cd079f86fb38948f7ae7ba56b
+DIST rust-patches-1.88.0_beta20250622.tar.bz2 4082 BLAKE2B 
20168cc4a977276b3cba143259413ec2018dbc8ee3bc516ebcc8b6ab04f61f36b4ec71365e186f550b097819208443b9f54442b1bb5256507d3182393aba5823
 SHA512 
d27afdf7cf302eab96c449f3064cce5a10ad57b2f851f1850dd7dfacf182210e5b501cdc91280006583be2e3e124c131579686a6fd8cc0fb42237bd0a4d84821
 DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B 
e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3
 SHA512 
14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d
 DIST rustc-1.74.1-src.tar.xz.asc 801 BLAKE2B 
ddf73175b164233babf31ca3a381b03e20c0f36d017c1d5f85d6ab11f0986d861ab23b11c061e6b2444ced70c3d6a494cc3de4ec86f0deb221a805491bd75420
 SHA512 
9a96ff9ba9a4e2af4e267b2ec126fc0675c78d0eb767703daa2f28491c3d85c2ab00fbd8584390bf658812ec6c4ab6c57e43b386db59fd505bd3134a8873a09e
 DIST rustc-1.75.0-src.tar.xz 159624388 BLAKE2B 
8937b80585eddaa3e1f1ef948899d14a170308518c6fef9fe569560cdd870053776956743f796055f2119399b9ca6c0df12fedd789ae46324d071e5126c4e495
 SHA512 
7b0f25d91b1b5c317980fc88e059200bd43b56a70b445fbc72fb9b96e09775bfd3a98e9bd9d662af80f0ce3aef527c777ee82777e96ca876f47a972d63da8606
@@ -52,3 +53,5 @@ DIST rustc-1.88.0_beta20250526-src.tar.xz 283223628 BLAKE2B 
1c21853c0b7edcafd877
 DIST rustc-1.88.0_beta20250526-src.tar.xz.asc 801 BLAKE2B 
a412d72e4e0f273f03f3fee41abe1aeda03f77339891469e994f3a6bde0cd3836a1da087d908e732e90cd3285743a4a3c728c718ad1dda5daf7cca9de3be2c52
 SHA512 
45f208555f8b2fd3b21ac4cdc8fd7a110dc53fedbbe8d11542f105c5c8657a628309c8ff4520eb2c740cf3e784bfea0f21832b71b19a356b1b99fc7d0f04f607
 DIST rustc-1.88.0_beta20250603-src.tar.xz 283255312 BLAKE2B 
5b46509c46c4fbb10c4b3cee3edf9a1428c4b0f54d8f4d6a042e9776e05242988c933a90654538cf9806c4d1ee1c01ff3ecdcb1711fd7240cacbf5cbeff9a96b
 SHA512 
ebc5f2175fc7ac8b89ee68d3089272ea444cfa9375a13c989c64a267b050c1065eaa124263b440ba6513a4b6ba4c8efbf58f3a78b4d94bd0e658dfab5ca0a8e5
 DIST rustc-1.88.0_beta20250603-src.tar.xz.asc 801 BLAKE2B 
426fe3cf64ecbc5564feeb1c2c784b98d4aa71184006b1430c86d1b98f91592e850feefa0f6e91142f1b5c227556041cd32628aed7bacd43dddd252dc111b73f
 SHA512 
ba4336934071fff1d9abe44d50fced7bd2fd1f6a5c116b8d17312d6ec5d143664fb570fba90f6cf417c5220cd9f42b2bb1695d73e915451b1dd2f726a451c7ec
+DIST rustc-1.88.0_beta20250622-src.tar.xz 283275068 BLAKE2B 
a681a91b45c27a51abea3006d482a98b42d5f9459a39a5d01415ec3adbf7d4ea72c5e2738ecd8d0a1738cd926a1e72c7a9ef99e23e7b5932a6781d4d541c277d
 SHA512 
89aa97ad68f311783dea3728c9c3674f445fa95ad5bac109ccce82e8cc20a15d1aaae6528617f7febec722b6a9657b0c205cdba1c5adf07ca70cad6dc5184228
+DIST rustc-1.88.0_beta20250622-src.tar.xz.asc 801 BLAKE2B 
637a7bb29a19179c7f804ca3267e1d15103455f0dc428d9b440faeb12455377edbef71bf2308607e08a176f89d6ed73aa15841f06c089c060e9c4a2d5f317420
 SHA512 
d43922db5bf0f1f01695e95b06eabaa64bb72b033c30b8a66624f9abe1bfc361aad1739a81be263b7b5137d9f3570dc9c22f5703e3a162cf852173e505e81655

diff --git a/dev-lang/rust/rust-1.88.0_beta20250622.ebuild 
b/dev-lang/rust/rust-1.88.0_beta20250622.ebuild
new file mode 100644
index 000000000000..acd1b3fdb8d8
--- /dev/null
+++ b/dev-lang/rust/rust-1.88.0_beta20250622.ebuild
@@ -0,0 +1,835 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 20 )
+PYTHON_COMPAT=( python3_{11..14} )
+
+RUST_PATCH_VER=${PVR}
+
+RUST_MAX_VER=${PV%%_*}
+if [[ ${PV} == *9999* ]]; then
+       RUST_MIN_VER="1.88.0" # Update this as new `beta` releases come out.
+elif [[ ${PV} == *beta* ]]; then
+       RUST_MAX_VER="$(ver_cut 1).$(ver_cut 2).0"
+       RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
+else
+       RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
+fi
+
+inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing optfeature \
+       multilib multilib-build python-any-r1 rust rust-toolchain 
toolchain-funcs verify-sig
+
+if [[ ${PV} = *9999* ]]; then
+       inherit git-r3
+elif [[ ${PV} == *beta* ]]; then
+       # Identify the snapshot date of the beta release:
+       # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep 
beta-src.tar.xz
+       betaver=${PV//*beta}
+       BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+       MY_P="rustc-beta"
+       
SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz
 -> rustc-${PV}-src.tar.xz
+               
https://gitweb.gentoo.org/proj/rust-patches.git/snapshot/rust-patches-${RUST_PATCH_VER}.tar.bz2
+               verify-sig? ( 
https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc
+                       -> rustc-${PV}-src.tar.xz.asc )
+       "
+       S="${WORKDIR}/${MY_P}-src"
+else
+       MY_P="rustc-${PV}"
+       SRC_URI="https://static.rust-lang.org/dist/${MY_P}-src.tar.xz
+               
https://gitweb.gentoo.org/proj/rust-patches.git/snapshot/rust-patches-${RUST_PATCH_VER}.tar.bz2
+               verify-sig? ( 
https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc )
+       "
+       S="${WORKDIR}/${MY_P}-src"
+       KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc 
~x86"
+fi
+
+DESCRIPTION="Systems programming language originally developed by Mozilla"
+HOMEPAGE="https://www.rust-lang.org/";
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+       LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+       WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+# 
https://github.com/rust-lang/llvm-project/blob/rustc-1.84.0/llvm/CMakeLists.txt
+_ALL_RUST_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa )
+declare -A ALL_RUST_EXPERIMENTAL_TARGETS
+for _x in "${_ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do
+       ALL_RUST_EXPERIMENTAL_TARGETS["llvm_targets_${_x}"]=0
+done
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual 
stable
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto 
rustfmt rust-analyzer rust-src +system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+if [[ ${PV} = *9999* ]]; then
+       # These USE flags require nightly rust
+       IUSE+=" miri"
+fi
+
+LLVM_DEPEND=()
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+for _x in "${ALL_LLVM_TARGETS[@]}"; do
+       LLVM_DEPEND+=( "        ${_x}? ( $(llvm_gen_dep 
"llvm-core/llvm:\${LLVM_SLOT}[${_x}]") )" )
+       if [[ -v ALL_RUST_EXPERIMENTAL_TARGETS["${_x}"] ]] ; then
+               ALL_RUST_EXPERIMENTAL_TARGETS["${_x}"]=1
+       fi
+done
+LLVM_DEPEND+=( "       wasm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}') )" 
)
+LLVM_DEPEND+=( "       $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}')" )
+
+# dev-libs/oniguruma is used for documentation
+BDEPEND="${PYTHON_DEPS}
+       app-eselect/eselect-rust
+       dev-libs/oniguruma
+       || (
+               >=sys-devel/gcc-4.7[cxx]
+               >=llvm-core/clang-3.5
+       )
+       lto? ( system-llvm? (
+               || (
+                       $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
+                       sys-devel/mold
+               )
+       ) )
+       !system-llvm? (
+               >=dev-build/cmake-3.13.4
+               app-alternatives/ninja
+       )
+       test? ( dev-debug/gdb )
+       verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+DEPEND="
+       >=app-arch/xz-utils-5.2
+       net-misc/curl:=[http2,ssl]
+       sys-libs/zlib:=
+       dev-libs/openssl:0=
+       system-llvm? (
+               ${LLVM_DEPEND[*]}
+               llvm-libunwind? ( llvm-runtimes/libunwind:= )
+       )
+       !system-llvm? (
+               !llvm-libunwind? (
+                       elibc_musl? ( sys-libs/libunwind:= )
+               )
+       )
+"
+
+RDEPEND="${DEPEND}
+       app-eselect/eselect-rust
+       dev-lang/rust-common
+       sys-apps/lsb-release
+       !dev-lang/rust:stable
+       !dev-lang/rust-bin:stable
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+       rust-analyzer? ( rust-src )
+       test? ( ${ALL_LLVM_TARGETS[*]} )
+       wasm? ( llvm_targets_WebAssembly )
+       x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+       usr/lib/${PN}/${SLOT}/bin/.*
+       usr/lib/${PN}/${SLOT}/libexec/.*
+       usr/lib/${PN}/${SLOT}/lib/lib.*.so
+       usr/lib/${PN}/${SLOT}/lib/rustlib/.*/bin/.*
+       usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+       usr/lib/${PN}/${SLOT}/lib/lib.*.so.*
+       usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+       usr/lib/${PN}/${SLOT}/lib/rustlib/.*/bin/rust-llvm-dwp
+       usr/lib/${PN}/${SLOT}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the 
crate.
+# rmeta files do not support linking, since they do not contain compiled 
object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${SLOT}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+clear_vendor_checksums() {
+       sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || 
die
+}
+
+toml_usex() {
+       usex "${1}" true false
+}
+
+pre_build_checks() {
+       local M=9216
+       # multiply requirements by 1.3 if we are doing x86-multilib
+       if use amd64; then
+               M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
+       fi
+       M=$(( $(usex clippy 128 0) + ${M} ))
+       if [[ ${PV} == *9999* ]]; then
+               M=$(( $(usex miri 128 0) + ${M} ))
+       fi
+       M=$(( $(usex rustfmt 256 0) + ${M} ))
+       # add 2G if we compile llvm and 256M per llvm_target
+       if ! use system-llvm; then
+               M=$(( 2048 + ${M} ))
+               local ltarget
+               for ltarget in ${ALL_LLVM_TARGETS[@]}; do
+                       M=$(( $(usex ${ltarget} 256 0) + ${M} ))
+               done
+       fi
+       M=$(( $(usex wasm 256 0) + ${M} ))
+       M=$(( $(usex debug 2 1) * ${M} ))
+       eshopts_push -s extglob
+       if is-flagq '-g?(gdb)?([1-9])'; then
+               M=$(( 15 * ${M} / 10 ))
+       fi
+       eshopts_pop
+       M=$(( $(usex doc 256 0) + ${M} ))
+       CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+llvm_check_deps() {
+       has_version -r "llvm-core/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// 
/,}]"
+}
+
+# Is LLVM being linked against libc++?
+is_libcxx_linked() {
+       local code='#include <ciso646>
+#if defined(_LIBCPP_VERSION)
+       HAVE_LIBCXX
+#endif
+'
+       local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - 
<<<"${code}") || return 1
+       [[ ${out} == *HAVE_LIBCXX* ]]
+}
+
+pkg_pretend() {
+       pre_build_checks
+}
+
+pkg_setup() {
+       pre_build_checks
+       python-any-r1_pkg_setup
+
+       export LIBGIT2_NO_PKG_CONFIG=1 #749381
+       if tc-is-cross-compiler; then
+               use system-llvm && die "USE=system-llvm not allowed when 
cross-compiling"
+               local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+               use "llvm_targets_${cross_llvm_target}" || \
+                       die "Must enable LLVM_TARGETS=${cross_llvm_target} 
matching CBUILD=${CBUILD} when cross-compiling"
+       fi
+
+       rust_pkg_setup
+
+       if use system-llvm; then
+               llvm-r1_pkg_setup
+
+               local llvm_config="$(get_llvm_prefix)/bin/llvm-config"
+               export LLVM_LINK_SHARED=1
+               export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" 
--libdir)"
+       fi
+}
+
+rust_live_get_sources() {
+       EGIT_REPO_URI="
+               https://anongit.gentoo.org/git/proj/rust-patches.git
+       "
+       EGIT_CHECKOUT_DIR="${WORKDIR}/rust-patches-${RUST_PATCH_VER}"
+       git-r3_src_unpack
+
+       EGIT_REPO_URI="
+               https://github.com/rust-lang/rust.git
+       "
+       EGIT_SUBMODULES=(
+               "*"
+               "-src/gcc"
+       )
+       S="${WORKDIR}/rust"
+       EGIT_CHECKOUT_DIR="${S}"
+       git-r3_src_unpack
+}
+
+src_unpack() {
+       if [[ ${PV} == *9999* ]] ; then
+               rust_live_get_sources
+
+               # Vendor dependencies
+               mkdir "${S}/.cargo" || die # The vendor script has a check for 
.cargo/config{,.toml}
+               touch "${S}/.cargo/bootstrap.toml" || die
+               local rust_stage0_root="$(${RUSTC} --print sysroot || die 
"Can't determine rust's sysroot")"
+               # Configure vendor to use the portage-provided toolchain. This 
prevents it from
+               # attempting to fetch a `beta` toolchain from the internet.
+               cat <<- _EOF_ > "${T}/vendor-bootstrap.toml"
+                       # Suppresses a warning about tracking changes which we 
don't care about.
+                       change-id = "ignore"
+                       [build]
+                       build = "$(rust_abi "${CBUILD}")"
+                       host = ["$(rust_abi "${CHOST}")"]
+                       target = ["$(rust_abi "${CHOST}")"]
+                       cargo = "${rust_stage0_root}/bin/cargo"
+                       rustc = "${rust_stage0_root}/bin/rustc"
+                       rustfmt = "${rust_stage0_root}/bin/rustfmt"
+               _EOF_
+               # We're using git sources so we need to run the Vendor script
+               # to ensure that all dependencies are present and up-to-date
+               mkdir "${S}/vendor" || die
+               # This also compiles the 'build helper', there's no way to 
avoid this.
+               ${EPYTHON} "${S}"/x.py vendor -v 
--config="${T}"/vendor-bootstrap.toml -j$(makeopts_jobs) ||
+                       die "Failed to vendor dependencies"
+               # TODO: This has to be generated somehow, this is from a 1.84.x 
tarball I had lying around.
+               cat <<- _EOF_ > "${S}/.cargo/config.toml"
+                       [source.crates-io]
+                       replace-with = "vendored-sources"
+
+                       [source."git+https://github.com/rust-lang/team";]
+                       git = "https://github.com/rust-lang/team";
+                       replace-with = "vendored-sources"
+
+                       [source.vendored-sources]
+                       directory = "vendor"
+               _EOF_
+       elif use verify-sig ; then
+               # Patch tarballs are not signed (but we trust Gentoo infra)
+               verify-sig_verify_detached 
"${DISTDIR}"/rustc-${PV}-src.tar.xz{,.asc}
+               default
+       else
+               default
+       fi
+}
+
+src_prepare() {
+       if [[ ${PV} = *9999* ]]; then
+               # We need to update / generate lockfiles for the workspace
+               ${CARGO} generate-lockfile --offline || die "Failed to generate 
lockfiles"
+       fi
+
+       PATCHES=(
+               "${WORKDIR}/rust-patches-${RUST_PATCH_VER}/"
+       )
+
+       if use lto && tc-is-clang && ! tc-ld-is-lld && ! tc-ld-is-mold; then
+               export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
+       fi
+
+       default
+}
+
+src_configure() {
+       if tc-is-cross-compiler; then
+               export PKG_CONFIG_ALLOW_CROSS=1
+               export PKG_CONFIG_PATH="${ESYSROOT}/usr/$(get_libdir)/pkgconfig"
+               export OPENSSL_INCLUDE_DIR="${ESYSROOT}/usr/include"
+               export OPENSSL_LIB_DIR="${ESYSROOT}/usr/$(get_libdir)"
+       fi
+
+       # Avoid bundled copies of libraries
+       export RUSTONIG_SYSTEM_LIBONIG=1
+       # Need to check if these can be optional
+       #export LIBSQLITE3_SYS_USE_PKG_CONFIG=1
+       #export LIBSSH2_SYS_USE_PKG_CONFIG=1
+
+       filter-lto # https://bugs.gentoo.org/862109 
https://bugs.gentoo.org/866231
+
+       local rust_target="" rust_targets="" arch_cflags
+
+       # Collect rust target names to compile standard libs for all ABIs.
+       for v in $(multilib_get_enabled_abi_pairs); do
+               rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+       done
+       if use wasm; then
+               rust_targets+=",\"wasm32-unknown-unknown\""
+               if use system-llvm; then
+                       # un-hardcode rust-lld linker for this target
+                       # https://bugs.gentoo.org/715348
+                       sed -i '/linker:/ s/rust-lld/wasm-ld/' 
compiler/rustc_target/src/spec/base/wasm.rs || die
+               fi
+       fi
+       rust_targets="${rust_targets#,}"
+
+       # cargo and rustdoc are mandatory and should always be included
+       local tools='"cargo","rustdoc"'
+       use clippy && tools+=',"clippy"'
+       use rustfmt && tools+=',"rustfmt"'
+       use rust-analyzer && 
tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
+       use rust-src && tools+=',"src"'
+
+       if [[ ${PV} == *9999* ]]; then
+               use miri && tools+=',"miri"'
+       fi
+
+       local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't 
determine rust's sysroot")"
+       # in case of prefix it will be already prefixed, as --print sysroot 
returns full path
+       [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a 
directory"
+
+       rust_target="$(rust_abi)"
+       rust_build="$(rust_abi "${CBUILD}")"
+       rust_host="$(rust_abi "${CHOST}")"
+
+       RUST_EXPERIMENTAL_TARGETS=()
+       for _x in "${!ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do
+               if [[ ${ALL_RUST_EXPERIMENTAL_TARGETS[${_x}]} == 1 ]] && use 
${_x} ; then
+                       RUST_EXPERIMENTAL_TARGETS+=( ${_x#llvm_targets_} )
+               fi
+       done
+       RUST_EXPERIMENTAL_TARGETS=${RUST_EXPERIMENTAL_TARGETS[@]}
+
+       local cm_btype="$(usex debug DEBUG RELEASE)"
+       local build_channel
+       local build_miri="false"
+       case "${PV}" in
+               *9999*)
+                       build_channel="nightly"
+                       ;;
+               *beta*)
+                       build_channel="beta"
+                       ;;
+               *)
+                       build_channel="stable"
+                       ;;
+       esac
+       cat <<- _EOF_ > "${S}"/bootstrap.toml
+               # Suppresses a warning about tracking changes which we don't 
care about.
+               change-id = "ignore"
+               # https://github.com/rust-lang/rust/issues/135358 (bug #947897)
+               profile = "dist"
+               [llvm]
+               download-ci-llvm = false
+               optimize = $(toml_usex !debug)
+               release-debuginfo = $(toml_usex debug)
+               assertions = $(toml_usex debug)
+               ninja = true
+               targets = "${LLVM_TARGETS// /;}"
+               experimental-targets = "${RUST_EXPERIMENTAL_TARGETS// /;}"
+               link-shared = $(toml_usex system-llvm)
+               $(if is_libcxx_linked; then
+                       # https://bugs.gentoo.org/732632
+                       echo "use-libcxx = true"
+                       echo "static-libstdcpp = false"
+               fi)
+               $(case "${rust_target}" in
+                       i586-*-linux-*)
+                               # https://github.com/rust-lang/rust/issues/93059
+                               echo 'cflags = "-fcf-protection=none"'
+                               echo 'cxxflags = "-fcf-protection=none"'
+                               echo 'ldflags = "-fcf-protection=none"'
+                               ;;
+                       *)
+                               ;;
+               esac)
+               enable-warnings = false
+               [llvm.build-config]
+               CMAKE_VERBOSE_MAKEFILE = "ON"
+               $(if ! tc-is-cross-compiler; then
+                       # When cross-compiling, LLVM is compiled twice, once 
for host and
+                       # once for target.  Unfortunately, this build 
configuration applies
+                       # to both, which means any flags applicable to one 
target but not
+                       # the other will break.  Conditionally disable 
respecting user
+                       # flags when cross-compiling.
+                       echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+                       echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+                       echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = 
\"${LDFLAGS}\""
+                       echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = 
\"${LDFLAGS}\""
+                       echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = 
\"${LDFLAGS}\""
+                       echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = 
\"${ARFLAGS}\""
+               fi)
+               [build]
+               build-stage = 2
+               test-stage = 2
+               build = "${rust_build}"
+               host = ["${rust_host}"]
+               target = [${rust_targets}]
+               cargo = "${rust_stage0_root}/bin/cargo"
+               rustc = "${rust_stage0_root}/bin/rustc"
+               rustfmt = "${rust_stage0_root}/bin/rustfmt"
+               docs = $(toml_usex doc)
+               compiler-docs = false
+               submodules = false
+               python = "${EPYTHON}"
+               locked-deps = true
+               vendor = true
+               extended = true
+               tools = [${tools}]
+               verbose = 2
+               sanitizers = false
+               profiler = true
+               cargo-native-static = false
+               [install]
+               prefix = "${EPREFIX}/usr/lib/${PN}/${SLOT}"
+               sysconfdir = "etc"
+               docdir = "share/doc/rust"
+               bindir = "bin"
+               libdir = "lib"
+               mandir = "share/man"
+               [rust]
+               # https://github.com/rust-lang/rust/issues/54872
+               codegen-units-std = 1
+               optimize = true
+               debug = $(toml_usex debug)
+               debug-assertions = $(toml_usex debug)
+               debug-assertions-std = $(toml_usex debug)
+               debuginfo-level = $(usex debug 2 0)
+               debuginfo-level-rustc = $(usex debug 2 0)
+               debuginfo-level-std = $(usex debug 2 0)
+               debuginfo-level-tools = $(usex debug 2 0)
+               debuginfo-level-tests = 0
+               backtrace = true
+               incremental = false
+               $(if ! tc-is-cross-compiler; then
+                       echo "default-linker = \"${CHOST}-cc\""
+               fi)
+               channel = "${build_channel}"
+               description = "gentoo"
+               rpath = true
+               verbose-tests = true
+               optimize-tests = $(toml_usex !debug)
+               codegen-tests = true
+               omit-git-hash = false
+               dist-src = false
+               remap-debuginfo = true
+               lld = $(usex system-llvm false $(toml_usex wasm))
+               $(if use lto && tc-is-clang && ! tc-ld-is-mold; then
+                       echo "use-lld = true"
+               fi)
+               # only deny warnings if doc+wasm are NOT requested, documenting 
stage0 wasm std fails without it
+               # https://github.com/rust-lang/rust/issues/74976
+               # https://github.com/rust-lang/rust/issues/76526
+               deny-warnings = $(usex wasm $(usex doc false true) true)
+               backtrace-on-ice = true
+               jemalloc = false
+               # See https://github.com/rust-lang/rust/issues/121124
+               lto = "$(usex lto thin off)"
+               [dist]
+               src-tarball = false
+               compression-formats = ["xz"]
+               compression-profile = "balanced"
+       _EOF_
+
+       for v in $(multilib_get_enabled_abi_pairs); do
+               rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+               arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+               export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+               cat <<- _EOF_ >> "${S}"/bootstrap.toml
+                       [target.${rust_target}]
+                       ar = "$(tc-getAR)"
+                       cc = "$(tc-getCC)"
+                       cxx = "$(tc-getCXX)"
+                       linker = "$(tc-getCC)"
+                       ranlib = "$(tc-getRANLIB)"
+                       llvm-libunwind = "$(usex llvm-libunwind $(usex 
system-llvm system in-tree) no)"
+               _EOF_
+               if use system-llvm; then
+                       cat <<- _EOF_ >> "${S}"/bootstrap.toml
+                               llvm-config = 
"$(get_llvm_prefix)/bin/llvm-config"
+                       _EOF_
+               fi
+               # by default librustc_target/spec/linux_musl_base.rs sets 
base.crt_static_default = true;
+               # but we patch it and set to false here as well
+               if use elibc_musl; then
+                       cat <<- _EOF_ >> "${S}"/bootstrap.toml
+                               crt-static = false
+                               musl-root = "$($(tc-getCC) -print-sysroot)/usr"
+                       _EOF_
+               fi
+       done
+       if use wasm; then
+               wasm_target="wasm32-unknown-unknown"
+               export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' 
'-march*' '-mtune*'; echo "$CFLAGS")"
+               cat <<- _EOF_ >> "${S}"/bootstrap.toml
+                       [target.wasm32-unknown-unknown]
+                       linker = "$(usex system-llvm lld rust-lld)"
+                       # wasm target does not have profiler_builtins 
https://bugs.gentoo.org/848483
+                       profiler = false
+               _EOF_
+       fi
+
+       if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace 
intentionally shifted below
+       # experimental cross support
+       # discussion: https://bugs.gentoo.org/679878
+       # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+       # it would be much better if we could split out stdlib
+       # complilation to separate ebuild and abuse CATEGORY to
+       # just install to /usr/lib/rustlib/<target>
+
+       # extra targets defined as a bash array
+       # spec format:  <LLVM target>:<rust-target>:<CTARGET>
+       # best place would be /etc/portage/env/dev-lang/rust
+       # Example:
+       # RUST_CROSS_TARGETS=(
+       #       "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+       # )
+       # no extra hand holding is done, no target transformations, all
+       # values are passed as-is with just basic checks, so it's up to user to 
supply correct values
+       # valid rust targets can be obtained with
+       #       rustc --print target-list
+       # matching cross toolchain has to be installed
+       # matching LLVM_TARGET has to be enabled for both rust and llvm (if 
using system one)
+       # only gcc toolchains installed with crossdev are checked for now.
+
+       # BUG: we can't pass host flags to cross compiler, so just filter for 
now
+       # BUG: this should be more fine-grained.
+       filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+       local cross_target_spec
+       for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+               # extracts first element form <LLVM 
target>:<rust-target>:<CTARGET>
+               local cross_llvm_target="${cross_target_spec%%:*}"
+               # extracts toolchain triples, <rust-target>:<CTARGET>
+               local cross_triples="${cross_target_spec#*:}"
+               # extracts first element after before : separator
+               local cross_rust_target="${cross_triples%%:*}"
+               # extracts last element after : separator
+               local cross_toolchain="${cross_triples##*:}"
+               use llvm_targets_${cross_llvm_target} || die "need 
llvm_targets_${cross_llvm_target} target enabled"
+               command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need 
${cross_toolchain} cross toolchain"
+
+               cat <<- _EOF_ >> "${S}"/bootstrap.toml
+                       [target.${cross_rust_target}]
+                       ar = "${cross_toolchain}-ar"
+                       cc = "${cross_toolchain}-gcc"
+                       cxx = "${cross_toolchain}-g++"
+                       linker = "${cross_toolchain}-gcc"
+                       ranlib = "${cross_toolchain}-ranlib"
+               _EOF_
+               if use system-llvm; then
+                       cat <<- _EOF_ >> "${S}"/bootstrap.toml
+                               llvm-config = 
"$(get_llvm_prefix)/bin/llvm-config"
+                       _EOF_
+               fi
+               if [[ "${cross_toolchain}" == *-musl* ]]; then
+                       cat <<- _EOF_ >> "${S}"/bootstrap.toml
+                               musl-root = "$(${cross_toolchain}-gcc 
-print-sysroot)/usr"
+                       _EOF_
+               fi
+
+               # append cross target to "normal" target list
+               # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+               # becomes 'target = 
["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+               rust_targets="${rust_targets},\"${cross_rust_target}\""
+               sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" 
bootstrap.toml || die
+
+               ewarn
+               ewarn "Enabled ${cross_rust_target} rust target"
+               ewarn "Using ${cross_toolchain} cross toolchain"
+               ewarn
+               if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+                       ewarn "'sys-devel/binutils[multitarget]' is not 
installed"
+                       ewarn "'strip' will be unable to strip cross libraries"
+                       ewarn "cross targets will be installed with full debug 
information"
+                       ewarn "enable 'multitarget' USE flag for binutils to be 
able to strip object files"
+                       ewarn
+                       ewarn "Alternatively llvm-strip can be used, it 
supports stripping any target"
+                       ewarn "define STRIP=\"llvm-strip\" to use it 
(experimental)"
+                       ewarn
+               fi
+       done
+       fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+       einfo "Rust configured with the following flags:"
+       echo
+       echo RUSTFLAGS="\"${RUSTFLAGS}\""
+       echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+       echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+       echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+       env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+       env | grep "CFLAGS_.*"
+       echo
+       einfo "bootstrap.toml contents:"
+       cat "${S}"/bootstrap.toml || die
+       echo
+}
+
+src_compile() {
+       # -v will show invocations, -vv "very verbose" is overkill, -vvv "very 
very verbose" is insane
+       RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -v 
--config="${S}"/bootstrap.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+       # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+       # those are basic and codegen tests.
+       local tests=(
+               codegen
+               codegen-units
+               compile-fail
+               incremental
+               mir-opt
+               pretty
+               run-make
+       )
+
+       # fails if llvm is not built with ALL targets.
+       # and known to fail with system llvm sometimes.
+       use system-llvm || tests+=( assembly )
+
+       # fragile/expensive/less important tests
+       # or tests that require extra builds
+       # TODO: instead of skipping, just make some nonfatal.
+       if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+               tests+=(
+                       rustdoc
+                       rustdoc-js
+                       rustdoc-js-std
+                       rustdoc-ui
+                       run-make-fulldeps
+                       ui
+                       ui-fulldeps
+               )
+       fi
+
+       local i failed=()
+       einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+       for i in "${tests[@]}"; do
+               local t="src/test/${i}"
+               einfo "rust_src_test: running ${t}"
+               if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv 
--config="${S}"/bootstrap.toml \
+                               -j$(makeopts_jobs) --no-doc --no-fail-fast 
"${t}"
+               then
+                               failed+=( "${t}" )
+                               eerror "rust_src_test: ${t} failed"
+               fi
+       done
+
+       if [[ ${#failed[@]} -ne 0 ]]; then
+               eerror "rust_src_test: failure summary: ${failed[@]}"
+               die "aborting due to test failures"
+       fi
+}
+
+src_install() {
+       DESTDIR="${D}" "${EPYTHON}" ./x.py install -v 
--config="${S}"/bootstrap.toml -j$(makeopts_jobs) || die
+
+       docompress /usr/lib/${PN}/${SLOT}/share/man/
+
+       # bug #689562, #689160
+       rm -v "${ED}/usr/lib/${PN}/${SLOT}/etc/bash_completion.d/cargo" || die
+       rmdir -v "${ED}/usr/lib/${PN}/${SLOT}"/etc{/bash_completion.d,} || die
+
+       local symlinks=(
+               cargo
+               rustc
+               rustdoc
+               rust-gdb
+               rust-gdbgui
+               rust-lldb
+       )
+
+       use clippy && symlinks+=( clippy-driver cargo-clippy )
+       if [[ ${PV} = *9999* ]]; then
+               use miri && symlinks+=( miri cargo-miri )
+       fi
+       use rustfmt && symlinks+=( rustfmt cargo-fmt )
+       use rust-analyzer && symlinks+=( rust-analyzer )
+
+       einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+       local i
+       for i in "${symlinks[@]}"; do
+               # we need realpath on /usr/bin/* symlink return 
version-appended binary path.
+               # so /usr/bin/rustc should point to 
/usr/lib/rust/<ver>/bin/rustc-<ver>
+               # need to fix eselect-rust to remove this hack.
+               local ver_i="${i}-${PV%%_*}"
+               if [[ -f "${ED}/usr/lib/${PN}/${SLOT}/bin/${i}" ]]; then
+                       einfo "Installing ${i} symlink"
+                       ln -v "${ED}/usr/lib/${PN}/${SLOT}/bin/${i}" 
"${ED}/usr/lib/${PN}/${SLOT}/bin/${ver_i}" || die
+               else
+                       ewarn "${i} symlink requested, but source file not 
found"
+                       ewarn "please report this"
+               fi
+               dosym "../lib/${PN}/${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}"
+       done
+
+       # symlinks to switch components to active rust in eselect
+       dosym "${SLOT}/lib" "/usr/lib/${PN}/lib-${SLOT}"
+       use rust-analyzer && dosym "${SLOT}/libexec" 
"/usr/lib/${PN}/libexec-${SLOT}"
+       dosym "${SLOT}/share/man" "/usr/lib/${PN}/man-${SLOT}"
+       dosym "rust/${SLOT}/lib/rustlib" "/usr/lib/rustlib-${SLOT}"
+       dosym "../../lib/${PN}/${SLOT}/share/doc/rust" "/usr/share/doc/${P}"
+
+       newenvd - "50${P}" <<-_EOF_
+               MANPATH="${EPREFIX}/usr/lib/rust/man-${SLOT}"
+       _EOF_
+
+       rm -rf "${ED}/usr/lib/${PN}/${SLOT}"/*.old || die
+       rm -rf "${ED}/usr/lib/${PN}/${SLOT}/bin"/*.old || die
+       rm -rf "${ED}/usr/lib/${PN}/${SLOT}/doc"/*.old || die
+
+       # note: eselect-rust adds EROOT to all paths below
+       cat <<-_EOF_ > "${T}/provider-${PN}-${SLOT}"
+               /usr/bin/cargo
+               /usr/bin/rustdoc
+               /usr/bin/rust-gdb
+               /usr/bin/rust-gdbgui
+               /usr/bin/rust-lldb
+               /usr/lib/rustlib
+               /usr/lib/rust/lib
+               /usr/lib/rust/man
+               /usr/share/doc/rust
+       _EOF_
+
+       if use clippy; then
+               echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+               echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+       fi
+       if [[ ${SLOT} == *9999* ]] && use miri; then
+               echo /usr/bin/miri >> "${T}/provider-${P}"
+               echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+       fi
+       if use rustfmt; then
+               echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+               echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+       fi
+       if use rust-analyzer; then
+               echo /usr/lib/rust/libexec >> "${T}/provider-${P}"
+               echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+       fi
+
+       insinto /etc/env.d/rust
+       doins "${T}/provider-${PN}-${SLOT}"
+
+       if use dist; then
+               "${EPYTHON}" ./x.py dist -v --config="${S}"/bootstrap.toml 
-j$(makeopts_jobs) || die
+               insinto "/usr/lib/${PN}/${SLOT}/dist"
+               doins -r "${S}/build/dist/."
+       fi
+}
+
+pkg_postinst() {
+
+       eselect rust update
+
+       if has_version dev-debug/gdb || has_version llvm-core/lldb; then
+               elog "Rust installs helper scripts for calling GDB and LLDB,"
+               elog "for convenience they are installed under 
/usr/bin/rust-{gdb,lldb}-${PV}."
+       fi
+
+       if has_version app-editors/emacs; then
+               optfeature "emacs support for rust" app-emacs/rust-mode
+       fi
+
+       if has_version app-editors/gvim || has_version app-editors/vim; then
+               optfeature "vim support for rust" app-vim/rust-vim
+       fi
+}
+
+pkg_postrm() {
+       eselect rust cleanup
+}

diff --git a/sys-devel/rust-std/Manifest b/sys-devel/rust-std/Manifest
index 7ec0b59262ae..e2c547494504 100644
--- a/sys-devel/rust-std/Manifest
+++ b/sys-devel/rust-std/Manifest
@@ -16,3 +16,5 @@ DIST rustc-1.88.0_beta20250526-src.tar.xz 283223628 BLAKE2B 
1c21853c0b7edcafd877
 DIST rustc-1.88.0_beta20250526-src.tar.xz.asc 801 BLAKE2B 
a412d72e4e0f273f03f3fee41abe1aeda03f77339891469e994f3a6bde0cd3836a1da087d908e732e90cd3285743a4a3c728c718ad1dda5daf7cca9de3be2c52
 SHA512 
45f208555f8b2fd3b21ac4cdc8fd7a110dc53fedbbe8d11542f105c5c8657a628309c8ff4520eb2c740cf3e784bfea0f21832b71b19a356b1b99fc7d0f04f607
 DIST rustc-1.88.0_beta20250603-src.tar.xz 283255312 BLAKE2B 
5b46509c46c4fbb10c4b3cee3edf9a1428c4b0f54d8f4d6a042e9776e05242988c933a90654538cf9806c4d1ee1c01ff3ecdcb1711fd7240cacbf5cbeff9a96b
 SHA512 
ebc5f2175fc7ac8b89ee68d3089272ea444cfa9375a13c989c64a267b050c1065eaa124263b440ba6513a4b6ba4c8efbf58f3a78b4d94bd0e658dfab5ca0a8e5
 DIST rustc-1.88.0_beta20250603-src.tar.xz.asc 801 BLAKE2B 
426fe3cf64ecbc5564feeb1c2c784b98d4aa71184006b1430c86d1b98f91592e850feefa0f6e91142f1b5c227556041cd32628aed7bacd43dddd252dc111b73f
 SHA512 
ba4336934071fff1d9abe44d50fced7bd2fd1f6a5c116b8d17312d6ec5d143664fb570fba90f6cf417c5220cd9f42b2bb1695d73e915451b1dd2f726a451c7ec
+DIST rustc-1.88.0_beta20250622-src.tar.xz 283275068 BLAKE2B 
a681a91b45c27a51abea3006d482a98b42d5f9459a39a5d01415ec3adbf7d4ea72c5e2738ecd8d0a1738cd926a1e72c7a9ef99e23e7b5932a6781d4d541c277d
 SHA512 
89aa97ad68f311783dea3728c9c3674f445fa95ad5bac109ccce82e8cc20a15d1aaae6528617f7febec722b6a9657b0c205cdba1c5adf07ca70cad6dc5184228
+DIST rustc-1.88.0_beta20250622-src.tar.xz.asc 801 BLAKE2B 
637a7bb29a19179c7f804ca3267e1d15103455f0dc428d9b440faeb12455377edbef71bf2308607e08a176f89d6ed73aa15841f06c089c060e9c4a2d5f317420
 SHA512 
d43922db5bf0f1f01695e95b06eabaa64bb72b033c30b8a66624f9abe1bfc361aad1739a81be263b7b5137d9f3570dc9c22f5703e3a162cf852173e505e81655

diff --git a/sys-devel/rust-std/rust-std-1.88.0_beta20250622.ebuild 
b/sys-devel/rust-std/rust-std-1.88.0_beta20250622.ebuild
new file mode 100644
index 000000000000..d3494b367846
--- /dev/null
+++ b/sys-devel/rust-std/rust-std-1.88.0_beta20250622.ebuild
@@ -0,0 +1,179 @@
+# Copyright 2020-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+
+inherit edo flag-o-matic multiprocessing python-any-r1 rust-toolchain 
toolchain-funcs verify-sig
+
+DESCRIPTION="Rust standard library, standalone (for crossdev)"
+HOMEPAGE="https://www.rust-lang.org";
+
+if [[ ${PV} = *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/rust-lang/rust.git";
+       EGIT_SUBMODULES=(
+                       "*"
+                       "-src/gcc"
+       )
+elif [[ ${PV} == *beta* ]]; then
+       # Identify the snapshot date of the beta release:
+       # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep 
beta-src.tar.xz
+       betaver=${PV//*beta}
+       BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+       MY_P="rustc-beta"
+       
SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz
 -> rustc-${PV}-src.tar.xz
+                       verify-sig? ( 
https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc
+                                       -> rustc-${PV}-src.tar.xz.asc )
+       "
+       S="${WORKDIR}/${MY_P}-src"
+else
+       MY_P="rustc-${PV}"
+       SRC_URI="https://static.rust-lang.org/dist/${MY_P}-src.tar.xz
+                       verify-sig? ( 
https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc )
+       "
+       S="${WORKDIR}/${MY_P}-src"
+fi
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4"
+SLOT="stable/$(ver_cut 1-2)"
+# please do not keyword
+#KEYWORDS="" #nowarn
+IUSE="debug"
+
+BDEPEND="
+       ${PYTHON_DEPS}
+       ~dev-lang/rust-${PV}:=
+       verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+DEPEND="||
+       (
+               >="${CATEGORY}"/gcc-4.7:*
+               >="${CATEGORY/sys-devel/llvm-core}"/clang-3.5:*
+       )
+"
+RDEPEND="${DEPEND}"
+
+# need full compiler to run tests
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so"
+
+#
+# The cross magic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+       if [[ ${CATEGORY} == cross-* ]] ; then
+               export CTARGET=${CATEGORY#cross-}
+       fi
+fi
+
+is_cross() {
+       [[ ${CHOST} != ${CTARGET} ]]
+}
+
+toml_usex() {
+       usex "$1" true false
+}
+
+pkg_pretend() {
+       is_cross || die "${PN} should only be used for cross"
+}
+
+pkg_setup() {
+       python-any-r1_pkg_setup
+}
+
+src_prepare() {
+       default
+}
+
+src_configure() {
+       # do the great cleanup
+       strip-flags
+       filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64'
+       strip-unsupported-flags
+
+       local rust_root x
+       rust_root="$(rustc --print sysroot)"
+       rtarget="$(rust_abi ${CTARGET})"
+       rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be 
custom.
+       rbuild="$(rust_abi ${CBUILD})"
+       rhost="$(rust_abi ${CHOST})"
+
+       echo
+       for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS 
CXXFLAGS LDFLAGS; do
+               einfo "$(printf '%10s' ${x^^}:) ${!x}"
+       done
+
+       cat <<- EOF > "${S}"/bootstrap.toml
+               [build]
+               build = "${rbuild}"
+               host = ["${rhost}"]
+               target = ["${rtarget}"]
+               cargo = "${rust_root}/bin/cargo"
+               rustc = "${rust_root}/bin/rustc"
+               submodules = false
+               python = "${EPYTHON}"
+               locked-deps = true
+               vendor = true
+               extended = true
+               verbose = 2
+               cargo-native-static = false
+               [install]
+               prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+               sysconfdir = "etc"
+               docdir = "share/doc/rust"
+               bindir = "bin"
+               libdir = "lib"
+               mandir = "share/man"
+               [rust]
+               # https://github.com/rust-lang/rust/issues/54872
+               codegen-units-std = 1
+               optimize = true
+               debug = $(toml_usex debug)
+               debug-assertions = $(toml_usex debug)
+               debuginfo-level-rustc = 0
+               backtrace = true
+               incremental = false
+               default-linker = "$(tc-getCC)"
+               rpath = false
+               dist-src = false
+               remap-debuginfo = true
+               jemalloc = false
+               [dist]
+               src-tarball = false
+               [target.${rtarget}]
+               ar = "$(tc-getAR ${CTARGET})"
+               cc = "$(tc-getCC ${CTARGET})"
+               cxx = "$(tc-getCXX ${CTARGET})"
+               linker = "$(tc-getCC ${CTARGET})"
+               ranlib = "$(tc-getRANLIB ${CTARGET})"
+               $(usev elibc_musl 'crt-static = false')
+       EOF
+
+       einfo "${PN^} configured with the following settings:"
+       cat "${S}"/bootstrap.toml || die
+}
+
+src_compile() {
+       edo env RUST_BACKTRACE=1 \
+               "${EPYTHON}" ./x.py build -vv --config="${S}"/bootstrap.toml 
-j$(makeopts_jobs) \
+               library/std --stage 0
+}
+
+src_test() {
+       ewarn "${PN} can't run tests"
+}
+
+src_install() {
+       local rustlib="lib/rust/${PV}/lib/rustlib"
+       dodir "/usr/${rustlib}"
+       pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die
+       cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die
+       popd > /dev/null || die
+}

Reply via email to