deno desktop: raw backend fails to launch on aarch64-apple-darwin, no .app bundle shipped
deno desktop cannot launch the raw backend on aarch64-apple-darwin. The backend downloads successfully, the app compiles successfully, and then launching fails because the launcher looks for a .app bundle that the winit backend does not ship. The failure happens before any user JS runs, so it blocks the raw backend entirely on Apple Silicon macOS.
Version
deno 2.9.5 (stable, release, aarch64-apple-darwin)
laufey 0.6.1
macOS 26.5.2 (25F84), Apple M3 ProReproduction
Two files, no dependencies:
deno.json
{
"desktop": { "backend": "raw" },
"unstable": ["webgpu"]
}main.ts
console.log("hello");Then:
deno desktop main.tsActual
Compilation succeeds and the launcher fails:
⚠ deno desktop is experimental and subject to change
Compile main.ts to <name>.dylib
Files: 1.48KB
Metadata: 1.38KB
Remote modules: 12B
error: could not find 'raw' .app bundle inside /Users/<user>/Library/Caches/deno/laufey/0.6.1/raw/aarch64-apple-darwin (backend may not ship as an app for target 'aarch64-apple-darwin')hello is never printed — this is a launch failure, not a runtime one.
Expected
The app launches, or the raw backend is documented as unsupported on this target. The backends page and the WebGPU page do not mention any platform restriction, and the WebGPU page presents raw as the required backend for WebGPU rendering, so a user following the documentation on an Apple Silicon Mac hits a wall with no indication that the platform is the problem.
What the cache actually contains
The backend downloads fine. The extracted directory holds a bare Mach-O executable and no bundle:
$ ls -1 ~/Library/Caches/deno/laufey/0.6.1/raw/aarch64-apple-darwin
.downloaded
laufey_winit
$ file ~/Library/Caches/deno/laufey/0.6.1/raw/aarch64-apple-darwin/laufey_winit
Mach-O 64-bit executable arm64The artifact is expected to exist for this target — laufey-winit-aarch64-apple-darwin.tar.gz is listed in cli/laufey_sums.lock, alongside the cef and webview artifacts for the same target. So this does not look like a missing build, it looks like a packaging or lookup mismatch: strings in the deno binary reference laufey.app/Contents/MacOS/laufey for cef and laufey_webview.app/Contents/MacOS/laufey_webview for webview, while winit is referenced only as target/release/laufey_winit and target/debug/laufey_winit — a bare binary with no bundle anywhere in the picture. The macOS launch path nevertheless requires a .app.
Hand-creating a minimal bundle next to the binary in the cache directory does not satisfy the check. I tried both raw.app/Contents/MacOS/laufey_winit and laufey_winit.app/Contents/MacOS/laufey_winit, each with an Info.plist carrying a matching CFBundleExecutable; the same error is reported in both cases.
Workaround
The backend does run if the launcher is bypassed. The compiled dylib exports the symbols the host looks for:
$ nm -gU <name>.dylib | grep laufey
_laufey_runtime_init
_laufey_runtime_shutdown
_laufey_runtime_startso invoking the host directly works:
LAUFEY_RUNTIME_PATH=$PWD/<name>.dylib \
~/Library/Caches/deno/laufey/0.6.1/raw/aarch64-apple-darwin/laufey_winitLoading runtime from: .../<name>.dylib
Runtime initialized, starting...
helloThis confirms the backend binary itself is functional on this target and that only the bundle lookup is in the way.
Related, but probably a separate issue
Worth flagging so that fixing the packaging is not mistaken for making raw usable here: with the launcher bypassed as above, new Deno.BrowserWindow(...) succeeds, and the first call to getNativeWindow() panics.
thread '<unnamed>' panicked at raw-window-metal-1.1.0/src/lib.rs:403:44:
can only access NSView on the main threadThe window host owns the main thread and starts the Deno runtime on a secondary one via laufey_runtime_start, so the op that creates the wgpu surface runs off the main thread and AppKit refuses to hand out the NSView. Since getNativeWindow() is the only documented way to reach WebGPU from deno desktop, the raw backend on this platform needs both this and the packaging issue resolved. I am happy to open that separately if it is not already tracked.
Source: denoland/deno