Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9ebebbe
Built SDL 3.4 from source for Debian 13, whose SDL is 3.2
colemancda Nov 16, 2026
2e6c1e8
Sent only the SDL build script to Docker
colemancda Nov 16, 2026
c8506c3
Moved the image to Debian 13 for WPE WebKit, with SDL 3.4 from source
colemancda Nov 16, 2026
c1f8156
Ran CI on Debian 13 with WPE WebKit and SDL 3.4
colemancda Nov 16, 2026
d27ad3a
Ran WebKit without its sandbox in the container
colemancda Nov 16, 2026
3cce7ee
Loaded WPE WebKit at run time, with frames in shared memory
colemancda Nov 16, 2026
c6c6b01
Implemented the WebContent contract over WPE WebKit
colemancda Nov 16, 2026
f63e8fb
Added the web view host module, with GLib's context on the main loop
colemancda Nov 16, 2026
44ac0cf
Tested web pages' loading, scripts, navigations, frames and input in WPE
colemancda Nov 16, 2026
989189b
Gave the host's node types their own file, with WebView
colemancda Nov 16, 2026
a274a81
Moved HostNodeViews out of the GL surface view
colemancda Nov 16, 2026
f6dafbd
Showed WebView nodes in the player, with their input
colemancda Nov 16, 2026
75467b0
Named the host's node types file in the DarwinUI sync
colemancda Nov 16, 2026
b915bf5
Registered the web view module in the host app
colemancda Nov 16, 2026
9925cf1
Checked apps against the web view contracts, and took network as served
colemancda Nov 16, 2026
75330ca
Added LinuxWebKit
colemancda Nov 16, 2026
e1b8f63
Showed ExampleWeb on Linux
colemancda Nov 16, 2026
ba11766
Documented web views
colemancda Nov 16, 2026
c05be83
Described web views and the Debian 13 build
colemancda Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The image needs only the SDL build script from this checkout.
*
!Scripts/build-sdl3.sh
16 changes: 12 additions & 4 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,26 @@ jobs:
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
container: swift:6.4.2
# Debian 13, which packages WPE WebKit; Ubuntu 26.04 doesn't.
container: swift:6.4.2-trixie
env:
# SDL's headless driver, for the window tests.
SDL_VIDEO_DRIVER: offscreen
# WebKit's web processes run without their bubblewrap sandbox, which
# can't make namespaces in a container; the tests' pages are their own.
WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS: 1
steps:
- uses: actions/checkout@v4
- name: Install SDL3, Cairo, FreeType, fontconfig and Wayland for Cacao, and Mesa for GL
- name: Install Cairo, FreeType, fontconfig and Wayland for Cacao, Mesa for GL, and WPE WebKit
run: |
apt-get update
apt-get install -y --no-install-recommends libsdl3-dev libcairo2-dev libfreetype-dev \
apt-get install -y --no-install-recommends cmake ninja-build git libcairo2-dev libfreetype-dev \
libfontconfig-dev libwayland-dev wayland-protocols fonts-dejavu-core \
libegl1 libegl-mesa0 libgles-dev libgl1-mesa-dri
libegl1 libegl-mesa0 libgles-dev libgl1-mesa-dri \
libwpewebkit-2.0-1 libwpebackend-fdo-1.0-1 libwayland-server0
# Debian's SDL is 3.2; PureSwift/SDL needs 3.4.
- name: Build SDL3
run: Scripts/build-sdl3.sh /usr -DCMAKE_INSTALL_LIBDIR=lib/$(uname -m)-linux-gnu
- name: Build
run: swift build --build-tests
- name: Test
Expand Down
24 changes: 17 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# Linux environment for building and testing the host: Swift 6.4.2, SDL3,
# Cairo, FreeType, fontconfig and Wayland for Cacao, a font, Mesa's EGL and
# GLES 2.0 for GL surfaces (llvmpipe without a GPU), Python for AppRuntime's
# scripts, and WABT for the packager's wasm2c engine.
FROM swift:6.4.2
# Linux environment for building and testing the host: Swift 6.4.2 on
# Debian 13, SDL3, Cairo, FreeType, fontconfig and Wayland for Cacao, a font,
# Mesa's EGL and GLES 2.0 for GL surfaces (llvmpipe without a GPU), WPE WebKit
# and its FreeDesktop.org backend for web views, which the host loads at run
# time, Python for AppRuntime's scripts, and WABT for the packager's wasm2c
# engine.
#
# Debian rather than Ubuntu: Ubuntu 26.04 doesn't package WPE WebKit. SDL is
# built from source: Debian's is 3.2, and PureSwift/SDL needs 3.4.
FROM swift:6.4.2-trixie

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libsdl3-dev libsdl3-ttf-dev libfontconfig-dev fonts-dejavu-core \
cmake ninja-build git libfontconfig-dev fonts-dejavu-core \
libcairo2-dev libfreetype-dev libwayland-dev wayland-protocols \
libegl1 libegl-mesa0 libgles-dev libgl1-mesa-dri \
libwpewebkit-2.0-1 libwpebackend-fdo-1.0-1 libwayland-server0 \
pkgconf python3 wabt curl ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Ubuntu's wabt leaves out two files its wasm2c runtime includes; these are
COPY Scripts/build-sdl3.sh /tmp/
RUN /tmp/build-sdl3.sh /usr -DCMAKE_INSTALL_LIBDIR=lib/$(uname -m)-linux-gnu \
&& rm /tmp/build-sdl3.sh

# Debian's wabt leaves out two files its wasm2c runtime includes; these are
# from the same release.
RUN cd /usr/share/wabt/wasm2c \
&& curl -fsSLO https://raw.githubusercontent.com/WebAssembly/wabt/1.0.36/wasm2c/wasm-rt-impl-tableops.inc \
Expand Down
Binary file added Documentation/ExampleWeb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 79 additions & 6 deletions Documentation/Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ into a Linux program:
frontend's render IR, on Cacao's SwiftUI for Linux;
- **Bluetooth** over BlueZ's D-Bus API;
- **GL surfaces**, OpenGL ES 2.0 over EGL, in the player's views;
- **web views**, WPE WebKit pages in the player's views;
- the **packager**, `linux-app` ([Packager.md](Packager.md)).

References like §7.6 are to `Documentation/DynamicRuntime.md` in AppRuntime;
Expand All @@ -45,7 +46,7 @@ AppRuntime's contracts.
| arm64 and x86_64 Linux with glibc (Debian 13, Ubuntu 24.04+) | armv7, musl |
| Native slices linked into the host | wasm2c (AppRuntime's shim, as on Darwin); WasmKit for development |
| Wayland and X11 through SDL3; a headless driver for tests | Multiple windows |
| `Renderer`, Bluetooth `Central` and friends, GL surfaces, the built-ins | Location (GeoClue), Device (UPower, sysfs), Networking (libcurl), Formatting (ICU), Motion (iio-sensor-proxy), NFC (neard) |
| `Renderer`, Bluetooth `Central` and friends, GL surfaces, web views, the built-ins | Location (GeoClue), Device (UPower, sysfs), Networking (libcurl), Formatting (ICU), Motion (iio-sensor-proxy), NFC (neard) |

## 2. Process model

Expand All @@ -56,6 +57,7 @@ AppRuntime's contracts.
│ ├── MainLoop: timers, jobs from other threads │
│ ├── LinuxBluetooth: BlueZ over D-Bus (NIO threads → MainLoop) │
│ ├── LinuxGraphics: GL surfaces, EGL pbuffers read back │
│ ├── LinuxWebKit: WPE WebKit pages, frames in shared memory │
│ ├── LinuxUI: DarwinUI, render IR → SwiftUI views → events │
│ │ └── Cacao: SwiftUI, Silica/Cairo, SDL3 windows and input │
│ └── libapp.a: the app's sealed linux-arm64 / linux-x86_64 slice│
Expand Down Expand Up @@ -89,8 +91,9 @@ timers for `schedule`.
| `LinuxUI` | The SwiftUI player: DarwinAppRuntime's `DarwinUI`, copied by `Scripts/sync-darwinui.sh`, over Cacao's `SwiftUI` and `Combine` modules; `Host.swift` gives it the logger and bundle it takes from its host |
| `LinuxBluetooth` | `Central`, `Peripheral`, `Service`, `Characteristic`, `Descriptor`, `Advertisement` over BlueZ |
| `LinuxGraphics` | `Surface` over EGL and GLES 2.0, loaded at run time; the player's `GLSurface` view shows it (§7) |
| `LinuxWebKit` | `WebContent` over WPE WebKit, loaded at run time; the player's `WebView` view shows it (§8) |
| `LinuxHostApp` | `main`: reads the app's keys, starts the host, and runs Cacao's SDL loop with one window showing the guest's first renderer |
| `LinuxPackager`, `linux-app` | The packager (§9, [Packager.md](Packager.md)) |
| `LinuxPackager`, `linux-app` | The packager (§10, [Packager.md](Packager.md)) |

The package depends on AppRuntime without its `GuestExports` trait, like
DarwinAppRuntime, so the slice's `rt_dispatch` and `rt_finalize` are the
Expand All @@ -107,7 +110,7 @@ only ones linked (`HostRuntime.md` §8 in DarwinAppRuntime).
3. `NativeRuntime.shared.bindDirectly()`; set capabilities; set the clock.
4. Register the built-ins (`Permissions`, `Bundle`, `Application`) and each
module the app uses (`LinuxUI` for `Renderer`, `LinuxBluetooth`,
`LinuxGraphics`).
`LinuxGraphics`, `LinuxWebKit`).
5. Call `rt_main`. When the guest calls `Renderer.make`, the player adds
its scene; the first tree is there before `rt_main` returns.
6. Run Cacao's loop until the window closes, the window showing the first
Expand Down Expand Up @@ -207,20 +210,90 @@ image:
window is in the background. Reading back each frame costs a copy; a GL
backend for Cacao's compositor could show the pbuffer as a texture.

## 8. Testing
## 8. Web views

`LinuxWebKit` implements `WebContent` (AppRuntime's `WebKit.md`) with WPE
WebKit, and the player draws `WebView` nodes. It follows Perry's
(`Sources/PerryUIKit/WPE.swift` there):

- **No WebKit at build time.** The host opens libwpe, WPEBackend-fdo,
libwayland-server, `libWPEWebKit-2.0.so.1`, GLib and GObject when a page
is first made, locally, so their symbols stand in for no others. Without
them a page loads nothing, and fails each load saying so. Debian 13
packages WPE 2.48 (`libwpewebkit-2.0-1`, `libwpebackend-fdo-1.0-1`);
Ubuntu 26.04 doesn't, so the development image and CI moved to Debian 13.
- **Frames in shared memory.** WPEBackend-fdo runs in its SHM mode
(`wpe_fdo_initialize_shm`), and each page's exportable view backend hands
over every frame the web process draws as a `wl_shm` buffer: premultiplied
BGRA, turned into RGBA for Cacao's `Image(pixels:)`. WebKit draws on the
CPU; there's no GL.
- **GLib's context** runs on the main loop every 8 ms while there are pages:
their signals, script results and frames all come through it.
- **The contract** maps onto `WebKitWebView`:
- `load-changed`, `load-failed` and `load-failed-with-tls-errors` give
loading, finishing and failing;
- `notify::` on `uri`, `title` and `estimated-load-progress`, and the
history after each commit, give the rest;
- `uri` changes as soon as a load is asked for, and before a history
navigation is decided, so it's reported only once the navigation
commits or follows a redirect, as the contract wants;
- cancelled and replaced navigations aren't failures.
- **Errors** come as GErrors and map to `WebError.Code`: WebKit's network
and policy errors, GIO's (a timeout is `timedOut`, the rest `network`),
the resolver's, and TLS (`security`).
- **`decide-policy`** asks `shouldNavigate` for each navigation and new
window, except the guest's own `load`, `loadHTML` and `loadResource`. A
new window loads in the same page. WPE doesn't say which frame a
navigation is in, so `isMainFrame` is always true.
- **Without `network`**:
- a remote `load`, or a navigation to a remote URL, fails with
`notPermitted` before it starts;
- every other request goes through a proxy on a `.invalid` host (RFC
2606), which never resolves, so remote subresources don't load.
- **`loadResource`** loads a `file://` URL in the bundle's `resources/`,
refusing paths that leave it.
- **The view** (`Sources/LinuxUI/HostWebView.swift`):
- It gives the page its size in points and the display's scale, and
makes it visible while it's on screen. The page stays loaded when the
view goes.
- A drag is the primary button, and hovering moves the pointer.
- A click focuses the page. Keys go to it as XKB keysyms, which WPE turns
into text.
- **The sandbox.** WebKit starts its web and network processes under
bubblewrap, which can't make namespaces in a container, so the
development image and CI set `WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1`
for their test pages. The host leaves the sandbox on. Inside a launcher's
own sandbox (AppRuntime's §7.8) it's still the open question `WebKit.md`
names.
- **Not yet**:
- The wheel: Cacao sends it only to its scroll views. Pages scroll with
the arrow keys, Page Up and Page Down, and Space.
- `alert`, `confirm` and `prompt`: WebKit's defaults apply, which show
nothing.
- Permission requests: WebKit denies them by default.
- Touches, and buttons other than the primary.
- Reading files beside a bundled page only: WebKit's file-URL rules
apply.

## 9. Testing

- `LinuxUI`: DarwinUI's tests, on Cacao (§5).
- `LinuxBluetooth`: the contract against a fake `BlueZBus` that plays
BlueZ's objects and signals. Runs on macOS and Linux.
- `LinuxGraphics`: a surface's input order, focus and size, and on Linux
frames drawn and read back with Mesa's llvmpipe, and a lost context.
- `LinuxWebKit`: on Linux, in WPE: loading HTML and the events' order,
scripts' JSON, navigations asked about and refused, back, bundle
resources, a refused connection, remote loads without `network`, frames
and their pixels, a click, typing, and a resize. Every WebKit call is made
on one thread, which WebKit takes for its main thread.
- End to end: AppRuntime's `ExampleUI` built as a `linux-arm64` slice,
linked into `linux-app-host` and run headless with SDL's `offscreen`
driver, its first frame saved with `CACAO_SCREENSHOT`.
- Real BlueZ needs hardware: manual runs on a Raspberry Pi or a laptop with
`bluetoothd`.

## 9. Phases
## 10. Phases

1. **Host runtime and player**: `LinuxHost`, `LinuxUI`, `LinuxBluetooth`,
`LinuxHostApp`; `ExampleUI` runs in Docker.
Expand All @@ -235,7 +308,7 @@ image:
4. **Player**: what DarwinUI and Cacao add: Cacao's AT-SPI bridge, input
replay for end-to-end tests.

## 10. Open questions
## 11. Open questions

- **Permissions.** Desktop Linux has no prompts for Bluetooth; Flatpak's
portals cover location and the camera. `Permissions.request` answers from
Expand Down
18 changes: 15 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ let package = Package(
.library(name: "LinuxUI", targets: ["LinuxUI"]),
.library(name: "LinuxBluetooth", targets: ["LinuxBluetooth"]),
.library(name: "LinuxGraphics", targets: ["LinuxGraphics"]),
.library(name: "LinuxWebKit", targets: ["LinuxWebKit"]),
.library(name: "LinuxHostApp", targets: ["LinuxHostApp"]),
.executable(name: "linux-app-host", targets: ["LinuxAppHost"]),
.executable(name: "linux-app", targets: ["LinuxAppTool"]),
Expand Down Expand Up @@ -101,7 +102,7 @@ let package = Package(
// over Cacao's SwiftUI.
.target(
name: "LinuxUI",
dependencies: ["LinuxHost", "LinuxGraphics", runtime("DynamicUI"), runtime("DynamicRuntime"), runtime("RuntimeNative")] + swiftUI,
dependencies: ["LinuxHost", "LinuxGraphics", "LinuxWebKit", runtime("DynamicUI"), runtime("DynamicRuntime"), runtime("RuntimeNative")] + swiftUI,
exclude: ["DARWINUI_REVISION"],
swiftSettings: host
),
Expand All @@ -127,13 +128,22 @@ let package = Package(
swiftSettings: host
),

// MARK: - Web views

// WPE WebKit, loaded at run time: the host links no WebKit.
.target(
name: "LinuxWebKit",
dependencies: ["LinuxHost", runtime("DynamicWebKit"), runtime("DynamicRuntime"), runtime("RuntimeABI")],
swiftSettings: host
),

// MARK: - App

// libc functions app slices need that older glibc lacks.
.target(name: "CLinuxHost"),
.target(
name: "LinuxHostApp",
dependencies: ["LinuxHost", "LinuxUI", "LinuxBluetooth", "LinuxGraphics", "CLinuxHost", runtime("CRuntime"),
dependencies: ["LinuxHost", "LinuxUI", "LinuxBluetooth", "LinuxGraphics", "LinuxWebKit", "CLinuxHost", runtime("CRuntime"),
.product(name: "CacaoSDL", package: "Cacao")],
swiftSettings: host
),
Expand All @@ -155,7 +165,8 @@ let package = Package(
// doesn't build Cacao.
.target(
name: "LinuxPackager",
dependencies: ["LinuxHost", "LinuxBluetooth", "LinuxGraphics", runtime("DynamicUI"), .product(name: "Crypto", package: "swift-crypto")]
dependencies: ["LinuxHost", "LinuxBluetooth", "LinuxGraphics", "LinuxWebKit", runtime("DynamicUI"),
.product(name: "Crypto", package: "swift-crypto")]
),
.executableTarget(
name: "LinuxAppTool",
Expand All @@ -172,6 +183,7 @@ let package = Package(
),
.testTarget(name: "LinuxBluetoothTests", dependencies: ["LinuxBluetooth"], swiftSettings: host),
.testTarget(name: "LinuxGraphicsTests", dependencies: ["LinuxGraphics", runtime("DynamicGraphics")], swiftSettings: host),
.testTarget(name: "LinuxWebKitTests", dependencies: ["LinuxWebKit", runtime("DynamicWebKit")], swiftSettings: host),
.testTarget(name: "LinuxPackagerTests", dependencies: ["LinuxPackager", "LinuxHostApp"]),
]
)
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Linux program:
SwiftUI for Linux;
- **Bluetooth** LE central over BlueZ's D-Bus API;
- **GL surfaces**: OpenGL ES 2.0 in a SwiftUI view, over EGL;
- **web views**: WPE WebKit pages in a SwiftUI view;
- the **packager**, `linux-app`, which turns a universal bundle into an
installable app.

Expand All @@ -31,6 +32,10 @@ llvmpipe:

![ExampleGL on Linux](Documentation/ExampleGL.png)

`ExampleWeb` shows a page in a `WebView` with WPE WebKit:

![ExampleWeb on Linux](Documentation/ExampleWeb.png)

## Modules

| Module | |
Expand All @@ -39,23 +44,32 @@ llvmpipe:
| `LinuxUI` | The SwiftUI player: DarwinAppRuntime's `DarwinUI`, copied by `Scripts/sync-darwinui.sh`, over Cacao's `SwiftUI` |
| `LinuxBluetooth` | `Central`, `Peripheral`, `Service`, `Characteristic`, `Descriptor` and `Advertisement` over BlueZ, through `wendylabsinc/dbus` |
| `LinuxGraphics` | `Surface`: GLES 2.0 drawn in EGL pbuffers, loaded at run time, and read back into the player's `GLSurface` view ([plan](Documentation/Plan.md) §7) |
| `LinuxWebKit` | `WebContent`: WPE WebKit pages, loaded at run time, drawn into shared memory and shown by the player's `WebView` view ([plan](Documentation/Plan.md) §8) |
| `LinuxHostApp`, `linux-app-host` | The app's `main`: the host, and Cacao's window and loop |
| `LinuxPackager`, `linux-app` | The packager: validation, the host build, wasm2c, the install tree, PortMaster ports |

## Building

Swift 6.4.2 (`.swift-version`); SDL3, Cairo, FreeType, fontconfig and
Wayland for Cacao; and EGL and GLES 2.0, which GL surfaces load at run time
and apps that draw link (Mesa's draw without a GPU):
Swift 6.4.2 (`.swift-version`) on Debian 13; SDL 3.4, Cairo, FreeType,
fontconfig and Wayland for Cacao; EGL and GLES 2.0, which GL surfaces load
at run time and apps that draw link (Mesa's draw without a GPU); and WPE
WebKit, which web views load at run time:

```sh
apt-get install libsdl3-dev libcairo2-dev libfreetype-dev libfontconfig-dev \
apt-get install cmake ninja-build git libcairo2-dev libfreetype-dev libfontconfig-dev \
libwayland-dev wayland-protocols fonts-dejavu-core \
libegl1 libegl-mesa0 libgles-dev libgl1-mesa-dri
libegl1 libegl-mesa0 libgles-dev libgl1-mesa-dri \
libwpewebkit-2.0-1 libwpebackend-fdo-1.0-1 libwayland-server0
Scripts/build-sdl3.sh /usr -DCMAKE_INSTALL_LIBDIR=lib/$(uname -m)-linux-gnu
swift build
swift test
```

Debian's SDL is 3.2, and PureSwift/SDL needs 3.4, so `build-sdl3.sh`
builds it. Ubuntu 26.04 doesn't package WPE WebKit. In a container, WebKit's
web processes need `WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1`: its
bubblewrap sandbox can't make namespaces there.

The `Dockerfile` has all of it; `Scripts/docker.sh` runs a command there,
with this checkout at `/src`:

Expand Down
22 changes: 22 additions & 0 deletions Scripts/build-sdl3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
# Builds SDL3 from source for the development image and CI, which run on
# Debian 13: its SDL is 3.2, and PureSwift/SDL needs 3.4. Only the offscreen
# driver, for tests and screenshots without a display.
#
# Scripts/build-sdl3.sh PREFIX [cmake arguments …]
#
# SDL3_TAG picks the release, as Docker/build-sdl.sh's does for ports.
set -e
prefix=${1:?usage: Scripts/build-sdl3.sh PREFIX [cmake arguments …]}
shift
SDL3_TAG=${SDL3_TAG:-release-3.4.20}
work=$(mktemp -d)
git clone -q --depth 1 --branch "$SDL3_TAG" https://github.com/libsdl-org/SDL.git "$work/SDL"
cmake -S "$work/SDL" -B "$work/build" -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$prefix" \
-DSDL_SHARED=ON -DSDL_STATIC=OFF -DSDL_TESTS=OFF -DSDL_INSTALL_TESTS=OFF -DSDL_EXAMPLES=OFF \
-DSDL_UNIX_CONSOLE_BUILD=ON -DSDL_X11=OFF -DSDL_WAYLAND=OFF -DSDL_KMSDRM=OFF -DSDL_OFFSCREEN=ON -DSDL_VULKAN=OFF \
-DSDL_PULSEAUDIO=OFF -DSDL_PIPEWIRE=OFF -DSDL_JACK=OFF -DSDL_SNDIO=OFF -DSDL_ALSA=OFF \
"$@"
cmake --build "$work/build"
cmake --install "$work/build"
rm -rf "$work"
5 changes: 4 additions & 1 deletion Scripts/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
# APPRUNTIME_PATH=~/Developer/AppRuntime Scripts/docker.sh swift build --scratch-path .build/linux
#
# LINUXAPPRUNTIME_APP_LIBRARY, a path inside the container, and
# CACAO_SCREENSHOT_DELAY are passed through.
# CACAO_SCREENSHOT_DELAY are passed through. WebKit's web processes run
# without their bubblewrap sandbox, which can't make namespaces in a
# container.
set -e
root=$(cd "$(dirname "$0")/.." && pwd)
image=linuxappruntime-dev
Expand All @@ -29,4 +31,5 @@ exec docker run --rm \
-v "$root:/src" -w /src \
-v linuxappruntime-swiftpm:/root/.cache \
-e LINUXAPPRUNTIME_APP_LIBRARY -e CACAO_SCREENSHOT_DELAY \
-e WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1 \
"$@" "$image" bash -c "$command"
Loading
Loading