Re: Rust as build requirement was Re: Proposal to a) rewrite Gecko's encoding converters and b) to do it in Rust

2015-12-13 Thread Cameron Kaiser

On 12/13/15 12:50 AM, Nicholas Nethercote wrote:

On Sun, Dec 13, 2015 at 9:17 AM, Cameron Kaiser  wrote:


This would essentially mandate, then, that Gecko can only be built on
platforms with a Rust toolchain. That may be desirable, but it would
probably bust some of the obscure Tier-3 platforms and it would definitely
bust TenFourFox (we can't even get clang to be happy on 10.4 currently). Not
that we haven't been on borrowed time for awhile; I just point it out for
the record.


I've been wondering about this. There's a big difference between (a)
permitting Rust components (while still allowing fallback C++
equivalents) and (b) mandating Rust components.

Step (a) is close at hand but I'm not aware of any planning or
predictions for when (b) will happen. The most detail I've seen was in
an exchange I had on Hackers News [1] where I said "it feels like
something that is multiple years away" and pcwalton replied "I agree
with you on the probable time frame here."

[1] https://news.ycombinator.com/item?id=10522194


On the other hand, in that same thread, metajack said, "The current plan 
is to have Rust (in the form of rust-url replacing nsUrlParser) riding 
the trains later this quarter."


My usual genial scepticism alleges "this quarter" is optimistic, but I 
can well see it occurring Q1/Q2 2016. I did some Bugzilla digging and 
while the current plan in bug 1151899 is to run them in parallel, I 
foresee that lasting at most a release or two. That said, there hasn't 
been any activity on it since April.


Cameron Kaiser
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Rust as build requirement was Re: Proposal to a) rewrite Gecko's encoding converters and b) to do it in Rust

2015-12-13 Thread Jack Moffitt
> On the other hand, in that same thread, metajack said, "The current plan is
> to have Rust (in the form of rust-url replacing nsUrlParser) riding the
> trains later this quarter."

And indeed, Rust is now riding the trains with the moov parser. It's
not required for the build yet, but Nightly (and soon Aurora)
dsitributions will both have it.

You can see this by looking at telemetry for MEDIA_RUST_MP4PARSER_SUCCESS.

jack.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Rust as build requirement was Re: Proposal to a) rewrite Gecko's encoding converters and b) to do it in Rust

2015-12-14 Thread Cameron Kaiser

Replying to a couple messages at once.

On 12/14/15 2:19 PM, Mike Hoye wrote:

On 2015-12-14 4:06 PM, Justin Dolske wrote:

On 12/14/15 2:51 AM, Ted Mielczarek wrote:


[...]Obviously this isn't something we like to see, but
we shouldn't let the support of non-Tier 1 platforms guide our decision
making to that extent. Enabling Rust components in Gecko is important
work, and outweighs the value of supporting Firefox on minority
platforms.


+1. We shouldn't be doing any work to maintain Tier-3 platforms, nor
should they hold us back from modernizing and securing the platforms
used by the overwhelming majority of our users.


While I agree with this, giving those tier-3 platform maintainers as
much advanced notice as possible and good-faith-if-low-touch guidance as
to how they can keep rolling would be a fine thing.


It would be nice, at least. Obviously I'm closer to this than other 
people on this thread, and maybe this reflects the paucity of platforms 
today compared with, say, 15 years ago, but the attitude towards tier-3 
has degenerated a little beyond benign neglect lately. I don't think 
Justin is wrong for his position, but implicit in saying they aren't 
worth any effort is also saying they aren't worth maintaining a good 
relationship with or serve a useful purpose. The roughly 25,000 people 
who regularly use TenFourFox, a stable number confirmed by update 
checkins and download stats, would probably disagree. That's a rounding 
error in the Firefox user stats but they're loyal all the same.


Candidly, I'd like to see a little more recognition of the work it takes 
to keep a minority port alive, even if that shouldn't necessarily 
translate into material assistance, and I don't see much of this from 
many Firefox developers lately. If for no other reason than portability 
and diversity, we do matter to the ecosystem. I'm just asking for mutual 
understanding, since the position of MoFo is glaringly clear to us and I 
think we'd all agree it's not unreasonable even if it is unfortunate.





I see a few names with no mailing addresses for a number of people on
the supported build configurations page, so I'm going to see if I can
find them and ask them to add their contact information.


I posted a heads-up to the OS/2 port maintainer, since I have some 
contacts there.


On 12/14/15 2:22 PM, Nathan Froyd wrote:
> On Sat, Dec 12, 2015 at 5:17 PM, Cameron Kaiser 
> wrote:
>
>> This would essentially mandate, then, that Gecko can only be built on
>> platforms with a Rust toolchain. That may be desirable, but it would
>> probably bust some of the obscure Tier-3 platforms and it would 
definitely

>> bust TenFourFox (we can't even get clang to be happy on 10.4 currently).
>> Not that we haven't been on borrowed time for awhile; I just point 
it out

>> for the record. 
>>
>
> FWIW, we'd also like to make Gecko require a C++11-compliant standard
> library, and that will also have roughly the same effect as requiring
> Rust.  I don't have exact dates on that happening, but I'd really like to
> see it happen in the first half of 2016.

I don't think these are really in the same category. All of the extant 
Tier-3 ports compile with gcc too, and keeping gcc up (assuming gcc 
itself doesn't obsolete the platform) should bring along a C++11 
libstdc++ along with it. I'm using gcc 4.8 now on OS X/ppc, and 
Tigerbrew even already has 5.2.


Rust, on the other hand:

On 12/14/15 5:55 AM, Henri Sivonen wrote:
> As for tier-3, a quick search indicates that rustc has already been
> bootstrapped on (x86ish?) FreeBSD and OpenBSD. Wikipedia says that
> LLVM supports MIPS, PowerPC, SPARC and Z/Architecture. It looks like
> Debian has dropped 68K. So it should be feasible for *BSD and
> non-mainstream CPU arch versions of Debian to come along. Maybe there
> is rustc porting work to be done, but I think people who want these
> platforms to be supported internalize the cost of supporting them
> instead of expecting Gecko to stop progressing because of them.

Independent of the policy decision, "rustc porting work" is not trivial, 
since none of these arches has an existing rustc (only x86 and ARM32), 
even on Linux, and none of the Tier-3 Rusts have cargo support.[1] I 
imagine this would require either a cross-compiling rust or building the 
stage0 from scratch.


[1] https://doc.rust-lang.org/book/installing-rust.html#tier-3

In any case,

> Firefox 45 will be ESR. I think it's reasonable to make Rust a Gecko
> build requirement after 45 and let tier-3 platforms use the ESR cycle
> to get rustc/LLVM up and running where it's not up and running
> already.

Let me be clear that I don't find this to be unreasonable and I would be 
willing to work within this timeframe, though I think we're going to 
have to fork anyway for other reasons. I'm still going to do some 
feasibility exploration, though.


That said, I kind of object to the fact that no one brought this up 
un

Re: Rust as build requirement was Re: Proposal to a) rewrite Gecko's encoding converters and b) to do it in Rust

2015-12-14 Thread Gregory Szorc
On Mon, Dec 14, 2015 at 6:58 PM, Cameron Kaiser 
wrote:

> Replying to a couple messages at once.
>
> On 12/14/15 2:19 PM, Mike Hoye wrote:
>
>> On 2015-12-14 4:06 PM, Justin Dolske wrote:
>>
>>> On 12/14/15 2:51 AM, Ted Mielczarek wrote:
>>>
>>> [...]Obviously this isn't something we like to see, but
 we shouldn't let the support of non-Tier 1 platforms guide our decision
 making to that extent. Enabling Rust components in Gecko is important
 work, and outweighs the value of supporting Firefox on minority
 platforms.

>>>
>>> +1. We shouldn't be doing any work to maintain Tier-3 platforms, nor
>>> should they hold us back from modernizing and securing the platforms
>>> used by the overwhelming majority of our users.
>>>
>>
>> While I agree with this, giving those tier-3 platform maintainers as
>> much advanced notice as possible and good-faith-if-low-touch guidance as
>> to how they can keep rolling would be a fine thing.
>>
>
> It would be nice, at least. Obviously I'm closer to this than other people
> on this thread, and maybe this reflects the paucity of platforms today
> compared with, say, 15 years ago, but the attitude towards tier-3 has
> degenerated a little beyond benign neglect lately. I don't think Justin is
> wrong for his position, but implicit in saying they aren't worth any effort
> is also saying they aren't worth maintaining a good relationship with or
> serve a useful purpose. The roughly 25,000 people who regularly use
> TenFourFox, a stable number confirmed by update checkins and download
> stats, would probably disagree. That's a rounding error in the Firefox user
> stats but they're loyal all the same.
>
> Candidly, I'd like to see a little more recognition of the work it takes
> to keep a minority port alive, even if that shouldn't necessarily translate
> into material assistance, and I don't see much of this from many Firefox
> developers lately. If for no other reason than portability and diversity,
> we do matter to the ecosystem. I'm just asking for mutual understanding,
> since the position of MoFo is glaringly clear to us and I think we'd all
> agree it's not unreasonable even if it is unfortunate.
>
> 
>
> I see a few names with no mailing addresses for a number of people on
>> the supported build configurations page, so I'm going to see if I can
>> find them and ask them to add their contact information.
>>
>
> I posted a heads-up to the OS/2 port maintainer, since I have some
> contacts there.
>
> On 12/14/15 2:22 PM, Nathan Froyd wrote:
> > On Sat, Dec 12, 2015 at 5:17 PM, Cameron Kaiser 
> > wrote:
> >
> >> This would essentially mandate, then, that Gecko can only be built on
> >> platforms with a Rust toolchain. That may be desirable, but it would
> >> probably bust some of the obscure Tier-3 platforms and it would
> definitely
> >> bust TenFourFox (we can't even get clang to be happy on 10.4 currently).
> >> Not that we haven't been on borrowed time for awhile; I just point it
> out
> >> for the record. 
> >>
> >
> > FWIW, we'd also like to make Gecko require a C++11-compliant standard
> > library, and that will also have roughly the same effect as requiring
> > Rust.  I don't have exact dates on that happening, but I'd really like to
> > see it happen in the first half of 2016.
>
> I don't think these are really in the same category. All of the extant
> Tier-3 ports compile with gcc too, and keeping gcc up (assuming gcc itself
> doesn't obsolete the platform) should bring along a C++11 libstdc++ along
> with it. I'm using gcc 4.8 now on OS X/ppc, and Tigerbrew even already has
> 5.2.
>
> Rust, on the other hand:
>
> On 12/14/15 5:55 AM, Henri Sivonen wrote:
> > As for tier-3, a quick search indicates that rustc has already been
> > bootstrapped on (x86ish?) FreeBSD and OpenBSD. Wikipedia says that
> > LLVM supports MIPS, PowerPC, SPARC and Z/Architecture. It looks like
> > Debian has dropped 68K. So it should be feasible for *BSD and
> > non-mainstream CPU arch versions of Debian to come along. Maybe there
> > is rustc porting work to be done, but I think people who want these
> > platforms to be supported internalize the cost of supporting them
> > instead of expecting Gecko to stop progressing because of them.
>
> Independent of the policy decision, "rustc porting work" is not trivial,
> since none of these arches has an existing rustc (only x86 and ARM32), even
> on Linux, and none of the Tier-3 Rusts have cargo support.[1] I imagine
> this would require either a cross-compiling rust or building the stage0
> from scratch.
>
> [1] https://doc.rust-lang.org/book/installing-rust.html#tier-3
>
> In any case,
>
> > Firefox 45 will be ESR. I think it's reasonable to make Rust a Gecko
> > build requirement after 45 and let tier-3 platforms use the ESR cycle
> > to get rustc/LLVM up and running where it's not up and running
> > already.
>
> Let me be clear that I don't find this to be unreasonable and I w

Re: Rust as build requirement was Re: Proposal to a) rewrite Gecko's encoding converters and b) to do it in Rust

2015-12-14 Thread Cameron Kaiser

On 12/14/15 7:36 PM, Gregory Szorc wrote:

On Mon, Dec 14, 2015 at 6:58 PM, Cameron Kaiser 
wrote:

That said, I kind of object to the fact that no one brought this up until
I noticed it in passing, and the work to get Rust up on a tier-3 platform
-- a language that currently has no relevance to those platforms other than
this purpose -- is certainly more than it is to keep the compiler
maintained, which I don't think is acknowledged. Everyone expects Servo to
demand Rust, but there wasn't really any warning about Gecko doing so.


There have been serious discussions about adding Rust components to Gecko
for well over a year. Basic Rust support has been in mozilla-central since
May (https://hg.mozilla.org/mozilla-central/rev/b811c7d4f39b) - about the
same time Rust 1.0 (stable) was released. By the time we ship a Rust
component in Firefox, Rust stable and basic build system support will be
over 1 year old. To say there hasn't been any warning about shipping Rust
in Gecko just isn't true.


That's not what I said. Even though I politely contest your assertion 
that it was well-noticed -- I even searched and found a grand total of 
*two* threads directly related to Rust in this newsgroup prior to this 
thread, and one was about Servo -- no one had said anything about Rust 
being *demanded* by Gecko, period. If those discussions happened 
somewhere else, then there should have been some acknowledgement here, 
since after all this newsgroup does ostensibly deal with the platform.


Even though I can't argue it's unreasonable to allege the presence of 
Rust code should imply that one day it might be obligatory, no one 
seemed to realise (or be interested) that making it obligatory could be 
a portbreaker, and that's the part that stinks.


Cameron Kaiser
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Rust as build requirement was Re: Proposal to a) rewrite Gecko's encoding converters and b) to do it in Rust

2015-12-14 Thread David Rajchenbach-Teller
Well, this wouldn't be the first time that we are not as clear
communicating our intents as we thought or should. Sorry about that.

Thanks for getting in touch with the OS/2 maintainer. We definitely need
to spread the word asap. I hope that Rust can be ported to OS/2 and
other Tier-3 platforms but there is no guarantee and that will
definitely take time and commitment. On the upside, Rust is a great
language, so any new port will be good news for the target platform.

Cheers,
 David

On 15/12/15 05:00, Cameron Kaiser wrote:
> That's not what I said. Even though I politely contest your assertion
> that it was well-noticed -- I even searched and found a grand total of
> *two* threads directly related to Rust in this newsgroup prior to this
> thread, and one was about Servo -- no one had said anything about Rust
> being *demanded* by Gecko, period. If those discussions happened
> somewhere else, then there should have been some acknowledgement here,
> since after all this newsgroup does ostensibly deal with the platform.
> 
> Even though I can't argue it's unreasonable to allege the presence of
> Rust code should imply that one day it might be obligatory, no one
> seemed to realise (or be interested) that making it obligatory could be
> a portbreaker, and that's the part that stinks.
> 
> Cameron Kaiser
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform