servo/docs/ORGANIZATION.md
Martin Robinson cd2ab36759
Rename gfx to fonts (#32556)
This crate only takes care of fonts now as graphics related things are
split into other crates. In addition, this exposes data structures at
the top of the crate, hiding the implementation details and making it
simpler to import them.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-06-19 20:26:19 +00:00

4.8 KiB
Raw Blame History

Servo's directory structure:

  • components
    • bluetooth
      • Implementation of the bluetooth thread.
    • bluetooth_traits
      • APIs to the bluetooth crate for crates that don't want to depend on the bluetooth crate for build speed reasons.
    • 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.
    • constellation
      • 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.
    • fonts
      • Code for dealing with fonts and text shaping.
    • fonts_traits
      • APIs to the fonts crate for crates that don't want to depend on the fonts crate for build speed reasons.
    • layout
      • Converts page content into positioned, styled boxes and passes the result to the renderer.
    • layout_thread
      • Runs the threads for layout, communicates with the script thread, and calls into the layout crate to do the layout.
    • 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_layout_interface
      • The API the script crate provides for the layout crate.
    • script_traits
      • APIs to the script crate for crates that don't want to depend on the script crate for build speed reasons.
    • selectors
      • CSS selector matching.
    • 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.
    • webgpu
      • Implementation of threads for the WebGPU API.
  • etc
    • Useful tools and scripts for developers.
  • mach
    • A command-line tool to help with developer tasks.
  • ports
    • winit
      • Embedding implementation for the winit windowing library.
  • python
    • servo
      • Implementations of servo-specific mach commands.
    • tidy
      • Python package of 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
    • 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 artifacts generated by ./mach build --release.
  • tests
    • dromaeo
      • Harness for automatically running the Dromaeo testsuite.
    • html
      • Manual tests and experiments.
    • jquery
      • Harness for automatically running the jQuery testsuite.
    • power
      • Tools for measurement of power consumption.
    • unit
      • Unit tests using rustcs built-in test harness.
    • wpt
      • W3C web-platform-tests and csswg-tests along with tools to run them and expected failures.

Major dependencies