From 9774211ff324207a568681417b02b3252089b2ce Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Wed, 2 Oct 2019 01:20:35 +0000 Subject: [PATCH] Bug 1373878 - part 3 - add stylo_tests as a RustTest; r=rillian The easy part of this patch is the addition of the RustTest itself. The more difficult to understand part of the patch is the changes to all of our Rust build configuration. We do this due to a bug in cargo: https://github.com/rust-lang/cargo/issues/3923 where features on dependent crates are not correctly taken into account when determining whether cached artifacts on disk are valid and whether they should be evicted from the disk cache. The practical upshot of this behavior is that, say, running gtests during normal development when files in libxul are modified will: * rebuild some Rust dependencies for libxul; * link libxul; * rebuild those same Rust dependencies *again* for libxul-gtest, since we have different features active and therefore the old artifacts look to be out of date; * link libxul-gtest. Needless to say, this is highly annoying and counterproductive behavior. The "fix" is to ensure that the gkrust-shared crate explicitly depends on crates and assigns features to them such that the feature sets do not change between normal builds and testing builds. This is admittedly fragile, but it is not the first time this has come up, and is probably not the last. UltraBlame original commit: 7d0cf5897a623819500a45b042cce3732c8ad86d --- toolkit/library/gtest/rust/Cargo.lock | 415 ++++++++++--- toolkit/library/rust/Cargo.lock | 817 +++++++++++++++++++++---- toolkit/library/rust/Cargo.toml | 30 + toolkit/library/rust/moz.build | 32 + toolkit/library/rust/shared/Cargo.toml | 55 ++ toolkit/library/rust/shared/lib.rs | 8 + 6 files changed, 1137 insertions(+), 220 deletions(-) diff --git a/toolkit/library/gtest/rust/Cargo.lock b/toolkit/library/gtest/rust/Cargo.lock index fd8e266b636c1..e984058533174 100644 --- a/toolkit/library/gtest/rust/Cargo.lock +++ b/toolkit/library/gtest/rust/Cargo.lock @@ -70,7 +70,7 @@ version . 6 . -2 +3 " source = @@ -252,7 +252,7 @@ traits . 1 . -37 +39 ( registry + @@ -283,7 +283,7 @@ serialize . 3 . -22 +24 ( registry + @@ -848,7 +848,7 @@ log . 3 . -6 +8 ( registry + @@ -1077,7 +1077,7 @@ log . 3 . -6 +8 ( registry + @@ -1246,7 +1246,7 @@ log . 3 . -6 +8 ( registry + @@ -1443,7 +1443,7 @@ if . 1 . -0 +1 ( registry + @@ -1671,7 +1671,7 @@ gcc . 3 . -42 +51 ( registry + @@ -1852,7 +1852,7 @@ traits . 1 . -37 +39 ( registry + @@ -2016,7 +2016,7 @@ if . 1 . -0 +1 ( registry + @@ -2074,9 +2074,9 @@ index clap 2 . -24 +25 . -2 +0 ( registry + @@ -2105,7 +2105,7 @@ env_logger . 4 . -1 +3 ( registry + @@ -2163,7 +2163,7 @@ log . 3 . -6 +8 ( registry + @@ -2279,7 +2279,7 @@ regex . 2 . -1 +2 ( registry + @@ -2782,7 +2782,7 @@ version . 1 . -0 +1 " source = @@ -2986,9 +2986,9 @@ version " 2 . -24 +25 . -2 +0 " source = @@ -3078,9 +3078,9 @@ index bitflags 0 . -8 +9 . -2 +1 ( registry + @@ -3162,6 +3162,35 @@ index ) " " +textwrap +0 +. +6 +. +0 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" unicode - segmentation @@ -5765,7 +5794,7 @@ if . 1 . -0 +1 ( registry + @@ -5835,7 +5864,7 @@ version . 4 . -1 +3 " source = @@ -5869,7 +5898,7 @@ log . 3 . -6 +8 ( registry + @@ -5898,7 +5927,7 @@ regex . 2 . -1 +2 ( registry + @@ -6079,7 +6108,7 @@ log . 3 . -6 +8 ( registry + @@ -6110,7 +6139,7 @@ traits . 1 . -37 +39 ( registry + @@ -6645,7 +6674,7 @@ log . 3 . -6 +8 ( registry + @@ -6686,7 +6715,7 @@ version . 3 . -42 +51 " source = @@ -6905,7 +6934,7 @@ env_logger . 4 . -1 +3 ( registry + @@ -6971,7 +7000,7 @@ log . 3 . -6 +8 ( registry + @@ -7229,6 +7258,35 @@ geckoservo 1 " " +log +0 +. +3 +. +8 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" mp4parse_capi 0 . @@ -7261,6 +7319,35 @@ rust_url_capi 1 " " +syn +0 +. +11 +. +11 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" u2fhid 0 . @@ -7357,7 +7444,7 @@ log . 3 . -6 +8 ( registry + @@ -8826,7 +8913,7 @@ version . 3 . -6 +8 " source = @@ -9647,7 +9734,7 @@ log . 3 . -6 +8 ( registry + @@ -10155,7 +10242,7 @@ traits . 1 . -37 +39 ( registry + @@ -10267,7 +10354,7 @@ traits . 1 . -37 +39 ( registry + @@ -10363,7 +10450,7 @@ if . 1 . -0 +1 ( registry + @@ -10847,7 +10934,7 @@ traits . 1 . -37 +39 ( registry + @@ -10890,7 +10977,7 @@ version . 1 . -37 +39 " source = @@ -10930,9 +11017,9 @@ version " 1 . -2 +6 . -1 +0 " source = @@ -11087,7 +11174,7 @@ traits . 1 . -37 +39 ( registry + @@ -11324,7 +11411,7 @@ thread id 3 . -0 +1 . 0 ( @@ -12188,7 +12275,7 @@ log . 3 . -6 +8 ( registry + @@ -12219,7 +12306,7 @@ traits . 1 . -37 +39 ( registry + @@ -13074,9 +13161,9 @@ index num_cpus 1 . -2 +6 . -1 +0 ( registry + @@ -13188,7 +13275,7 @@ version . 2 . -1 +2 " source = @@ -13224,7 +13311,7 @@ corasick . 6 . -2 +3 ( registry + @@ -13284,7 +13371,7 @@ syntax . 4 . -0 +1 ( registry + @@ -13387,7 +13474,7 @@ version . 4 . -0 +1 " source = @@ -13614,7 +13701,7 @@ version . 3 . -22 +24 " source = @@ -13904,7 +13991,7 @@ log . 3 . -6 +8 ( registry + @@ -15111,7 +15198,7 @@ if . 1 . -0 +1 ( registry + @@ -15361,7 +15448,7 @@ log . 3 . -6 +8 ( registry + @@ -15484,7 +15571,7 @@ traits . 1 . -37 +39 ( registry + @@ -15511,9 +15598,9 @@ index num_cpus 1 . -2 +6 . -1 +0 ( registry + @@ -15720,7 +15807,7 @@ regex . 2 . -1 +2 ( registry + @@ -16787,7 +16874,7 @@ serialize . 3 . -22 +24 ( registry + @@ -16953,7 +17040,7 @@ serialize . 3 . -22 +24 ( registry + @@ -17057,7 +17144,7 @@ log . 3 . -6 +8 ( registry + @@ -17088,7 +17175,7 @@ serialize . 3 . -22 +24 ( registry + @@ -17450,6 +17537,112 @@ package name = " +textwrap +" +version += +" +0 +. +6 +. +0 +" +source += +" +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +" +dependencies += +[ +" +term_size +0 +. +3 +. +0 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" +unicode +- +width +0 +. +1 +. +4 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +] +[ +[ +package +] +] +name += +" thread - id @@ -17459,7 +17652,7 @@ version " 3 . -0 +1 . 0 " @@ -17601,7 +17794,7 @@ thread id 3 . -0 +1 . 0 ( @@ -17994,7 +18187,7 @@ env_logger . 4 . -1 +3 ( registry + @@ -18081,7 +18274,7 @@ log . 3 . -6 +8 ( registry + @@ -19362,7 +19555,7 @@ log . 3 . -6 +8 ( registry + @@ -19393,7 +19586,7 @@ traits . 1 . -37 +39 ( registry + @@ -20414,7 +20607,7 @@ corasick . 6 . -2 +3 ( registry + @@ -20439,7 +20632,7 @@ index " = " -0638fd549427caa90c499814196d1b9e3725eb4d15d7339d6de073a680ed0ca2 +500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699 " " checksum @@ -21102,7 +21295,7 @@ if . 1 . -0 +1 ( registry + @@ -21127,7 +21320,7 @@ index " = " -de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c +d0c47d456a36ebf0536a6705c83c1cbbcb9255fbc1d905a6ded104f479268a29 " " checksum @@ -21170,9 +21363,9 @@ checksum clap 2 . -24 +25 . -2 +0 ( registry + @@ -21197,7 +21390,7 @@ index " = " -6b8f69e518f967224e628896b54e41ff6acfb4dcfefc5076325c36525dac900f +867a885995b4184be051b70a592d4d70e32d7a188db6e8dff626af286a962771 " " checksum @@ -21838,7 +22031,7 @@ env_logger . 4 . -1 +3 ( registry + @@ -21863,7 +22056,7 @@ index " = " -ed39959122ea027670b704fb70539f4286ddf4a49eefede23bf0b4b2a069ec03 +3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b " " checksum @@ -22148,7 +22341,7 @@ gcc . 3 . -42 +51 ( registry + @@ -22173,7 +22366,7 @@ index " = " -291055c78f59ca3d84c99026c9501c469413d386bb46be1e1cf1d285cd1db3b0 +120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a " " checksum @@ -22800,7 +22993,7 @@ log . 3 . -6 +8 ( registry + @@ -22825,7 +23018,7 @@ index " = " -ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054 +880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b " " checksum @@ -23180,7 +23373,7 @@ traits . 1 . -37 +39 ( registry + @@ -23205,16 +23398,16 @@ index " = " -e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99 +1708c0628602a98b52fad936cf3edb9a107af06e52e49fdf0707e884456a6af6 " " checksum num_cpus 1 . -2 +6 . -1 +0 ( registry + @@ -23239,7 +23432,7 @@ index " = " -a225d1e2717567599c24f88e49f00856c6e825a12125181ee42c4257e3688d39 +83df569ffd47dbf87f36bead512632f89e90882b8e7a14286d0471daf6b72de9 " " checksum @@ -24044,7 +24237,7 @@ regex . 2 . -1 +2 ( registry + @@ -24069,7 +24262,7 @@ index " = " -4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01 +1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b " " checksum @@ -24080,7 +24273,7 @@ syntax . 4 . -0 +1 ( registry + @@ -24105,7 +24298,7 @@ index " = " -2f9191b1f57603095f105d317e375d19b1c9c5c3185ea9633a99a6dcbed04457 +ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db " " checksum @@ -24186,7 +24379,7 @@ serialize . 3 . -22 +24 ( registry + @@ -24211,7 +24404,7 @@ index " = " -237546c689f20bb44980270c73c3b9edd0891c1be49cc1274406134a66d3957b +dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda " " checksum @@ -25001,12 +25194,46 @@ e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209 " " checksum +textwrap +0 +. +6 +. +0 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" += +" +f86300c3e7416ee233abd7cda890c492007a3980f941f79185c753a701257167 +" +" +checksum thread - id 3 . -0 +1 . 0 ( @@ -25033,7 +25260,7 @@ index " = " -4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a +8df7875b676fddfadffd96deea3b1124e5ede707d4884248931077518cf1f773 " " checksum diff --git a/toolkit/library/rust/Cargo.lock b/toolkit/library/rust/Cargo.lock index 0b87aa26041b5..610fe24ec1ea5 100644 --- a/toolkit/library/rust/Cargo.lock +++ b/toolkit/library/rust/Cargo.lock @@ -28,6 +28,14 @@ shared . 0 " +" +stylo_tests +0 +. +0 +. +1 +" ] [ [ @@ -48,7 +56,7 @@ version . 6 . -2 +3 " source = @@ -230,7 +238,7 @@ traits . 1 . -37 +39 ( registry + @@ -261,7 +269,7 @@ serialize . 3 . -22 +24 ( registry + @@ -826,7 +834,7 @@ log . 3 . -6 +8 ( registry + @@ -1055,7 +1063,7 @@ log . 3 . -6 +8 ( registry + @@ -1224,7 +1232,7 @@ log . 3 . -6 +8 ( registry + @@ -1421,7 +1429,7 @@ if . 1 . -0 +1 ( registry + @@ -1649,7 +1657,7 @@ gcc . 3 . -42 +51 ( registry + @@ -1830,7 +1838,7 @@ traits . 1 . -37 +39 ( registry + @@ -1994,7 +2002,7 @@ if . 1 . -0 +1 ( registry + @@ -2052,9 +2060,9 @@ index clap 2 . -24 +25 . -2 +0 ( registry + @@ -2083,7 +2091,7 @@ env_logger . 4 . -1 +3 ( registry + @@ -2141,7 +2149,7 @@ log . 3 . -6 +8 ( registry + @@ -2257,7 +2265,7 @@ regex . 2 . -1 +2 ( registry + @@ -2760,7 +2768,7 @@ version . 1 . -0 +1 " source = @@ -2964,9 +2972,9 @@ version " 2 . -24 +25 . -2 +0 " source = @@ -3056,9 +3064,9 @@ index bitflags 0 . -8 +9 . -2 +1 ( registry + @@ -3140,6 +3148,35 @@ index ) " " +textwrap +0 +. +6 +. +0 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" unicode - segmentation @@ -5743,7 +5780,7 @@ if . 1 . -0 +1 ( registry + @@ -5813,7 +5850,7 @@ version . 4 . -1 +3 " source = @@ -5847,7 +5884,7 @@ log . 3 . -6 +8 ( registry + @@ -5876,7 +5913,7 @@ regex . 2 . -1 +2 ( registry + @@ -6057,7 +6094,7 @@ log . 3 . -6 +8 ( registry + @@ -6088,7 +6125,7 @@ traits . 1 . -37 +39 ( registry + @@ -6623,7 +6660,7 @@ log . 3 . -6 +8 ( registry + @@ -6664,7 +6701,7 @@ version . 3 . -42 +51 " source = @@ -6883,7 +6920,7 @@ env_logger . 4 . -1 +3 ( registry + @@ -6949,7 +6986,7 @@ log . 3 . -6 +8 ( registry + @@ -7207,6 +7244,35 @@ geckoservo 1 " " +log +0 +. +3 +. +8 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" mp4parse_capi 0 . @@ -7239,6 +7305,35 @@ rust_url_capi 1 " " +syn +0 +. +11 +. +11 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" u2fhid 0 . @@ -7335,7 +7430,7 @@ log . 3 . -6 +8 ( registry + @@ -8804,7 +8899,7 @@ version . 3 . -6 +8 " source = @@ -9625,7 +9720,7 @@ log . 3 . -6 +8 ( registry + @@ -10133,7 +10228,7 @@ traits . 1 . -37 +39 ( registry + @@ -10224,7 +10319,7 @@ traits . 1 . -37 +39 ( registry + @@ -10320,7 +10415,7 @@ if . 1 . -0 +1 ( registry + @@ -10771,7 +10866,7 @@ traits . 1 . -37 +39 ( registry + @@ -10814,7 +10909,7 @@ version . 1 . -37 +39 " source = @@ -10854,9 +10949,9 @@ version " 1 . -2 +6 . -1 +0 " source = @@ -11011,7 +11106,7 @@ traits . 1 . -37 +39 ( registry + @@ -11248,7 +11343,7 @@ thread id 3 . -0 +1 . 0 ( @@ -12112,7 +12207,7 @@ log . 3 . -6 +8 ( registry + @@ -12143,7 +12238,7 @@ traits . 1 . -37 +39 ( registry + @@ -12998,9 +13093,9 @@ index num_cpus 1 . -2 +6 . -1 +0 ( registry + @@ -13112,7 +13207,7 @@ version . 2 . -1 +2 " source = @@ -13148,7 +13243,7 @@ corasick . 6 . -2 +3 ( registry + @@ -13208,7 +13303,7 @@ syntax . 4 . -0 +1 ( registry + @@ -13311,7 +13406,7 @@ version . 4 . -0 +1 " source = @@ -13538,7 +13633,7 @@ version . 3 . -22 +24 " source = @@ -13828,7 +13923,7 @@ log . 3 . -6 +8 ( registry + @@ -14629,6 +14724,25 @@ package name = " +size_of_test +" +version += +" +0 +. +0 +. +1 +" +[ +[ +package +] +] +name += +" slab " version @@ -15035,7 +15149,7 @@ if . 1 . -0 +1 ( registry + @@ -15285,7 +15399,7 @@ log . 3 . -6 +8 ( registry + @@ -15408,7 +15522,7 @@ traits . 1 . -37 +39 ( registry + @@ -15435,9 +15549,9 @@ index num_cpus 1 . -2 +6 . -1 +0 ( registry + @@ -15644,7 +15758,7 @@ regex . 2 . -1 +2 ( registry + @@ -16217,20 +16331,28 @@ package name = " -syn +stylo_tests " version = " 0 . -11 +0 . -11 +1 " -source +dependencies = +[ " +atomic_refcell +0 +. +1 +. +0 +( registry + https @@ -16250,17 +16372,15 @@ crates io - index +) " -dependencies -= -[ " -quote +cssparser 0 . -3 +21 . -15 +3 ( registry + @@ -16284,12 +16404,12 @@ index ) " " -synom +env_logger 0 . -11 +4 . -2 +3 ( registry + @@ -16313,14 +16433,12 @@ index ) " " -unicode -- -xid +euclid 0 . -0 +15 . -4 +2 ( registry + @@ -16343,23 +16461,330 @@ io index ) " -] -[ -[ -package -] -] -name -= -" -synom -" -version -= " +geckoservo 0 . -11 +0 +. +1 +" +" +hashglobe +0 +. +1 +. +0 +" +" +libc +0 +. +2 +. +24 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" +log +0 +. +3 +. +8 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" +malloc_size_of +0 +. +0 +. +1 +" +" +regex +0 +. +2 +. +2 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" +selectors +0 +. +19 +. +0 +" +" +size_of_test +0 +. +0 +. +1 +" +" +smallvec +0 +. +4 +. +3 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" +style +0 +. +0 +. +1 +" +" +style_traits +0 +. +0 +. +1 +" +] +[ +[ +package +] +] +name += +" +syn +" +version += +" +0 +. +11 +. +11 +" +source += +" +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +" +dependencies += +[ +" +quote +0 +. +3 +. +15 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" +synom +0 +. +11 +. +2 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" +unicode +- +xid +0 +. +0 +. +4 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +] +[ +[ +package +] +] +name += +" +synom +" +version += +" +0 +. +11 . 2 " @@ -16711,7 +17136,7 @@ serialize . 3 . -22 +24 ( registry + @@ -16877,7 +17302,7 @@ serialize . 3 . -22 +24 ( registry + @@ -16981,7 +17406,7 @@ log . 3 . -6 +8 ( registry + @@ -17012,7 +17437,7 @@ serialize . 3 . -22 +24 ( registry + @@ -17374,6 +17799,112 @@ package name = " +textwrap +" +version += +" +0 +. +6 +. +0 +" +source += +" +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +" +dependencies += +[ +" +term_size +0 +. +3 +. +0 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +" +unicode +- +width +0 +. +1 +. +4 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" +] +[ +[ +package +] +] +name += +" thread - id @@ -17383,7 +17914,7 @@ version " 3 . -0 +1 . 0 " @@ -17525,7 +18056,7 @@ thread id 3 . -0 +1 . 0 ( @@ -17918,7 +18449,7 @@ env_logger . 4 . -1 +3 ( registry + @@ -18005,7 +18536,7 @@ log . 3 . -6 +8 ( registry + @@ -19286,7 +19817,7 @@ log . 3 . -6 +8 ( registry + @@ -19317,7 +19848,7 @@ traits . 1 . -37 +39 ( registry + @@ -20338,7 +20869,7 @@ corasick . 6 . -2 +3 ( registry + @@ -20363,7 +20894,7 @@ index " = " -0638fd549427caa90c499814196d1b9e3725eb4d15d7339d6de073a680ed0ca2 +500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699 " " checksum @@ -21026,7 +21557,7 @@ if . 1 . -0 +1 ( registry + @@ -21051,7 +21582,7 @@ index " = " -de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c +d0c47d456a36ebf0536a6705c83c1cbbcb9255fbc1d905a6ded104f479268a29 " " checksum @@ -21094,9 +21625,9 @@ checksum clap 2 . -24 +25 . -2 +0 ( registry + @@ -21121,7 +21652,7 @@ index " = " -6b8f69e518f967224e628896b54e41ff6acfb4dcfefc5076325c36525dac900f +867a885995b4184be051b70a592d4d70e32d7a188db6e8dff626af286a962771 " " checksum @@ -21762,7 +22293,7 @@ env_logger . 4 . -1 +3 ( registry + @@ -21787,7 +22318,7 @@ index " = " -ed39959122ea027670b704fb70539f4286ddf4a49eefede23bf0b4b2a069ec03 +3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b " " checksum @@ -22072,7 +22603,7 @@ gcc . 3 . -42 +51 ( registry + @@ -22097,7 +22628,7 @@ index " = " -291055c78f59ca3d84c99026c9501c469413d386bb46be1e1cf1d285cd1db3b0 +120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a " " checksum @@ -22724,7 +23255,7 @@ log . 3 . -6 +8 ( registry + @@ -22749,7 +23280,7 @@ index " = " -ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054 +880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b " " checksum @@ -23104,7 +23635,7 @@ traits . 1 . -37 +39 ( registry + @@ -23129,16 +23660,16 @@ index " = " -e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99 +1708c0628602a98b52fad936cf3edb9a107af06e52e49fdf0707e884456a6af6 " " checksum num_cpus 1 . -2 +6 . -1 +0 ( registry + @@ -23163,7 +23694,7 @@ index " = " -a225d1e2717567599c24f88e49f00856c6e825a12125181ee42c4257e3688d39 +83df569ffd47dbf87f36bead512632f89e90882b8e7a14286d0471daf6b72de9 " " checksum @@ -23968,7 +24499,7 @@ regex . 2 . -1 +2 ( registry + @@ -23993,7 +24524,7 @@ index " = " -4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01 +1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b " " checksum @@ -24004,7 +24535,7 @@ syntax . 4 . -0 +1 ( registry + @@ -24029,7 +24560,7 @@ index " = " -2f9191b1f57603095f105d317e375d19b1c9c5c3185ea9633a99a6dcbed04457 +ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db " " checksum @@ -24110,7 +24641,7 @@ serialize . 3 . -22 +24 ( registry + @@ -24135,7 +24666,7 @@ index " = " -237546c689f20bb44980270c73c3b9edd0891c1be49cc1274406134a66d3957b +dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda " " checksum @@ -24925,12 +25456,46 @@ e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209 " " checksum +textwrap +0 +. +6 +. +0 +( +registry ++ +https +: +/ +/ +github +. +com +/ +rust +- +lang +/ +crates +. +io +- +index +) +" += +" +f86300c3e7416ee233abd7cda890c492007a3980f941f79185c753a701257167 +" +" +checksum thread - id 3 . -0 +1 . 0 ( @@ -24957,7 +25522,7 @@ index " = " -4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a +8df7875b676fddfadffd96deea3b1124e5ede707d4884248931077518cf1f773 " " checksum diff --git a/toolkit/library/rust/Cargo.toml b/toolkit/library/rust/Cargo.toml index 03d862f7041f7..9ebfb78cd048c 100644 --- a/toolkit/library/rust/Cargo.toml +++ b/toolkit/library/rust/Cargo.toml @@ -172,6 +172,36 @@ shared " } [ +dev +- +dependencies +] +stylo_tests += +{ +path += +" +. +. +/ +. +. +/ +. +. +/ +servo +/ +tests +/ +unit +/ +stylo +/ +" +} +[ lib ] path diff --git a/toolkit/library/rust/moz.build b/toolkit/library/rust/moz.build index 3c0feed76f06c..3ee0a1964725a 100644 --- a/toolkit/library/rust/moz.build +++ b/toolkit/library/rust/moz.build @@ -114,3 +114,35 @@ gkrust_features . ' ) +# +Target +directory +doesn +' +t +matter +a +lot +here +since +we +can +' +t +share +panic += +abort +# +compilation +artifacts +with +gkrust +. +RustTest +( +' +stylo_tests +' +gkrust_features +) diff --git a/toolkit/library/rust/shared/Cargo.toml b/toolkit/library/rust/shared/Cargo.toml index 78117273e68bf..d82824d85c3ad 100644 --- a/toolkit/library/rust/shared/Cargo.toml +++ b/toolkit/library/rust/shared/Cargo.toml @@ -472,6 +472,61 @@ hid rs " } +# +We +have +these +to +enforce +common +feature +sets +for +said +crates +. +log += +{ +version += +" +0 +. +3 +" +features += +[ +" +release_max_level_info +" +] +} +syn += +{ +version += +" +0 +. +11 +" +features += +[ +" +full +" +" +visit +" +" +parsing +" +] +} [ features ] diff --git a/toolkit/library/rust/shared/lib.rs b/toolkit/library/rust/shared/lib.rs index 687869688a793..5a4f3fa7d30d5 100644 --- a/toolkit/library/rust/shared/lib.rs +++ b/toolkit/library/rust/shared/lib.rs @@ -163,6 +163,14 @@ extern crate u2fhid ; +extern +crate +log +; +extern +crate +syn +; use std :