class: center, middle ###Contributing to #Servo ### 2016/8/27, TW Code Sprint ### Shing Lyu ??? top, middle, bottom left, center, right --- name: toc ###Agenda 1. What is Servo 1. Workflow 1. Build & Test 1. Code Organization 1. More Documentations 1. Project Ideas ??? This is a template --- ###what is Servo * A new browser engine * Written in Rust * Focus on performance, parallelism, and security --- ### Workflow  --- ### Claim a bug * [Servo Starters](https://starters.servo.org/) * Leave a comment in the issue * Ask questions in the issue or IRC --- ### Building & Testing * `./mach build -d`: debug build * `./mach build -r`: release build, required for running tests * `./mach build -d -j8`: 8 thread * `./mach test-*` * `./mach run -[d|r]` * `-w`: enable webrender * `-b`: enable browser.html * `./mach run -d --debug --debugger=gdb` --- ### Before Pull Request * `./mach build -d` * `./mach test-tidy` * Other tests * `./mach test-wpt`: DOM * `./mach test-css`: style, layout * `./mach test-unit` * Title examples: * Fixed something to resolve this problem * Added something to provide some benefit --- ### After PR created * `highfive` bot will assign reviewer for you (Ask for `r?someone`) * Reviewer will ask you to fix something * `git push` to your branch * Reviewer will `r+` (i.e. accept your patch) * When ready, run `git rebase -i` to squash, then `git push -f` * bors-servo will auto-test and merge your commit. --- ### Code Organization ```bash . ├── components # code! ├── tests # tests ├── python # mach tool and other ├── target # build output │ ├── debug │ └── release ├── docs # documentation │ # You probably won't touch ├── etc ├── ports ├── resources └── support ``` --- ### Source code ```bash components ├── servo # The main function ├── constellation # Where all the threads communicate ├── net # Network ├── script # DOM/JavaScript ├── style # CSS Rules ├── script_layout_interface ├── layout # Layout algorithms ├── layout_thread # The thread that runs the layout process ├── gfx # The graphics stack, font, etc. ├── compositing ├── msg ├── canvas ├── plugins ├── range ├── profile # Profiling ├── devtools # Developer Tools ├── webdriver_server # WebDriver for test automation ├── util └── *_traits ``` --- ### Infra & Tests ```bash . ├── python │ ├── mach │ ├── servo # Mach commands │ ├── tidy │ └── _virtualenv └── tests ├── unit ├── wpt │ ├── metadata # Test expectations │ ├── web-platform-tests │ ├── metadata-css # Test expectation for css tests │ ├── css-tests │ └── mozilla # Servo-specific ├── dromaeo # JS Benchmark ├── compiletest ├── heartbeats ├── html ├── jquery └── power ``` --- ### Other Repos * In [https://github.com/servo](https://github.com/servo) * `servo/webrender`: WebRender * `servo/saltfs`: CI stuff * `servo/servo.org`: The website * Various `rust-*` repos --- ### Documentations * Wiki: [https://github.com/servo/servo/wiki](https://github.com/servo/servo/wiki) * In-tree doc: [`docs/`](https://github.com/servo/servo/tree/master/docthub.com/servo/servo/tree/master/docss) * Code comments
* Trace code online: https://dxr.mozilla.org/servo/source/ --- ### Project Ideas * [`Taiwan Code Sprint` milestones](https://github.com/servo/servo/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Taiwan+Code+Sprint%22) * Flow Tree Dump: [#12675](https://github.com/servo/servo/issues/12675) - Refactor to serde - Debug the trigger point - Reuse the viewer * Profiler * Compatiable with Gecko * `./mach test-perf`: [#12792](https://github.com/servo/servo/issues/12792) - More followups [#13008](https://github.com/servo/servo/issues/13008) * Flexbox: [#12453](https://github.com/servo/servo/issues/12453#issuecomment-239611493a) --- ### Let's say Hi on the IRC * `#servo` on irc.mozilla.org * http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23servo --- class: center, middle # Backup --- ### Full file tree ``` . ├── components │ ├── canvas │ ├── canvas_traits │ ├── compositing │ ├── constellation │ ├── devtools │ ├── devtools_traits │ ├── gfx │ ├── gfx_traits │ ├── layout │ ├── layout_thread │ ├── layout_traits │ ├── msg │ ├── net │ ├── net_traits │ ├── plugins │ ├── profile │ ├── profile_traits │ ├── range │ ├── script │ ├── script_layout_interface │ ├── script_traits │ ├── servo │ ├── style │ ├── style_traits │ ├── util │ └── webdriver_server ├── docs │ └── components ├── etc │ ├── ci │ └── doc.servo.org ├── ports │ ├── cef │ ├── geckolib │ └── glutin ├── python │ ├── mach │ ├── servo │ ├── tidy │ ├── tidy_self_test │ └── _virtualenv ├── resources │ ├── ahem │ ├── shaders │ └── user-agent-js ├── support │ ├── android │ ├── rust-task_info │ └── windows ├── target │ ├── debug │ ├── geckolib │ └── release └── tests ├── compiletest ├── dromaeo ├── heartbeats ├── html ├── jquery ├── power ├── unit └── wpt ```