Skip to content

Rework project directory structure#369

Merged
mrobinson merged 1 commit into
servo:mainfrom
mrobinson:directory-structure
Jun 8, 2026
Merged

Rework project directory structure#369
mrobinson merged 1 commit into
servo:mainfrom
mrobinson:directory-structure

Conversation

@mrobinson

@mrobinson mrobinson commented Jun 8, 2026

Copy link
Copy Markdown
Member

This is a major simplification of the project directory structure. An
example of what was confusing before was that there were multiple
directories named generic and egl. Now modules are named more
specifically and the directory structure is flattened. The new
structure:

src/

  • angle/Windows ANGLE backend
  • cgl/macOS CGL backend
  • hardware_buffer/Android / OHOS hardware buffer backends
  • mesa_surfaceless/Mesa-specific pbuffer surface backend
  • multi/multi backend
  • wayland/Wayland backend
  • wgl/Windows WGL backend
  • x11/X11 backend
  • basea directory for code that can be shared by multiple backends
    • io_surfaceIOSurface shared code (could be used by future Metal backend)
    • eglshared EGL types

In addition, this commit removes the full file path included as a
comment at the top of every source file. These paths are now incorrect
and they were likely only there because the directory structure was so
confusing.

This is part of #327.

This is a major simplification of the project directory structure. An
example of what was confusing before was that there were multiple
directories named `generic` and `egl`. Now modules are named more
specifically and the directory structure is flattened. The new
structure:

`src/`
 - `angle/` <- Windows ANGLE backend
 - `cgl/` <- macOS CGL backend
 - `hardware_buffer/` <- Android / OHOS hardware buffer backends
 - `mesa_surfaceless/` <- Mesa-specific pbuffer surface backend
 - `multi/` <- multi backend
 - `wayland/` <- Wayland backend
 - `wgl/` <- Windows WGL backend
 - `x11/` <- X11 backend
 - `base` <- a directory for code that can be shared by multiple backends
   - `io_surface` <- IOSurface shared code (could be used by future Metal backend)
   - `egl` <- shared EGL types

In addition, this commit removes the full file path included as a
comment at the top of every source file. These paths are now incorrect
and they were likely only there because the directory structure was so
confusing.

Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
@mrobinson mrobinson force-pushed the directory-structure branch from 703fc03 to b527c80 Compare June 8, 2026 08:31
@jdm

jdm commented Jun 8, 2026

Copy link
Copy Markdown
Member

Good idea!

@mrobinson mrobinson added this pull request to the merge queue Jun 8, 2026
@@ -1,5 +1,3 @@
// surfman/surfman/src/platform/egl/mod.rs
//
//! Bindings to EGL on Android.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this comment needs to be updated. I guess this was misleading even before this change though.

Merged via the queue into servo:main with commit 9eaf3fc Jun 8, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants