Folks who work on Gecko: How valuable would it be to rewrite editor/ in Rust? How hard? How modular is it? Servo needs one anyway so might be fun to hack on.
cc @kneecaw
7
11
I'm module owner of editor. I don't know if we can rewrite it with rust because I'm not familiar with Rust lang nor don't know how it accesses DOM objects.
1
However, if we can rewrite it with Rust, it's really nice since editor code always struggles with its lifetime since modifying DOM tree mae be interrupted by JS.
1
Anyway, we need to fully understand what editor does. There is no spec about detail of editting behavor. So, behavior of each browser is decided with testing other browser's behavior when different point is reported. This means that it's hell to rewriting editor...
1
5
I think Manish's point is that since Servo needs an editor module anyway, it can be incubated in Servo project, and if it's possible to integrate with Gecko, it can be easier to grow with a relatively mature test set (and user base).
1
1
Editor needs to grab DOM objects and itself when it modifies the DOM tree due to mutation observer issue. This is implemented with RefPtr in Gecko. So, if it's possible to do this with Rust, I guess it's possible to rewrite Gecko's editor with Rust.
1
1
RefPtr can be done. We don't mutate the DOM in stylo, but it would be possible to, in a limited fashion.
1
We've talked in the past about rewriting editor in JS, which may still make more sense than Rust.
Jan 7, 2018 · 8:11 PM UTC
2
1



