On 27/02/17 19:47, Simon Sapin wrote:
On 27/02/17 19:30, Henri Sivonen wrote:
On Mon, Feb 27, 2017 at 8:00 PM, Bobby Holley <bobbyhol...@gmail.com> wrote:
FWIW, |cargo tree| is a very helpful tool to figure out who's pulling in a
crate.
Thanks, but what I'm trying to figure out isn't whose pulling it in
(the style crate is) but whether it is actually used beyond an
always-None Option<EncodingRef> in a way that would result in the data
tables actually getting included in the build as oppose to (hopefully)
getting discarded by LTO.
(Motivation: If we are taking on the data tables, I want to argue that
we should include encoding_rs instead even before the "replace uconv
with encoding_rs" step is done.)
As an aside, I have a plan to remove rust-encoding entirely from Servo
(including Stylo) and use encoding_rs instead. But doing this the way I
want to has a number of prerequisites, and I’d prefer to switch
everything at once to avoid having both in the build. At the moment I’m
prioritizing other Stylo-related work, but I’m confident it’ll happen
before we start shipping Stylo.
Henri, you’re correct that the parts of the style crate using
rust-encoding are never used in Stylo. Gecko always passes UTF-8 input
(after decoding on the C++ side I assume) to Stylo for parsing
stylesheets, which we unsafely view as &str with
std::str::from_utf8_unchecked.
I’ve submitted https://github.com/servo/servo/pull/15993 to remove the
rust-encoding dependency from stylo. This doesn’t need to wait on
switching the rest of Servo.
--
Simon Sapin
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform