servoshell: Rename executable to servoshell. (#42958)

This should help clarify the difference between servo the library /
engine and servoshell the browser (demo).

Other changes: 

- Removed etc/servo.sb ( [apple sandbox profile
format](https://angelica.gitbook.io/hacktricks/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-sandbox#sandbox-profiles))
since it is not needed anymore. See [this
comment](https://github.com/servo/servo/pull/42958#discussion_r2876253489)
for more details.

Testing: This is a very invasive change, and there are bound to be
scripts / places I have overlooked. Searching for usages of `servo` is
very hard, since it's also the name of the library.
Try run: https://github.com/servo/servo/actions/runs/22637676818

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Jonathan Schwender
2026-03-07 09:08:38 +01:00
committed by GitHub
parent 229d89042f
commit 1632e61ed6
24 changed files with 46 additions and 78 deletions

View File

@@ -224,7 +224,7 @@ jobs:
profile: ${{ inputs.profile }}
wpt-sync-from-upstream: ${{ inputs.wpt-sync-from-upstream }}
number-of-wpt-chunks: ${{ inputs. number-of-wpt-chunks }}
binary-path: servo/servo
binary-path: servo/servoshell
secrets: inherit
bencher:
@@ -235,7 +235,7 @@ jobs:
target: "linux"
profile: ${{ inputs.profile }}
compressed-file-path: ${{ inputs.profile }}-binary-linux/servo-tech-demo.tar.gz
binary-path: servo/servo
binary-path: servo/servoshell
file-size: true
# We only evaluate speedometer and dromaeo score in release
speedometer: ${{ inputs.profile == 'release' }}

View File

@@ -187,7 +187,7 @@ jobs:
run: |
echo "artifact_ids=${{ steps.upload-dmg.outputs.artifact-id }}" >> $GITHUB_OUTPUT
- name: Build package for target
run: gtar -czf target.tar.gz target/${{ inputs.profile }}/servo target/${{ inputs.profile }}/lib/*.dylib resources
run: gtar -czf target.tar.gz target/${{ inputs.profile }}/servoshell target/${{ inputs.profile }}/lib/*.dylib resources
- name: Upload package for target
uses: actions/upload-artifact@v6
with:
@@ -213,7 +213,7 @@ jobs:
target: 'macos-arm64'
profile: ${{ inputs.profile }}
compressed-file-path: ${{ inputs.profile }}-binary-macos-arm64/target.tar.gz
binary-path: target/${{ inputs.profile }}/servo
binary-path: target/${{ inputs.profile }}/servoshell
file-size: true
speedometer: false
dromaeo: false

View File

@@ -195,7 +195,7 @@ jobs:
run: |
echo "artifact_ids=${{ steps.upload-dmg.outputs.artifact-id }}" >> $GITHUB_OUTPUT
- name: Build package for target
run: gtar -czf target.tar.gz target/${{ inputs.profile }}/servo target/${{ inputs.profile }}/lib/*.dylib resources
run: gtar -czf target.tar.gz target/${{ inputs.profile }}/servoshell target/${{ inputs.profile }}/lib/*.dylib resources
- name: Upload package for target
uses: actions/upload-artifact@v6
with:
@@ -221,7 +221,7 @@ jobs:
target: 'macos'
profile: ${{ inputs.profile }}
compressed-file-path: ${{ inputs.profile }}-binary-macos/target.tar.gz
binary-path: target/${{ inputs.profile }}/servo
binary-path: target/${{ inputs.profile }}/servoshell
file-size: true
speedometer: false
dromaeo: false

View File

@@ -197,14 +197,14 @@ jobs:
run: .\mach package --profile ${{ inputs.profile }}
# These files are available
# MSI Installer: C:\a\servo\servo\target\${{ inputs.profile }}\msi\Installer.msi
# Bundle: C:\a\servo\servo\target\${{ inputs.profile }}\msi\Servo.exe
# Bundle: C:\a\servo\servo\target\${{ inputs.profile }}\msi\servoshell.exe
# Zip: C:\a\servo\servo\target\${{ inputs.profile }}\msi\Servo.zip
- name: Upload artifact for mach package
uses: actions/upload-artifact@v6
id: upload-exe
with:
name: ${{ inputs.profile }}-binary-windows
path: C:\\a\\servo\\servo\\target\\${{ inputs.profile }}\\msi\\Servo.exe
path: C:\\a\\servo\\servo\\target\\${{ inputs.profile }}\\msi\\servoshell.exe
- name: Upload artifact for mach package (zip)
uses: actions/upload-artifact@v6
id: upload-zip
@@ -230,7 +230,7 @@ jobs:
target: 'windows'
profile: ${{ inputs.profile }}
compressed-file-path: ''
binary-path: ${{ inputs.profile }}-binary-windows/Servo.exe
binary-path: ${{ inputs.profile }}-binary-windows/servoshell.exe
file-size: true
speedometer: false
dromaeo: false

View File

@@ -82,7 +82,7 @@ def start_servo(webdriver_port: int, servo_path: str) -> webdriver.Remote | None
def kill_servo():
subprocess.Popen(["killall", "servo"])
subprocess.Popen(["killall", "servoshell"])
REGEX_RESULTS_LOG_ELEMENT = re.compile(

View File

@@ -19,7 +19,7 @@ ls -l
# Load a page that closes immediately after loading.
c='data:text/html,<script>onload=()=>{console.log("success");close()}</script>'
./servo --headless ${c} | tee /tmp/out
./servoshell --headless ${c} | tee /tmp/out
grep 'success' /tmp/out
# Clean up.

View File

@@ -70,7 +70,7 @@ def run_servo_test(testcase, url, date, timeout, is_async):
ua_script_path = "{}/user-agent-js".format(os.getcwd())
command = [
"../../../target/release/servo",
"../../../target/release/servoshell",
url,
"--userscripts=" + ua_script_path,
"--headless",

View File

@@ -1,32 +0,0 @@
(version 1)
(deny default)
(allow file*
(literal "/dev/dtracehelper")
(literal "/dev/urandom")
(literal "/dev/null"))
(allow file-read*
(subpath ""))
(allow file-write*
(regex #"^/Users/[^/]+/Library/Autosave Information")
(subpath "/private/var"))
; This is unfortunate...
(allow process-exec
(regex #"/servo$"))
(deny file-write*
(regex #"/servo$"))
(allow sysctl-read)
(allow sysctl-write)
(allow ipc-posix-shm)
(allow process-fork)
(allow mach-lookup)
(allow network-outbound)
(debug deny)

View File

@@ -14,7 +14,7 @@ path = "lib.rs"
bench = false
[[bin]]
name = "servo"
name = "servoshell"
path = "main.rs"
bench = false
@@ -33,10 +33,10 @@ cc = "1.2"
winresource = "0.1"
[package.metadata.winresource]
FileDescription = "Servo"
FileDescription = "ServoShell"
LegalCopyright = "© The Servo Project Developers"
OriginalFilename = "servo.exe"
ProductName = "Servo"
OriginalFilename = "servoshell.exe"
ProductName = "ServoShell"
[features]
default = ["gamepad", "libservo/clipboard", "js_jit", "max_log_level", "webgpu", "webxr"]

View File

@@ -52,7 +52,7 @@ fn main() -> Result<(), Box<dyn Error>> {
{
let mut res = winresource::WindowsResource::new();
res.set_icon("../../resources/servo.ico");
res.set_manifest_file("platform/windows/servo.exe.manifest");
res.set_manifest_file("platform/windows/servoshell.exe.manifest");
res.compile().unwrap();
}
#[cfg(not(windows))]

View File

@@ -3,17 +3,17 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>servo</string>
<string>servoshell</string>
<key>CFBundleGetInfoString</key>
<string>Servo</string>
<string>ServoShell</string>
<key>CFBundleIconFile</key>
<string>servo.icns</string>
<key>CFBundleIdentifier</key>
<string>org.servo.Servo</string>
<string>org.servo.ServoShell</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Servo</string>
<string>ServoShell</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>

View File

@@ -37,7 +37,7 @@ pub fn deinit(clean_shutdown: bool) {
#[unsafe(link_section = "__TEXT,__info_plist")]
#[unsafe(no_mangle)]
pub static INFO_PLIST: [u8; 904] = *include_bytes!("Info.plist");
pub static INFO_PLIST: [u8; 924] = *include_bytes!("Info.plist");
#[link(name = "count_threads")]
unsafe extern "C" {

View File

@@ -3,7 +3,7 @@
manifestVersion="1.0"
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity type="win32"
name="servo.Servo"
name="servo.ServoShell"
version="0.0.6.0"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">

View File

@@ -366,7 +366,7 @@ fn map_debug_options(arg: String) -> Vec<String> {
}
#[derive(Bpaf, Clone, Debug)]
#[bpaf(options, version(VERSION), usage("servo [OPTIONS] URL"))]
#[bpaf(options, version(VERSION), usage("servoshell [OPTIONS] URL"))]
// Newlines in comments are intentional to have the right formatting for the help message.
struct CmdArgs {
/// Background Hang Monitor enabled.

View File

@@ -230,7 +230,7 @@ class PackageCommands(CommandBase):
shutil.copy2(binary_path, content_dir)
print("Packaging GStreamer...")
dmg_binary = path.join(content_dir, "servo")
dmg_binary = path.join(content_dir, "servoshell")
servo.gstreamer.package_gstreamer_dylibs(dmg_binary, lib_dir, self.target)
print("Adding version to Credits.rtf")
@@ -343,7 +343,7 @@ class PackageCommands(CommandBase):
except subprocess.CalledProcessError as e:
print("WiX light exited with return value %d" % e.returncode)
return e.returncode
print("Packaged Servo into " + path.join(dir_to_msi, "Servo.exe"))
print("Packaged Servo into " + path.join(dir_to_msi, "servoshell.exe"))
print("Creating ZIP")
zip_path = path.join(dir_to_msi, "Servo.zip")
@@ -463,7 +463,7 @@ class PackageCommands(CommandBase):
print("\r ➤ Bumping version number...")
replacements = {
"ports/servoshell/Cargo.toml": r'^version ?= ?"(?P<version>.*?)"',
"ports/servoshell/platform/windows/servo.exe.manifest": r'assemblyIdentity[^\/>]+version="(?P<version>.*?).0\"[^\/>]*\/>',
"ports/servoshell/platform/windows/servoshell.exe.manifest": r'assemblyIdentity[^\/>]+version="(?P<version>.*?).0\"[^\/>]*\/>',
"support/windows/Servo.wxs.mako": r'<Product(.|\n)*Version="(?P<version>.*?)".*>',
"ports/servoshell/platform/macos/Info.plist": r"<key>CFBundleShortVersionString</key>\n\s*<string>(?P<version>.*?)</string>",
"support/android/apk/servoapp/build.gradle.kts": r'versionName\s*=\s*"(?P<version>.*?)"',

View File

@@ -68,7 +68,7 @@ class BuildTarget(object):
return self.target_triple
def binary_name(self) -> str:
return f"servo{servo.platform.get().executable_suffix()}"
return f"servoshell{servo.platform.get().executable_suffix()}"
def configure_build_environment(self, env: dict[str, str], config: dict[str, Any], topdir: pathlib.Path) -> None:
pass

View File

@@ -1,9 +1,9 @@
# The first line here should be the "servo" argument (without quotes) and the
# The first line here should be the "servoshell" argument (without quotes) and the
# last should be the URL to load.
# Blank lines and those beginning with a '#' are ignored.
# Each line should be a separate parameter as would be parsed by the shell.
# For example, "servo -p 10 http://en.wikipedia.org/wiki/Rust" would take 4
# lines (the "-p" and "10" are separate even though they are related).
servo
servoshell
http://en.wikipedia.org/wiki/Rust

View File

@@ -17,7 +17,7 @@ Name=Servo
GenericName=Web Browser
Comment=Browse the Web
# TODO: Replace SERVO_SRC_PATH with the path to the Servo sources
Exec=SERVO_SRC_PATH/target/release/servo %u
Exec=SERVO_SRC_PATH/target/release/servoshell %u
Icon=servo
Terminal=false
Type=Application
@@ -27,7 +27,7 @@ Categories=Network;WebBrowser;
Keywords=web;browser;internet;
Actions=new-window;
# Todo: Tell existing servoshell process to open a new window
[Desktop Action new-window]
Name=Open a New Window
# TODO: Replace SERVO_SRC_PATH with the path to the Servo sources
Exec=SERVO_SRC_PATH/target/release/servo %u
Exec=SERVO_SRC_PATH/target/release/servoshell %u

View File

@@ -28,15 +28,15 @@
Guid="95bcea71-78bb-4ec8-9766-44bc01443840"
Win64="yes">
<File Id="ServoEXE"
Name="servo.exe"
Name="servoshell.exe"
DiskId="1"
Source="${windowize(exe_path)}\servo.exe"
Source="${windowize(exe_path)}\servoshell.exe"
KeyPath="yes">
<Shortcut Id="StartMenuServoTechDemo"
Directory="ProgramMenuDir"
Name="Servo Tech Demo"
WorkingDirectory="INSTALLDIR"
Icon="servo.exe"
Icon="servoshell.exe"
Advertise="yes"/>
</File>
${include_dependencies()}
@@ -69,7 +69,7 @@
<ComponentRef Id="ProgramMenuDir"/>
</Feature>
<Icon Id="servo.exe" SourceFile="${windowize(exe_path)}\servo.exe"/>
<Icon Id="servoshell.exe" SourceFile="${windowize(exe_path)}\servoshell.exe"/>
</Product>
</Wix>
<%!
@@ -92,7 +92,7 @@ def listdirs(directory):
if path.isdir(path.join(directory, f))]
def listdeps(temp_dir):
return [path.join(temp_dir, f) for f in os.listdir(temp_dir) if os.path.isfile(path.join(temp_dir, f)) and f != "servo.exe"]
return [path.join(temp_dir, f) for f in os.listdir(temp_dir) if os.path.isfile(path.join(temp_dir, f)) and f != "servoshell.exe"]
def windowize(p):
if not p.startswith("/"):

View File

@@ -42,7 +42,7 @@ def PowerCollector(OutputDir, Benchmarks, LayoutThreads, Renderer):
power_dir, "power-Layout%d-set%d.csv" % (layoutT, ExpNum))
TimeFiles = path.join(
time_dir, "time-Layout%d-set%d.csv" % (layoutT, ExpNum))
ServoCmd = "(time ../../target/release/servo -x -y %d %s %s) 2> %s" % \
ServoCmd = "(time ../../target/release/servoshell -x -y %d %s %s) 2> %s" % \
(layoutT, Renderer, Benchmarks, TimeFiles)
Metrics = path.join(
etc_dir, "metrics-Layout%d-set%d-css.csv" % (layoutT, ExpNum))

View File

@@ -548736,7 +548736,7 @@
[]
],
"browser.py": [
"4265ad06f9b02022da199a79e4879c3c079f648d",
"582697e3b23477f691a61b441b154630e78d3d2e",
[]
],
"commands.json": [
@@ -548780,7 +548780,7 @@
[]
],
"run.py": [
"7bc9572ad73c9f46a2768b2e49d5ae9c9fe47a1a",
"4f4ba56738b24d4472f7cd217eee3567607b13f6",
[]
],
"testfiles.py": [
@@ -549056,7 +549056,7 @@
[]
],
"servo_legacy.py": [
"47b3b504f58750d681ce7a5e04598e30e093d06d",
"801f29e088c6f8ff596023c1c7d0678e45f16321",
[]
],
"webkit.py": [

View File

@@ -2315,7 +2315,7 @@ class Servo(Browser):
resp = self._get(channel)
decompress(resp.raw, dest=dest)
path = which("servo", path=os.path.join(dest, "servo"))
path = which("servoshell", path=os.path.join(dest, "servo"))
st = os.stat(path)
os.chmod(path, st.st_mode | stat.S_IEXEC)
return path

View File

@@ -721,7 +721,7 @@ class Servo(BrowserSetup):
binary = self.browser.find_binary(self.venv.path, None)
if binary is None:
raise WptrunError("Unable to find servo binary in PATH")
raise WptrunError("Unable to find servoshell binary in PATH")
kwargs["binary"] = binary
@@ -738,7 +738,7 @@ class ServoLegacy(Servo):
binary = self.browser.find_binary(self.venv.path, None)
if binary is None:
raise WptrunError("Unable to find servo binary in PATH")
raise WptrunError("Unable to find servoshell binary in PATH")
kwargs["binary"] = binary

View File

@@ -95,7 +95,7 @@ class ServoLegacyBrowser(NullBrowser):
class ServoLegacyWdspecBrowser(WebDriverBrowser):
# TODO: could share an implemenation with servodriver.py, perhaps
def __init__(self, logger, binary="servo", webdriver_binary="servo",
def __init__(self, logger, binary="servoshell", webdriver_binary="servoshell",
binary_args=None, webdriver_args=None, env=None, port=None,
headless=None,
**kwargs):