commit: 06293925c5eb60b04d27b29c413aa9aee23b71a2
Author: Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 10 06:43:38 2026 +0000
Commit: Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Mar 10 06:48:59 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06293925
*/*: dev-lang/rust: add 1.94.0
Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>
dev-lang/rust-bin/Manifest | 29 +
dev-lang/rust-bin/rust-bin-1.94.0.ebuild | 337 ++++++++++
dev-lang/rust-common/Manifest | 2 +
dev-lang/rust-common/rust-common-1.94.0.ebuild | 73 ++
dev-lang/rust/Manifest | 3 +
dev-lang/rust/rust-1.94.0.ebuild | 890 +++++++++++++++++++++++++
sys-devel/rust-std/Manifest | 2 +
sys-devel/rust-std/rust-std-1.94.0.ebuild | 180 +++++
8 files changed, 1516 insertions(+)
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
index a9f95346995e..781f96c3be15 100644
--- a/dev-lang/rust-bin/Manifest
+++ b/dev-lang/rust-bin/Manifest
@@ -794,6 +794,34 @@ DIST rust-1.93.1-x86_64-unknown-linux-gnu.tar.xz 193192180
BLAKE2B fd8d2f3ab45f3
DIST rust-1.93.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
adf891709bd5c87dafdbd8e8498956257a0fbfb179147f00f23dd00ac2eb43ab19a2d51850632f7a3d9adaa403461144983a2bb172d6eabd6e2e148eda570662
SHA512
25b658237207ef5f99ff3e276412f9ac08b5c5504df066d9178e22e22d3d4e3dfa897313a6393a6a6833ccda09c0c5dbcfeacfce53c09bf5a97e7b36afbb3f3f
DIST rust-1.93.1-x86_64-unknown-linux-musl.tar.xz 295454356 BLAKE2B
1e40b50ff65d42a7445ff4d3f4a79fec7e8f729c245ba06d0bea90a05c387ac895df736ff59d27799512aa94703205aeb5235802badd56c3e0b681269e66ab41
SHA512
c805770236eee08cc222022d46e09ba6835c08241644d1d76eeab42463a9faafa26f1d50796faf0223e6601940ff52c507eb04ecc3f26066900c0185341bec4f
DIST rust-1.93.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B
40dfd17d105de1bcfb3fecf0b41c066c3f9c93a563396a0bf88d975667776b1c1d2784a0cc495a14c78878b9c3b0043800b06de702eca6720f0f340f7afd1989
SHA512
6f584cbe33f7678632929f9395ac92a75721da376883432c6608fd0383fa713342a8971f85645a4dc9311477a7c2a6cc905f4e25fca47eb8a35dc9996f8fbb3f
+DIST rust-1.94.0-aarch64-unknown-linux-gnu.tar.xz 168368212 BLAKE2B
ba107dbbb31ce71abef882725a0232f3a4f344d082c49a263fa6b3bac41ac46a87b3f536c12d1d79a4561a1e309f9cbce7d45dd944cc5fe03ab0091280cae4e5
SHA512
b118c789ae3ad96974df70a733e94d24a184f408d6ffbcdeea0325bd5b2efa0946f430baaf5445a84af4bbd646568f92da0bf0772a8769f8f1d3c5f2a82db244
+DIST rust-1.94.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
5f503e3e7545cf9ca732c6ebb05cb2e0bf55a92fad2fd963ff04719bc4d87d20229c2af41e13570457c07957b3999abfe05ffbf88243269120fcda57307f4ec1
SHA512
04acd5c96f6aa3534d962f615991fe8bfaf7fb39cd2887965cc036e6b2c702e689dc30f685c4adf748c5482b6b03067f3c7ad32e1b6df591dd947c91dee8b20e
+DIST rust-1.94.0-aarch64-unknown-linux-musl.tar.xz 242757992 BLAKE2B
8fc12e22518a66ee4d8a8a618821a034811b608a026e8cc0eff84dd7f011fa0a982b8982988c4eeea43707dea4d07f152ab0741a8ad71fa11cfcf6acf90a4355
SHA512
272cf48d6cbd25012a0960cb0d8beff08ad32351c763d25cbae1c2ceb44f2653bc962c591acb1b258ccd53996874481666e4f6ec2372113f0c3f4efb88b82dd2
+DIST rust-1.94.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B
6e40b7ceabe89e1fe152aa46688a22ff35f85bfeb971fabc11c654d58b86432d6217cadb646a6ce1153c3c9ba439e81fd903122b1a5fec9df21ba647e6a68c5a
SHA512
a1b753b56518f054a3ed6b707e8278e679ebf298622295725c91fe08f103ee39d735b0d9022528d94aa6c870400ef1ab86f5165bbaba61b5dfb1e90a25a61f52
+DIST rust-1.94.0-arm-unknown-linux-gnueabi.tar.xz 224362172 BLAKE2B
fa53580819215c26b9368f5d9e77c650367063282f3c21bee4376b89efef47a342401df507586264bdc3549080267a4b9d384ef593bf7a144c460cef1c7e289e
SHA512
9edbe0ff5dd56af61fc68b1fd60f40307a5334162d1a495e3aa39a37dd1412a8b5b24e30e05b781ff28718a30f7fcd80eb85ed3f59189b7ed355ea274a296b4a
+DIST rust-1.94.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B
a47b53f3efc5fc545e7b5fae3456d9232fa6f5994e36222b64c026452b603533eb717e18aea26034f329fc7185bf7f9ec614b1a663c2061d78c1583f00f4ae26
SHA512
28c1c143db51ba40ce23a6ba0afee1a85049ef79e03c2683e5972462dd901cc41d263700e1f2f32bd29fe93a9da2bc060e319fc81e353e0eb13250448f18fb13
+DIST rust-1.94.0-arm-unknown-linux-gnueabihf.tar.xz 224134336 BLAKE2B
4b3f8db4de2b99d21340386e55fc2a29e58dead7716f77ec9e8c462c382c8cdcf24b808efeb8446544a807774a857fe80fe245617b08c35e9e013157e69e82bb
SHA512
8aa63076a3c91002c552c90deb9f8a678bc3915992b70cf124e299c4df1ff61a3fb8e06c697c254ee19b34875a87f00e98d0ea0562fc86a0acb7a1336bd55e50
+DIST rust-1.94.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B
a91bd9eb112639ba01e33427a1675ba410b3a4849e78da9a50050a030699f72dc46c96189faeb481a49f82a5f73537802dd9a41cbe241b395514cb7a71a90adc
SHA512
6e696d533f23a3dbe55421aab5df93104122d8c0455561a5e91df3a76c9b4938d7a5b9a9b7f9e2c6e596a5c9f801a47051509cbb58dd3711a3a69c5f797726ae
+DIST rust-1.94.0-armv7-unknown-linux-gnueabihf.tar.xz 227851168 BLAKE2B
44279ba276db25ba0668883aba38aa0fa80fb75cbba723c36cff2d96f528c34b80207329bf1e32722a1b67e7045bfd1a01b522b284c600a3ac072125ad268bd6
SHA512
fef64e01d7bd17a4c240812455cca9a71a86dff21e4a88a423f7cc58cf765127a2906e42b722559b9f0f23cc9c018851dac1fba1c17910cc199c69555d9b3df9
+DIST rust-1.94.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B
9c18dedfabb534f2dfa6de50a477974b9651397645ca4ddfd66ed087765b09adcb4babbcf8c30ac6be17f5487d51380dd710b272c6ffa401add5cf7ffb701625
SHA512
139a651816a870190b869c24c8fc625824a467be3197f65e3357d7bf08d55e68932aadcce69a775db1c51ecdf89d69c99f155a89ce7d33eaca0f39e9f125bfa8
+DIST rust-1.94.0-i686-unknown-linux-gnu.tar.xz 266397784 BLAKE2B
02dc50f4fbf0948444ef30c6c4541f29a7a43f1e1f91756faa2beeb37ffe643d695c0e3564e3243f3e224b1a587f66dbf31605655f8b2ed474d865976b017b3a
SHA512
3079b7f469deac579adc861a84d77bb6c017ac5cdeaf6b7100cf59f5d410a768f404f651b01260eff7d95304b903b5bbbab4c8e6be7b0159f09dc5cd8e3d66e0
+DIST rust-1.94.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
014c47a466f337b6130a63ab72f3798f9ad48ce4fc7d56b7fbb0a4cfbd2ab9cbb5c35fb283d038a79566360cd25edd851d96964947ebe7d654de067e119dbc24
SHA512
da0f0dcde949dfb530749f4d0cebf62a0e7a20f83cb634e43c9e7fc85a5b9d764d1d8c266771eb48b29a81240b995ab8960993215539fa59cc06b7129ffef652
+DIST rust-1.94.0-loongarch64-unknown-linux-gnu.tar.xz 258889560 BLAKE2B
fc7e29a5ecbc43a4cfed41e98cc2a7b564421dae4cf2cd85d5107e53c073fdbf82bacf520b34224c7e7c2e4da7bf64398b05765044c1b7c2e8910ded81051f5b
SHA512
0f7c569f2b5b879360a1f44089ea3e0ba46389ba57b0853e53b5666f10f6728d0a56100af09155ed0401eb6ae0b0cf8c8a2b4a2b55f2be60f765d0340d5f7260
+DIST rust-1.94.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
684a4d77796b5fbf917cf9676215a3c4c2c936899626663c0bbe79d48f59a7b7bc2e5dd2110caa060dfd2489983dac4f733cea9b0440ede163c7b6cf59c96499
SHA512
416c18af7439432e41721f214b4551c39f82af768c18ebbb3cb76e9a0f5d5f3babbfb67fff3f29f85ebf18948e4c083cea9cdeeb776899240884bdc1d689bd58
+DIST rust-1.94.0-powerpc-unknown-linux-gnu.tar.xz 247410940 BLAKE2B
ee3c3d4d88b87f15cbeeb7ef1700b798fffc1eaf11d1fa9f4c9a779d0bd2acc9250751533825cdfbe49e8dd873e6a6b2e6c2fe9fa6d34baa85e0ef8f48f06e0d
SHA512
1bb914d4142730ac31fd7c675fe8805ac636f82c56db1f3911eb2d185694187a3a876adc2364c008c552eea551078ece0e43d596dae73ddb680cb2cab58feaf1
+DIST rust-1.94.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
5d5c212d98b9ec28062d45d8251f20661ffbe65016354c03be02c40cd3d536a9b54f13eae824598a420bdf1b118808a9eb34bb1678d2c3b4762a25bea92883d1
SHA512
f6cc1c936ce9009f36c2de3cc615738c1af073042d35a969ae15f678a3c7073b3f563738c0455f3b6c11e7888f8832243ba357589cb05117fa712efc0b60abcd
+DIST rust-1.94.0-powerpc64-unknown-linux-gnu.tar.xz 248936192 BLAKE2B
e6ff7c41136af4c35395973dc4d72e3a1862fcd2ffb72eb8bbe4b6a070342bc5145397e3455876c0d3cf3670dd87e648228b6387d14b8b4c5c1df4eace231f47
SHA512
4e5f7f49a847348b45b2147c1f8a5933f8bef08d817281c4c7939e988f2c2d37c54cf6948d45e6674275ec12eb0032a16378b695509bb9821209884cee29b86b
+DIST rust-1.94.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
165f2fd35328755b79c2cf784709bc4d0f16786895c4f8a8729e05a5e508073658b62abc4c1a1ebd1693211a9d32849fec43cf40d74c45c71b0d2121686e9a47
SHA512
423d30d5c89f074bb4eff8d8dc44301b279459660c8a17529f263b83047b5918cc2ba619f4498520050bfbf1827bfb015e11aee9b12b2b7bf4d0069293ed17d1
+DIST rust-1.94.0-powerpc64le-unknown-linux-gnu.tar.xz 268819820 BLAKE2B
cae5cce8a894d54bb0e85a92e687646eae72d2f3f95c94247eb0f2988753fc5278eed87a57ff7573bb655e509ca6ce73947b751907aa07060c7033fbb1e6e635
SHA512
9d8e5e428bd2b3debfc921528e232441435ce8cf0f820136dbd5bebeaca9846cbe3cd43d321e5095766693c9114dbf10eb416032ab6b7ccc57423e13c97a2849
+DIST rust-1.94.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
b76d447b1fa6f22af90cf7e2f7484c20e5e303195a5715a153963214dad88186a0777bd0ab4af19697a05af6faa37cf07745581775b561f90d09af317473a4b8
SHA512
5e144ab30a045e269a7a3e4fb4bad8024865018a294775d9d6d0c51f354d72e9942c1219811548204e9397cb9d574ac465c8d7ae3fdda57eadc2bb7856a7684a
+DIST rust-1.94.0-riscv64gc-unknown-linux-gnu.tar.xz 246536292 BLAKE2B
34ea02484af01dff31a1d6ee0441683100dfd0cb7e6ed831211937c3114bbe035a63608b063295bf2f4443ce836adc2ef82e4c0f6b6a5adeb73a94516a8e7c67
SHA512
663a4b13cc907a8050c8818133d159e341302fc1596c87885658da9c5fd07f372776e98ebb93ee3cbbf20f6859e6875e56726d4a851841cf45940623f5d21c48
+DIST rust-1.94.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
fde031b586201ddd4c2876988a2fb688d94a4536401ef702c746c5146b0f8726a335e9ef5731e100344dd8721c148ffe80803a6362a7948a10dd01a63927e415
SHA512
02a8a05432edd6775619eb32222f39308e041d4df05784bc9b1e1a00cb55caf5edc7e669a905a39d7d8a37fa4631ec40c9aa7982dfb095d0c42f85b7171e79cd
+DIST rust-1.94.0-s390x-unknown-linux-gnu.tar.xz 238229836 BLAKE2B
e9cf6ea1a05cb3368e385f2dc8a6cd580b28755064a66737cd7e906890ce9eda70c004a8c8ae1eccbad1ffa6a61c8298b4119bacdede53d9ae41d7621c1cd084
SHA512
ddfc0399d18bdf4c5f4ffaf6cf9418af236290c715d74a528704ac916aff1d5f79c19d9fe04d9e94ba27dbba793ba689b57b2b5f0e13e661e6dae217a58f1f1c
+DIST rust-1.94.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
bdcc1bcd3488e60232d986bd8cd04ce36e76e33088dea9570ef17139849b076954526b5a1efbfa833500bae4b387c6ab11c5fe838cf311f7561caed3ef4e673c
SHA512
8b8deda8a5cb94643304d4d9b626e71947750425f7fe4ad63eb75f2f480d1898dbaeb32efb86e1403bc741fb7c8ae9ba1722a99f9d8b37792bc8aa0e33835fe7
+DIST rust-1.94.0-x86_64-unknown-linux-gnu.tar.xz 191856892 BLAKE2B
fd5c644e56e6bf6a2f9c2982e16fccac88ecbe8c8fbaa85a5241447ba28cd82bdfe84a180899c95fb49ba1a672f6f3562e190b0e7c8bc3d7b847fb553c29cf5d
SHA512
a07b4dc0c6b7870db007886f27354468c4112c79aa02fa3952640921ff49138d4730e2aa7a89cb5c57f9eb86847b0ea6af646dbe268e8d1bb1cfea6d5e58ce97
+DIST rust-1.94.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
b88f0dd8daf268a914dbfb3ebaf9c48f0b74c3a84076db3e01e0d1d29c2d2502f81208eee55b063c1641965c4c1aa1cc08cc0c2668702e21b7766af7ca42f313
SHA512
330b12351d6a667c2bcc446e08048549e57d75f2eb3f7733f6313312c0c0064ddcd8426b9351c59cae99e5f2a436f5998e3b6b04e1d334a6c09b685c94474578
+DIST rust-1.94.0-x86_64-unknown-linux-musl.tar.xz 294178664 BLAKE2B
705ca28c01ae4eba4777ac636656be2c21c9004ba1dfec0382325e6c8c61dc2fca997a0c62a6e090f7d35fc41fb26fc300b06a5f15a2f489ab57c1a9b9529185
SHA512
43a87ff89ac4715f60643ed0de51ab505d53a86b6942b58df180a1cc81ea5da00e1be3bc101ffb25bc92831c88ef0264a7d7b92efd63cf7a0d472d169d919c22
+DIST rust-1.94.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B
7e0cf69a5d5c4eade8dfef4b0527362184671a284616352138d1073d9ffa5e08dda1979dd35757874e5241a7b2195a8abde6cca96f50dd44e1af50e06152b736
SHA512
e3b7eb37bfb5c7713bb6fae9d20d36d7554324712740e5453946936af30029e9200bb26e11c532df8936db178526398cbb5607c598a2945b12f85ee60f507d8e
DIST rust-1.94.0_beta20260126-aarch64-unknown-linux-gnu.tar.xz 168363516
BLAKE2B
38c623524417e98bfbe448f0be605552598b1b879fabac744d8263c5baa1d5eadd1a757582531eddc9bf7924b382073f33fe72f6fe6c3839f67410ba8456c2ab
SHA512
c06171cfca7bc42ac62a718541147ab6c3dc0221468ce3de673cd9fac0bde86f1b7d5fee060acf53f090f6cebb386c701625cde4658e0ae876417993cec6c872
DIST rust-1.94.0_beta20260126-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B
a81116d147b0bccc93944ed0ec82e1c4666620b4e45c0c38a18e6454fbc7b6a890ad04147f4a17e156a5e6cfdd08815f579cd8b5cdb806d001ee445e51e3b534
SHA512
dd1843c35cbcecf70d14da312a8340e3c523f8e2e37526a499a37bc94616852e597768d6fd6cd2e9f467674634b79c71b54b7cd40151b82e10cb446de5ef4f28
DIST rust-1.94.0_beta20260126-aarch64-unknown-linux-musl.tar.xz 242112904
BLAKE2B
af6a5ffa79ecebf271e09a2aecde8fa5a83e3aae421b7d1069464774345dcba122f6231a288c3f56cf0bb1e5195f80f149a9d851390494313c132166c6c27c7b
SHA512
083a69343a86244e006e78e4a4de39e42a6e4a4b91ace04a9706132fd38457be7227ece588245159a78d31fa5f87828d403190429a472dec847a203054cf9d98
@@ -873,5 +901,6 @@ DIST rust-src-1.91.0.tar.xz 3509292 BLAKE2B
b1cf99db4cbd864fda34c2068a19e8b36c99
DIST rust-src-1.92.0.tar.xz 3530724 BLAKE2B
1385e8cc8062dffa69829e4ffeee7daaaeddc35c20c5e841e5183952d2eb8e3c33fe64deff46a7017057723ac3623f1b918d6a61ba2efadc6501bae36241c161
SHA512
be31d704b936d421dae7774dd7243d2a2668c54eac07f3e8d6c289a994c9e238a6e775be2735c4b609e710d8bbb1afe9bf028375e573e5d16def58a53ebc4ba7
DIST rust-src-1.93.0.tar.xz 3722768 BLAKE2B
9b80cd62e3345cb523fc1596dc1957c03a5edb42e9144fdf1466959ebf347dba3725a1a777e9197dcdbdb7b99ef3cc6d2de9e6359c245db2a919064a2a92f91e
SHA512
02535cf5aca3efdc708d959c641994dc3f7f60385afbe3c4aa14037b5b7107ddfe1af0bca6493b97e0144e5d31e45937fe86b026e48bf6231ac7efd404762d83
DIST rust-src-1.93.1.tar.xz 3722488 BLAKE2B
61a63c8eb169917dd9140ddba06fbbf8e05ce54ee7331e6fb906eb705c69615922502da72f3646d35cf2a126b1624f3afe3ca45b611b6c7ebed843a38f8e6a3a
SHA512
5d4a5a3dede3b0334c779e9936030cfa46577600ee6d69e92e190d04c26c6020d262a6fd4e9b4516e7325a0e256ad18bc6d659bab0c638aa53dbe76f7d4dfa0f
+DIST rust-src-1.94.0.tar.xz 3750144 BLAKE2B
d73556a8615f43dd00f61d78df329c2a203e8af2347a82c60d134a039af0a23e8fd01715c255600cb73d78195fa3f3be018c983bbf26f7340c5fb637a7d43128
SHA512
2e9dfe1419eb32e65e6585b2f777aa48c97485f36daf49fe04759821ad5b961923b19c1c0c67fe6f4dbd82cb27748f3f7709bf481ec0ea6bccae7ab878f97712
DIST rust-src-1.94.0_beta20260126.tar.xz 3749064 BLAKE2B
ff884008033aac3b7bb9282ec3d4d4d43c2280a0514d3e43ccb588c545057a4df241b7645dfe679d6b4dfc1ac7de1f5df02ad33c8a5fc16185e2c3c775b27acd
SHA512
9a76eff1af369eb29f646d1125e37cf140685c3aa4930a75bfa7a6b299672c46525db06b2459626ddfa5ddabd26dcde297e8dadf0158ce302c2fcd5663769cc2
DIST rust-src-1.94.0_beta20260213.tar.xz 3749440 BLAKE2B
cd8e864bc1f09d365e1810429e294693f79b72e945f913e9a16c5f423544c584784388a3ae3ec6da661720ad16040ff5a70259b8b65f6100249ac4ffd97e4a17
SHA512
841bab85c546d262d1b35f751e18e7b27585e3fcf21b6d2a185daa07294ff7dfaffc50c59b04334595c2f61e80b3582986c4bc2fe38716ab4ef89aa1ff86c656
diff --git a/dev-lang/rust-bin/rust-bin-1.94.0.ebuild
b/dev-lang/rust-bin/rust-bin-1.94.0.ebuild
new file mode 100644
index 000000000000..36df7dd9c6f2
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.94.0.ebuild
@@ -0,0 +1,337 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 21 )
+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 "rust-${PV}")
+ rust-src? (
${RUST_TOOLCHAIN_BASEURL%/}/2026-03-05/rust-src-${PV}.tar.xz )
+ "
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86" #
"~mips ~sparc"
+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 false; 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"
+
+# net-misc/curl is needed for our own bootstrapped rustc, since
cross-compiling bundled curl is not supported
+RDEPEND="
+ >=app-eselect/eselect-rust-20190311
+ dev-libs/openssl
+ net-misc/curl
+ 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)
+
+ 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
+
+ local v
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
+ rust_bin_url=$(grep
"xz_url.*rust-nightly-${rust_target}" "${WORKDIR}/channel-rust-nightly.toml" |
cut -d '"' -f 2)
+ einfo "Using nightly Rust from ${rust_bin_url} for
${rust_target}"
+
+ einfo "Fetching nightly Rust tarball for ${rust_target}
..."
+ curl --progress-bar -L "${rust_bin_url}" -O || die
"Failed to fetch nightly tarball for ${rust_target}"
+ if use verify-sig; then
+ einfo "Fetching nightly signature for
${rust_target} ..."
+ curl --progress-bar -L "${rust_bin_url}.asc" -O
|| die "Failed to fetch nightly signature for ${rust_target}"
+ verify-sig_verify_detached
"${WORKDIR}/rust-nightly-${rust_target}.tar.xz" \
+
"${WORKDIR}/rust-nightly-${rust_target}.tar.xz.asc"
+ fi
+
+ tar -xf "${WORKDIR}/rust-nightly-${rust_target}.tar.xz"
|| die "Failed to unpack nightly tarball for ${rust_target}"
+ done
+ 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
+
+ # We only want to do this for the native ABI. Non-native ABIs are
+ # handled differently in multilib_src_install.
+ 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 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" )
+ if use rust-analyzer; then
+ local analysis="$(grep 'analysis' ./components || die "analysis
not found in components")"
+ components+=( "rust-analyzer-preview" "${analysis}" )
+ fi
+ # 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/rust-bin-${SLOT}/bin"
+ find "${ED}/opt/rust-bin-${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 version
+ case ${PV} in
+ *9999*)
+ version=nightly
+ ;;
+ *beta*)
+ version=beta
+ ;;
+ *)
+ version=${PV}
+ ;;
+ esac
+ rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
+ dodir "/opt/${P}/lib/rustlib"
+ cp -vr
"${WORKDIR}/rust-${version}-${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 e4d86a99d2bd..713c1dada4f2 100644
--- a/dev-lang/rust-common/Manifest
+++ b/dev-lang/rust-common/Manifest
@@ -26,6 +26,8 @@ DIST rustc-1.93.0-src.tar.xz 270925104 BLAKE2B
f96a05dae3494452471f6797fdc2246cc
DIST rustc-1.93.0-src.tar.xz.asc 801 BLAKE2B
9c1762c0bb431da8fda0a8a47f5745998ff31434bb0b2747aa4aafc34e09c1507207eb91b7ba80f7a780b7f7258a4b8e49b5c5b06f9fa9f4cfabf72edb9cb07e
SHA512
a6ea05bb6b7d3b429a1c863622c93ac4c97b25f56027f7f06f085acde26d1395f3515cc764ae3ef941d1669556a02365755b34e28ccaebe70c1ccb84c977228f
DIST rustc-1.93.1-src.tar.xz 270888296 BLAKE2B
fe5a9072161cf758221974f1f59b1a198b2c62b2317360cdb8b2516cfac8eecf40cd5e69bb186053555688a167cabae3a3227b9079c360d238b12c229ff2ddc1
SHA512
fbff2e960e20a5b4c1320bfe22aca445a5792c10f902c6eb69fc7de2a1f8965b06b0906141526a5f0fa02bcbb6b02d80865481bd62656f7b9a11fbdcf5bc9f02
DIST rustc-1.93.1-src.tar.xz.asc 801 BLAKE2B
9e059c894770a402d5fee2a29ffdb42030d8d723a40d6312d983e53cd4fa64e97019a0ea6054dcb17ba2ead7f27db17eec2632950f13e4ef1410324afc4dcaf8
SHA512
8a290300e370b3833d2d365a451ed4708dbe1fa69fc57b73eef0b2b5d9dd4fb3d87344315aee3aea474d4071cfb535234e167f6576abf2e06ef3225c85e3c30d
+DIST rustc-1.94.0-src.tar.xz 273916448 BLAKE2B
cab2e007c1a5401c653218ff0dd542d10c0d7a4fcc7bf2ee269cbbb9760bdd04c78276beddc2f6b1f4d47df96a11079087f109e248951c2a157be73ca2c3e8db
SHA512
8397fa68055827363bff5a1dd228a05e4c4ca5a179d072ecc1b330a874c183529cb9346ec9c531fb3f066b7b6094fc8711d7c341a49755af7b50d63bf0ecff2b
+DIST rustc-1.94.0-src.tar.xz.asc 801 BLAKE2B
d6ce44d51e59ecd22b953b391134ba470ec4ee1089031c34f7809199bd4eda3f54c5907a92f362cf5c0151d75b14360cd44d5a2556f785cbc1c3de5a0335573b
SHA512
0a5b067e0e137489f49c7e445992f7a456e884d39158e4d9b5b59af41c62e5dbfe8abeaa02af33ca072b663dbc649004bc83ff18899bf1bfaed0eb90aac5f67f
DIST rustc-1.94.0_beta20260126-src.tar.xz 273937952 BLAKE2B
14deb9a1a837283ae544c9e05a490d6d2b6fe924838505f22ee821713ada640ec6c11ddc5fdf11bb7925fd4bff0e1399975bbe5ef47c926aab4ed10976db60dc
SHA512
3e0517ebd37a9b459a92a432e9c6c7e276878bb8453007ce3b3c1ef53dbee8b436252d09cdfbe4482321076c9b4a0d49a3ab74b6ae845260ce4d4f47112d0b68
DIST rustc-1.94.0_beta20260126-src.tar.xz.asc 801 BLAKE2B
6b807dce7ca74cec7cefd7886aa569e0f5a908a9199149624f4d641d94e9daea4ea837a6dd96792efaebd6b21e70acd6654e78f01325e36f9108b0e0b3bc5c4e
SHA512
c425b9ff8eeb4973ce3b53eca5cc35f78983062195be9b671565fc48fc7fe2edf424d7618ccc98fec89c2ca8f7f43e176f06c624c1d1172b7033ea66cee6d575
DIST rustc-1.94.0_beta20260213-src.tar.xz 273898560 BLAKE2B
be0fa61b6677de16352628c9c5243bc75b6697c7511cf97d6a02bce8cb09f5fb7aeafeedce29837d3812f0fbee1f4cdc48dae27dc7d02878c06144b3941a8510
SHA512
d48a821ab4adf1a8e8d2b313a6d1c460b28aecf4fa0bd3af7f81318b49abffb71d87a5bc08335adc62b6d4a99c074969a98e6516f679d484ed74086982686457
diff --git a/dev-lang/rust-common/rust-common-1.94.0.ebuild
b/dev-lang/rust-common/rust-common-1.94.0.ebuild
new file mode 100644
index 000000000000..1037d635a091
--- /dev/null
+++ b/dev-lang/rust-common/rust-common-1.94.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2026 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 31984909e3f9..953dc1db1721 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -21,6 +21,7 @@ DIST rust-patches-1.91.0.tar.bz2 6041 BLAKE2B
7ebc846e0ae7b496b4ed89a8b0a5c39792
DIST rust-patches-1.92.0_p1.tar.bz2 5993 BLAKE2B
aa3183a46834b9442fd79fcda61a308b6b1831c9eab6c5a48c6fca7eef49267af815a3d53c0f17563483dbb58e4c4cb9ab09e4f00c32c37b5411d184e222079b
SHA512
c2ec50796e8037b1bb1074c516816c9edc815db503ccac0cde4884a7f190e186897cb91ecbad7e1bb7e34b6753d2ccbbc59e83c8efdff452c1ed446850347000
DIST rust-patches-1.93.0.tar.bz2 3175 BLAKE2B
4849208072cf0a047a9fe2ee27d384349b713149b7d087a6ff39a41ec1a7b77884710374dcac44c4378b320da0b4061fa531edd8b2b1cc04199fd51cdb1c2e78
SHA512
b818e14653a66447a221f84363cad54ee893842025c2b6c02c08df76bdf8666664564a5bc405ee988223048c2b986ea818d685babfddee5ff7559f9567bb9dbb
DIST rust-patches-1.93.1.tar.bz2 3186 BLAKE2B
6ff137eb2c1b43857922ac3d9b0cc3dbe71180c05d318c5b0f54c371117426ad8daa8ec19cffc19c2550564ac4b7cfd38f4c0fa42a5b8d2ae94fe668a94aa567
SHA512
ded2af5cc9516d8bbce675f323747a96fea814f2344065a45ca7968a21e31aaa5e0bf0a45f6f831a9d62047e782306d5319c6c3ed887e3ceb75011d1849a5303
+DIST rust-patches-1.94.0.tar.bz2 3165 BLAKE2B
07187fcc95458cf3323490a54d648209ae24c9c44522f5c0bf2b12ac469e86dd1145d70557c7c09a097019b262f557af162fc3687bfda10451e2e164a0f4ec78
SHA512
39f9288335c62b477465c44904e922f1ce8b62c840a9b6ce2d13dee670f6935cfbccc88faf314d5e766103ada969513badee251b6485e8abaeadca7b65cf9e23
DIST rust-patches-1.94.0_beta20260126.tar.bz2 3173 BLAKE2B
003a78d43575127fcadb423be6d231269753cb75cdc35eb063ff65293031bdfbd32ea91456f454aeeaae5e411aeacbddb388c6b08f079129482bef841277f497
SHA512
1fe20b04d7537d02fbe1d73e348d66543472c7938ee5eb18e283c2185a7e9253ddbf6600c4e56175744d62ba7f453b77624f3aa252bc2c9f07ce797c0bc0707d
DIST rust-patches-1.94.0_beta20260213.tar.bz2 3170 BLAKE2B
c71adad5a61fc0d90865c29193490ddf908885a2712f5b180917797bdc7b7dc3cd836b6410a32341a6c2512d937ad2ecbaecfdbd1a97cd32be527a2adabb680c
SHA512
d94c6cdb79c88df42708cd8800d5dab5d65491ba16b99e8c79d1c50321f685aeecf4513d8431e5643805f5e0cd7addc80fd14bb05ef1ba8a7b084e03c67a275f
DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B
e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3
SHA512
14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d
@@ -69,6 +70,8 @@ DIST rustc-1.93.0-src.tar.xz 270925104 BLAKE2B
f96a05dae3494452471f6797fdc2246cc
DIST rustc-1.93.0-src.tar.xz.asc 801 BLAKE2B
9c1762c0bb431da8fda0a8a47f5745998ff31434bb0b2747aa4aafc34e09c1507207eb91b7ba80f7a780b7f7258a4b8e49b5c5b06f9fa9f4cfabf72edb9cb07e
SHA512
a6ea05bb6b7d3b429a1c863622c93ac4c97b25f56027f7f06f085acde26d1395f3515cc764ae3ef941d1669556a02365755b34e28ccaebe70c1ccb84c977228f
DIST rustc-1.93.1-src.tar.xz 270888296 BLAKE2B
fe5a9072161cf758221974f1f59b1a198b2c62b2317360cdb8b2516cfac8eecf40cd5e69bb186053555688a167cabae3a3227b9079c360d238b12c229ff2ddc1
SHA512
fbff2e960e20a5b4c1320bfe22aca445a5792c10f902c6eb69fc7de2a1f8965b06b0906141526a5f0fa02bcbb6b02d80865481bd62656f7b9a11fbdcf5bc9f02
DIST rustc-1.93.1-src.tar.xz.asc 801 BLAKE2B
9e059c894770a402d5fee2a29ffdb42030d8d723a40d6312d983e53cd4fa64e97019a0ea6054dcb17ba2ead7f27db17eec2632950f13e4ef1410324afc4dcaf8
SHA512
8a290300e370b3833d2d365a451ed4708dbe1fa69fc57b73eef0b2b5d9dd4fb3d87344315aee3aea474d4071cfb535234e167f6576abf2e06ef3225c85e3c30d
+DIST rustc-1.94.0-src.tar.xz 273916448 BLAKE2B
cab2e007c1a5401c653218ff0dd542d10c0d7a4fcc7bf2ee269cbbb9760bdd04c78276beddc2f6b1f4d47df96a11079087f109e248951c2a157be73ca2c3e8db
SHA512
8397fa68055827363bff5a1dd228a05e4c4ca5a179d072ecc1b330a874c183529cb9346ec9c531fb3f066b7b6094fc8711d7c341a49755af7b50d63bf0ecff2b
+DIST rustc-1.94.0-src.tar.xz.asc 801 BLAKE2B
d6ce44d51e59ecd22b953b391134ba470ec4ee1089031c34f7809199bd4eda3f54c5907a92f362cf5c0151d75b14360cd44d5a2556f785cbc1c3de5a0335573b
SHA512
0a5b067e0e137489f49c7e445992f7a456e884d39158e4d9b5b59af41c62e5dbfe8abeaa02af33ca072b663dbc649004bc83ff18899bf1bfaed0eb90aac5f67f
DIST rustc-1.94.0_beta20260126-src.tar.xz 273937952 BLAKE2B
14deb9a1a837283ae544c9e05a490d6d2b6fe924838505f22ee821713ada640ec6c11ddc5fdf11bb7925fd4bff0e1399975bbe5ef47c926aab4ed10976db60dc
SHA512
3e0517ebd37a9b459a92a432e9c6c7e276878bb8453007ce3b3c1ef53dbee8b436252d09cdfbe4482321076c9b4a0d49a3ab74b6ae845260ce4d4f47112d0b68
DIST rustc-1.94.0_beta20260126-src.tar.xz.asc 801 BLAKE2B
6b807dce7ca74cec7cefd7886aa569e0f5a908a9199149624f4d641d94e9daea4ea837a6dd96792efaebd6b21e70acd6654e78f01325e36f9108b0e0b3bc5c4e
SHA512
c425b9ff8eeb4973ce3b53eca5cc35f78983062195be9b671565fc48fc7fe2edf424d7618ccc98fec89c2ca8f7f43e176f06c624c1d1172b7033ea66cee6d575
DIST rustc-1.94.0_beta20260213-src.tar.xz 273898560 BLAKE2B
be0fa61b6677de16352628c9c5243bc75b6697c7511cf97d6a02bce8cb09f5fb7aeafeedce29837d3812f0fbee1f4cdc48dae27dc7d02878c06144b3941a8510
SHA512
d48a821ab4adf1a8e8d2b313a6d1c460b28aecf4fa0bd3af7f81318b49abffb71d87a5bc08335adc62b6d4a99c074969a98e6516f679d484ed74086982686457
diff --git a/dev-lang/rust/rust-1.94.0.ebuild b/dev-lang/rust/rust-1.94.0.ebuild
new file mode 100644
index 000000000000..d0e4413c459b
--- /dev/null
+++ b/dev-lang/rust/rust-1.94.0.ebuild
@@ -0,0 +1,890 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Bump notes: https://wiki.gentoo.org/wiki/Project:Rust/Rust_bump
+
+LLVM_COMPAT=( 21 )
+PYTHON_COMPAT=( python3_{11..14} )
+
+# Patches are kept in rust-patches.git, see its README.rst for the versioning
+# scheme.
+#
+# We use _pN from the ebuild version for the patchset but it can be overridden
+# in the ebuild for changes that don't require a revbump.
+#
+# Uncomment this line when the ebuild needs a patchset update but no revbump.
+#RUST_PATCH_VER=${PV}-1
+
+RUST_MAX_VER=${PV%%_*}
+RUST_PV=${PV%%_p*}
+RUST_P=${PN}-${RUST_PV}
+[[ -z ${RUST_PATCH_VER} ]] && RUST_PATCH_VER=${PV}
+
+if [[ ${PV} == *9999* ]]; then
+ # Update this as new `beta` releases come out.
+ RUST_MIN_VER="1.93.0"
+elif [[ ${PV} == *beta* ]]; then
+ 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
+inherit multilib multilib-build python-any-r1 rust rust-toolchain
toolchain-funcs
+inherit 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-${RUST_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-${RUST_PV}-src.tar.xz.asc
+ )
+ "
+ S="${WORKDIR}/${MY_P}-src"
+else
+ MY_P="rustc-${RUST_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 )
+ALL_LLVM_TARGETS+=( LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV
)
+ALL_LLVM_TARGETS+=( 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.87.0/llvm/CMakeLists.txt
+_ALL_RUST_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k Xtensa )
+declare -A ALL_RUST_EXPERIMENTAL_TARGETS
+for _x in "${_ALL_RUST_EXPERIMENTAL_TARGETS[@]}"; do
+ ALL_RUST_EXPERIMENTAL_TARGETS["llvm_targets_${_x}"]=0
+done
+
+# Bare metal targets which can be built on the host system and have no
+# dependency on compiler runtime, libc and unwinder.
+ALL_RUST_SYSROOTS=( bpf wasm )
+ALL_RUST_SYSROOTS=( "${ALL_RUST_SYSROOTS[@]/#/rust_sysroots_}" )
+
+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"
+IUSE+=" +rustfmt rust-analyzer rust-src +system-llvm test"
+IUSE+=" ${ALL_LLVM_TARGETS[*]} ${ALL_RUST_SYSROOTS[*]}"
+
+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+=( " rust_sysroots_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
+ )
+ ) )
+ rust_sysroots_wasm? ( llvm-core/clang )
+ !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]
+ virtual/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[*]} )
+ rust_sysroots_bpf? ( llvm_targets_BPF )
+ rust_sysroots_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 rust_sysroots_bpf 256 0) + ${M} ))
+ M=$(( $(usex rust_sysroots_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-${RUST_PV}-src.tar.xz{,.asc}
+ default
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ # Commit patches to the appropriate branch in proj/rust-patches.git
+ # then cut a new tag / tarball. Don't add patches to ${FILESDIR}
+ 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 rust_sysroots_bpf; then
+ rust_targets+=",\"bpfeb-unknown-none\",\"bpfel-unknown-none\""
+ fi
+ if use rust_sysroots_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
+
+ # TODO: Add optimized-compiler-builtins for system-llvm to avoid
+ # building bundled compiler-rt.
+ 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"
+ description = "gentoo"
+ 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}"
+ 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 rust_sysroots_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 rust_sysroots_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 rust_sysroots_wasm; then
+ wasm_target="wasm32-unknown-unknown"
+ if tc-is-clang; then
+ local wasm_cc=$(tc-getCC)
+ local wasm_cxx=$(tc-getCXX)
+ else
+ local wasm_cc=${CHOST}-clang
+ local wasm_cxx=${CHOST}-clang++
+ fi
+ export CFLAGS_${wasm_target//-/_}="$(
+ CC="${wasm_cc} --target=wasm32-unknown-unknown"
+ filter-flags '-mcpu*' '-march*' '-mtune*'
+ strip-unsupported-flags
+ echo "${CFLAGS}"
+ )"
+ cat <<- _EOF_ >> "${S}"/bootstrap.toml
+ [target.wasm32-unknown-unknown]
+ cc = "${wasm_cc}"
+ cxx = "${wasm_cxx}"
+ 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
+ if [[ "${cross_rust_target}" == *-uefi ]]; then
+ # Profiler is not supported on bare-metal
+ cat <<- _EOF_ >> "${S}"/bootstrap.toml
+ profiler = false
+ _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/
+
+ # bash-completion files are installed by dev-lang/rust-common instead
+ # 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}-${RUST_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/${RUST_P}"
+
+ newenvd - "50${RUST_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-${RUST_P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${RUST_P}"
+ fi
+ if [[ ${SLOT} == *9999* ]] && use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${RUST_P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${RUST_P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${RUST_P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${RUST_P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/lib/rust/libexec >> "${T}/provider-${RUST_P}"
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${RUST_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}-${RUST_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 6ec676cdad6b..96a6cb847621 100644
--- a/sys-devel/rust-std/Manifest
+++ b/sys-devel/rust-std/Manifest
@@ -26,6 +26,8 @@ DIST rustc-1.93.0-src.tar.xz 270925104 BLAKE2B
f96a05dae3494452471f6797fdc2246cc
DIST rustc-1.93.0-src.tar.xz.asc 801 BLAKE2B
9c1762c0bb431da8fda0a8a47f5745998ff31434bb0b2747aa4aafc34e09c1507207eb91b7ba80f7a780b7f7258a4b8e49b5c5b06f9fa9f4cfabf72edb9cb07e
SHA512
a6ea05bb6b7d3b429a1c863622c93ac4c97b25f56027f7f06f085acde26d1395f3515cc764ae3ef941d1669556a02365755b34e28ccaebe70c1ccb84c977228f
DIST rustc-1.93.1-src.tar.xz 270888296 BLAKE2B
fe5a9072161cf758221974f1f59b1a198b2c62b2317360cdb8b2516cfac8eecf40cd5e69bb186053555688a167cabae3a3227b9079c360d238b12c229ff2ddc1
SHA512
fbff2e960e20a5b4c1320bfe22aca445a5792c10f902c6eb69fc7de2a1f8965b06b0906141526a5f0fa02bcbb6b02d80865481bd62656f7b9a11fbdcf5bc9f02
DIST rustc-1.93.1-src.tar.xz.asc 801 BLAKE2B
9e059c894770a402d5fee2a29ffdb42030d8d723a40d6312d983e53cd4fa64e97019a0ea6054dcb17ba2ead7f27db17eec2632950f13e4ef1410324afc4dcaf8
SHA512
8a290300e370b3833d2d365a451ed4708dbe1fa69fc57b73eef0b2b5d9dd4fb3d87344315aee3aea474d4071cfb535234e167f6576abf2e06ef3225c85e3c30d
+DIST rustc-1.94.0-src.tar.xz 273916448 BLAKE2B
cab2e007c1a5401c653218ff0dd542d10c0d7a4fcc7bf2ee269cbbb9760bdd04c78276beddc2f6b1f4d47df96a11079087f109e248951c2a157be73ca2c3e8db
SHA512
8397fa68055827363bff5a1dd228a05e4c4ca5a179d072ecc1b330a874c183529cb9346ec9c531fb3f066b7b6094fc8711d7c341a49755af7b50d63bf0ecff2b
+DIST rustc-1.94.0-src.tar.xz.asc 801 BLAKE2B
d6ce44d51e59ecd22b953b391134ba470ec4ee1089031c34f7809199bd4eda3f54c5907a92f362cf5c0151d75b14360cd44d5a2556f785cbc1c3de5a0335573b
SHA512
0a5b067e0e137489f49c7e445992f7a456e884d39158e4d9b5b59af41c62e5dbfe8abeaa02af33ca072b663dbc649004bc83ff18899bf1bfaed0eb90aac5f67f
DIST rustc-1.94.0_beta20260126-src.tar.xz 273937952 BLAKE2B
14deb9a1a837283ae544c9e05a490d6d2b6fe924838505f22ee821713ada640ec6c11ddc5fdf11bb7925fd4bff0e1399975bbe5ef47c926aab4ed10976db60dc
SHA512
3e0517ebd37a9b459a92a432e9c6c7e276878bb8453007ce3b3c1ef53dbee8b436252d09cdfbe4482321076c9b4a0d49a3ab74b6ae845260ce4d4f47112d0b68
DIST rustc-1.94.0_beta20260126-src.tar.xz.asc 801 BLAKE2B
6b807dce7ca74cec7cefd7886aa569e0f5a908a9199149624f4d641d94e9daea4ea837a6dd96792efaebd6b21e70acd6654e78f01325e36f9108b0e0b3bc5c4e
SHA512
c425b9ff8eeb4973ce3b53eca5cc35f78983062195be9b671565fc48fc7fe2edf424d7618ccc98fec89c2ca8f7f43e176f06c624c1d1172b7033ea66cee6d575
DIST rustc-1.94.0_beta20260213-src.tar.xz 273898560 BLAKE2B
be0fa61b6677de16352628c9c5243bc75b6697c7511cf97d6a02bce8cb09f5fb7aeafeedce29837d3812f0fbee1f4cdc48dae27dc7d02878c06144b3941a8510
SHA512
d48a821ab4adf1a8e8d2b313a6d1c460b28aecf4fa0bd3af7f81318b49abffb71d87a5bc08335adc62b6d4a99c074969a98e6516f679d484ed74086982686457
diff --git a/sys-devel/rust-std/rust-std-1.94.0.ebuild
b/sys-devel/rust-std/rust-std-1.94.0.ebuild
new file mode 100644
index 000000000000..6362b34400df
--- /dev/null
+++ b/sys-devel/rust-std/rust-std-1.94.0.ebuild
@@ -0,0 +1,180 @@
+# Copyright 2020-2026 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
+ local-rebuild = true
+ 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
+}