Servo 是一个用 Rust 编写的 Web 浏览器渲染引擎,支持 WebGL 和 WebGPU,适用于桌面、移动和嵌入式应用程序。目前,它支持64 位 macOS、64 位 Linux、64 位 Windows、64 位 OpenHarmony 和 Android。
Servo 欢迎所有人的贡献。请查看:
Servo 开发的协调方式:
有关更详细的构建说明,请参阅 Servo 手册中的 [设置环境]、[构建 Servo]、[Android 构建] 和 [OpenHarmony 构建]。
[设置环境]:https://book.servo.org/hacking/setting-up-your-environment.html
[构建 Servo]:https://book.servo.org/hacking/building-servo.html
[Android 构建]:https://book.servo.org/hacking/building-for-android.html
[OpenHarmony 构建]:https://book.servo.org/hacking/building-for-openharmony.html
brew
。uv
:curl -LsSf https://astral.sh/uv/install.sh | sh
rustup
:curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo
可用./mach bootstrap
./mach build
curl
:
sudo pacman -S --needed curl
sudo apt install curl
sudo dnf install curl
sudo emerge net-misc/curl
uv
:curl -LsSf https://astral.sh/uv/install.sh | sh
rustup
:curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo
可用./mach bootstrap
./mach build
uv
、choco
和 rustup
Microsoft.VisualStudio.Component.Windows{10, 11}SDK.{>=19041}
)Microsoft.VisualStudio.Component.VC.Tools.x86.x64
)Microsoft.VisualStudio.Component.VC.ATL
)Microsoft.VisualStudio.Component.VC.ATLMFC
)cargo
可用.\mach bootstrap
.\mach build
ANDROID_SDK_ROOT
ANDROID_NDK_ROOT
: $ANDROID_SDK_ROOT/ndk/26.2.11394342/
ANDROID_SDK_ROOT
可以是任意目录(例如 ~/android-sdk
)。$ANDROID_SDK_ROOT/cmdline-tools/latest
。sudo $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install \
"build-tools;34.0.0" \
"emulator" \
"ndk;26.2.11394342" \
"platform-tools" \
"platforms;android-33" \
"system-images;android-33;google_apis;x86_64"
HarmonyOS NEXT
和纯 OpenHarmony
),构建配置会略有不同。DEVECO_SDK_HOME
(针对 HarmonyOS NEXT
时必需)OHOS_BASE_SDK_HOME
(针对 OpenHarmony
时必需)OHOS_SDK_NATIVE
(例如 ${DEVECO_SDK_HOME}/default/openharmony/native
或 ${OHOS_BASE_SDK_HOME}/${API_VERSION}/native
)SERVO_OHOS_SIGNING_CONFIG
:包含演示应用有效签名配置的 json 文件的路径。--flavor=<default|harmonyos>
传递给 mach <build|package|install>
来修改目标发行版。