How we got rust code into Firefox
2006: Rust language started by Graydon Hoare
2009: Mozilla begins sponsoring Rust project
2012: rustc self-hosting compiler
2015: rust 1.0 is released
2017: rust 1.21 is released
“… a folk definition of insanity is to do the same thing over and over again and to expect the results to be different. By this definition, we in fact require that programmers of multithreaded systems be insane. Were they sane, they could not understand their programs.”
2012: Research Team starts work on Servo
2016: 0.0.1 alpha version released
2017: Servo code lives in the Gecko tree
2017: Firefox Quantum!!!
#moreRust
int64_t GetChunkIdx() const
{
return mChunk ? mChunk->Index() : -1;
};
4294967295
WTF!?
int64_t GetChunkIdx() const
{
return mChunk ? static_cast<int64_t>(mChunk->Index()) : -1;
};
class CacheFileChunk {
[...]
uint32_t Index() const;
};
fn GetChunkIdx(&self) -> Option<i64>
{
if let Some(chunk) = self.mChunk {
Some(chunk.index() as i64)
} else {
None
}
};
Contribute to our projects:
Firefox - mentored bugs
Servo - E-Easy
Rust - E-Easy
Use and report bugs - bugzilla.mozilla.org