Hello, I’m Peter Hrvola, on IRC and Github retep007. During this summer I will be working on a GSOC project with Josh Matthews. My goal is to investigate and propose ideas for separation of script crate inside Servo.
If you have any ideas that you think would be useful during this project feel free to contact me. Current ideas involve: - Single trait with associated types for every WebIDL interface, and every generic method gets parameterized over the trait and uses T::Interface rather than Interface. - Make each FooMethods trait parametric, rather than each method inside FooMethods. Something like: trait DOMTypes { type Foo: FooMethods<Self>; ... } trait FooMethods<DOM: DOMTypes> { fn bar(x: DOM::Bar) -> DOM::Baz; ... } struct DOM; impl DOMTypes for DOM { type Foo = Foo; ... } struct Foo { ... } impl FooMethods<DOM> for Foo { … } - Create a new crate script_binding which uses `script_traits`. Traits for all `dom::*` struct would be added to `script_traits`. Script crate will implement `script_traits` Thanks, Peter Hrvola _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo