27 releases
Uses old Rust 2015
0.5.2 | Oct 29, 2024 |
---|---|
0.5.1 | Feb 9, 2024 |
0.5.0 | Dec 7, 2023 |
0.4.0 | Oct 11, 2023 |
0.1.6 | Mar 15, 2018 |
#54 in Build Utils
11,110 downloads per month
Used in 5 crates
14MB
310K
SLoC
mozangle
Mozilla's fork of Google ANGLE, repackaged as a Rust crate.
-
ANGLE is an implementation of OpenGL ES. Its official build system is
gn
, from Chromium's depot_tools. -
mozilla/angle on GitHub is a fork with some Gecko-specific patches.
-
gfx/angle
in mozilla-central is generated from that.update-angle.py
runsgn desc
to extract information from the official build system, copies relevant source files, and createsmoz.build
files for Gecko's build system. -
This repository imports a copy of the
gfx/angle
directory. Thegenerate_build_data.py
script turns data frommoz.build
files into a Rust source file. (This script supports just enough of themoz.build
format for this specific purpose.) Finally, a Cargo build script drives the C++ compilation with the cc crate based on that data.
Feature flags
By default, this crate only compiles the shader translator.
In Windows, the egl
Cargo feature enables the EGL and OpenGL ES implementations. Although upstream
ANGLE supports more platforms, this crate only configures the Direct3D 11 rendering backend.
[dependencies]
mozangle = { version = "0.5", features = ["egl"] }
Updating ANGLE
To update:
- Remove
gfx/angle
entirely - Copy a new version of it from mozilla-central
- Apply any patches present in the
patches
directory - Run
python3 generate_build_data.py
- In the commit message, include the mozilla-central commit hash