diff --git a/ORGANIZATION.md b/ORGANIZATION.md index b1169f2af3a8..7ff2edfaab12 100644 --- a/ORGANIZATION.md +++ b/ORGANIZATION.md @@ -1,67 +1,112 @@ -# Servo code organization +# Servo's directory structure: +* components + * canvas + * Implementation of painting threads for 2d and WebGL canvases. + * canvas_traits + * APIs to the canvas crate for crates that don't want to depend on the canvas crate for build speed reasons. + * compositing + * Integration with OS windowing/rendering and event loop, as well as management of resources for a top-level browsing context (ie. tab). + * devtools + * in-process server to allow manipulating browser instances via a remote Firefox developer tools client. + * devtools_traits + * APIs to the devtools crate for crates that don't want to depend on the devtools crate for build speed reasons. + * etc + * Useful tools and scripts for developers. + * gfx + * Draws the result of laying out a page, and sends the result to the compositor. + * gfx_traits + * APIs to the gfx crate for crates that don't want to depend on the gfx crate for build speed reasons. + * layout + * Converts page content into positioned, styled boxes and passes the result to the renderer. + * layout_traits + * APIs to the layout crate for crates that don't want to depend on the layout crate for build speed reasons. + * msg + * Shared APIs for communicating between specific threads and crates. + * net + * Network protocol implementations, and state and resource management (caching, cookies, etc.). + * net_traits + * APIs to the net crate for crates that don't want to depend on the net crate for build speed reasons. + * plugins + * Syntax extensions, custom attributes, and lints. + * profile + * Memory and time profilers. + * profile_traits + * APIs to the profile crate for crates that don't want to depend on the profile crate for build speed reasons. + * script + * Implementation of the DOM (native Rust code and bindings to SpiderMonkey). + * script_traits + * APIs to the script crate for crates that don't want to depend on the script crate for build speed reasons. + * servo + * Entry points for the servo application and libservo embedding library. + * style + * APIs for parsing CSS and interacting with stylesheets and styled elements. + * style_traits + * APIs to the style crate for crates that don't want to depend on the style crate for build speed reasons. + * util + * assorted utility methods and types that are commonly used throughout the project. + * webdriver_server + * In-process server to allow manipulating browser instances via a WebDriver client. + * webdriver_traits + * APIs to the webdriver crate for crates that don't want to depend on the webdriver crate for build speed reasons. +* mach + * A command-line tool to help with developer tasks. +* ports + * cef + * Embedding implementation for the Chrome Embedding Framework (CEF) API. + * glutin + * Embedding implementation for the `glutin` windowing library. + * gonk + * Embedding implementation for the Firefox OS devices. +* python + * servo + * Implementations of servo-specific mach commands. + * mach + * Implementation of `mach` command-line tool. + * tidy.py + * Code lints that are automatically run before merging changes. +* resources + * Files used at run time. Need to be included somehow when distributing binary builds. +* support + * android + * Libraries that require special handling for building for Android platforms + * android-rs-glue + * Library to integrate better with Android platforms + * rust-task_info + * Library for obtaining information about memory usage for a process +* target + * debug + * Build artifacts generated by `./mach build --debug`. + * doc + * Documentation is generated here by the `rustdoc` tool when running `./mach doc` + * release + * Build artifcats generated by `./mach build --release`. +* tests + * dromaeo + * Harness for automatically running the Dromaeo testsuite. + * heartbeats + * Tools for periodic measurement of energy consumption. + * html + * Manual tests and experiments. + * jquery + * Harness for automatically running the jQuery testsuite. + * power + * Tools for measurement of power consumption. + * ref, reftest.rs + * Legacy reftest harness and reference tests. In the process of being removed (). + * unit + * Unit tests using rustc’s built-in test harness. + * wpt + * W3C web-platform-tests and csswg-tests along with tools to run them and expected failures. -## Servo components - -* [`components/servo`][components/servo]: Servo main program. -* [`components/servo/main.rs`][components/servo/main.rs]: Servo's entry point. -* [`components/servo/lib.rs`][components/servo/lib.rs]: libservo entry point. -* [`components/canvas`][components/canvas]: HTML canvas graphics operations. -* [`components/compositing`][components/compositing]: The compositor and windowing systems. -* [`components/devtools`][components/devtools]: Server for remote Firefox developer tools. -* [`components/gfx`][components/gfx]: Graphics rendering, fonts, and text shaping. -* [`components/layout`][components/layout]: The layout system. -* [`components/msg`][components/msg]: Message structure definitions for inter-task communication. -* [`components/net`][components/net]: Networking, caching, image decoding. -* [`components/plugins`][components/plugins]: Various compiler plugins and macros used by the rest of Servo. -* [`components/script`][components/script]: The JavaScript and DOM systems. -* [`components/style`][components/style]: The CSS styling system. -* [`components/util`][components/util]: Various utility functions used by other Servo components. -* `components/*_traits`: Trait definitions to break crate dependencies. - -## Supporting libraries - -These libraries are either internal but used by Servo or external and need -special integration: - -* [`support/android`][support/android]: Android-specific infrastructure. -* [`support/android-rs-glue`][support/android-rs-glue]: Android apk builder. -* [`support/rust-task_info`][support/rust-task_info]: A binding to the task_info library on OS X. - -## Tests - -* [`tests/reftest.rs`][tests/reftest.rs]: Reference (layout) test runner. -* [`tests/ref`][tests/ref]: Reference tests. -* [`tests/html`][tests/html]: Manual test cases and examples. -* [`tests/power`][tests/power]: Tests for measuring power usage. -* [`tests/heartbeats`][tests/heartbeats]: Tests for profiler-level timing and energy behavior. -* [`tests/wpt`][tests/wpt]: Web platform tests and harness. - -## Miscellaneous - -* [`etc`][etc]: Various scripts and files that don't belong anywhere else. -* [`etc/patches`][etc/patches]: Patches for upstream libraries. - -[components/servo]: https://github.com/servo/servo/tree/master/components/servo -[components/servo/main.rs]: https://github.com/servo/servo/tree/master/components/servo/main.rs -[components/servo/lib.rs]: https://github.com/servo/servo/tree/master/components/servo/lib.rs -[components/canvas]: https://github.com/servo/servo/tree/master/components/canvas -[components/compositing]: https://github.com/servo/servo/tree/master/components/compositing -[components/devtools]: https://github.com/servo/servo/tree/master/components/devtools -[components/gfx]: https://github.com/servo/servo/tree/master/components/gfx -[components/layout]: https://github.com/servo/servo/tree/master/components/layout -[components/msg]: https://github.com/servo/servo/tree/master/components/msg -[components/net]: https://github.com/servo/servo/tree/master/components/net -[components/plugins]: https://github.com/servo/servo/tree/master/components/plugins -[components/script]: https://github.com/servo/servo/tree/master/components/script -[components/style]: https://github.com/servo/servo/tree/master/components/style -[components/util]: https://github.com/servo/servo/tree/master/components/util -[support/android]: https://github.com/servo/servo/tree/master/support/android -[support/android-rs-glue]: https://github.com/tomaka/android-rs-glue -[support/rust-task_info]: https://github.com/servo/servo/tree/master/support/rust-task_info -[tests/reftest.rs]: https://github.com/servo/servo/tree/master/tests/reftest.rs -[tests/ref]: https://github.com/servo/servo/tree/master/tests/ref -[tests/html]: https://github.com/servo/servo/tree/master/tests/html -[tests/power]: https://github.com/servo/servo/tree/master/tests/power -[tests/wpt]: https://github.com/servo/servo/tree/master/tests/wpt -[etc]: https://github.com/servo/servo/tree/master/etc -[etc/patches]: https://github.com/servo/servo/tree/master/etc/patches +# Major dependencies +* , : bindings to SpiderMonkey +* : an HTTP implementation +* : an HTML5 parser +* : an IPC implementation +* : image decoders +* : cross-platform windowing and input +* : bindings to Moz2D/Azure (cross-platform 2D rendering library) +* : a CSS parser +* : a CSS selector matching library +* : a WebSocket protocol implementation +* : an implementation of the URL specification