Loading...
Loading...
This skill should be used when the user asks about cross-platform electrobun support, "electrobun Linux", "electrobun Windows", CEF requirements by platform, "electrobun platform differences", or is setting up multi-platform CI for an electrobun app.
npx skill4agent add dexploarer/plugin-electrobun-dev electrobun-platform| Platform | OS value | Arch | Status | Default Webview |
|---|---|---|---|---|
| macOS ARM64 | | | Stable | WKWebView |
| macOS Intel | | | Stable | WKWebView |
| Windows x64 | | | Stable | WebView2 (Edge) |
| Windows ARM64 | | | Via emulation | Runs x64 binary |
| Linux x64 | | | Stable | GTKWebKit |
| Linux ARM64 | | | Stable | GTKWebKit |
<electrobun-webview>// electrobun.config.ts
build: {
linux: { bundleCEF: true, defaultRenderer: 'cef' },
}set ELECTROBUN_CONSOLE=1
.\MyApp.exe// macOS: hidden and passthrough are INDEPENDENT
webviewSetHidden(webviewId, true); // hidden, still intercepts clicks
webviewSetPassthrough(webviewId, true); // separate call for click-through
// Windows & Linux: hidden = hidden + passthrough automatically
webviewSetHidden(webviewId, true); // hidden AND clicks pass through
// webviewSetPassthrough() is a no-op on Windows/Linux<electrobun-webview><electrobun-webview
src="https://example.com"
width="100%"
height="400px"
renderer="cef">
</electrobun-webview>BrowserView.getAll()build: {
cefVersion: '144.0.11+ge135be2+chromium-144.0.7559.97',
}build: {
mac: {
bundleCEF: true,
chromiumFlags: {
'show-paint-rects': true,
'user-agent': 'MyApp/1.0',
'disable-web-security': true,
},
},
}// Override defaultRenderer per window
const win = new BrowserWindow({ url: '...', renderer: 'native' });
const cefWin = new BrowserWindow({ url: '...', renderer: 'cef' });import Electrobun from 'electrobun/bun';
// App lifecycle
Electrobun.events.on('before-quit', (e) => {
if (hasUnsavedChanges()) e.response = { allow: false }; // cancel quit
});
Electrobun.events.on('open-url', (e) => {
const url = new URL(e.data.url); // macOS URL scheme deep links
});
// Window events (global — all windows)
Electrobun.events.on('close', (e) => { /* e.data.id */ });
Electrobun.events.on('resize', (e) => { /* e.data.id, width, height */ });
Electrobun.events.on('move', (e) => { /* e.data.id, x, y */ });
Electrobun.events.on('blur', (e) => { /* e.data.id */ });
Electrobun.events.on('focus', (e) => { /* e.data.id */ });
// Menu / tray
Electrobun.events.on('application-menu-clicked', (e) => { /* e.data.action */ });
Electrobun.events.on('context-menu-clicked', (e) => { /* e.data.action, data */ });
Electrobun.events.on('tray-menu-clicked', (e) => { /* e.data.action */ });Utils.quit()process.exit()before-quitbefore-quitUtils.quit()process.exit()/Applications~/Applications// electrobun.config.ts
app: { urlSchemes: ['myapp', 'myapp-dev'] }
// src/bun/index.ts
Electrobun.events.on('open-url', (e) => {
const url = new URL(e.data.url);
if (url.pathname.startsWith('/auth')) { /* handle */ }
});sandbox: truesetNavigationRuleselectrobun/bunpartitionviews://file://+export ELECTROBUN_DEVELOPER_ID="My Corp Inc. (BGU899NB8T)"
export ELECTROBUN_TEAMID="BGU899NB8T"
export ELECTROBUN_APPLEID="you@example.com"
export ELECTROBUN_APPLEIDPASS="xxxx-xxxx-xxxx-xxxx"xattr -cr /Applications/YourApp.appbuild: {
mac: {
entitlements: {
'com.apple.security.device.camera': 'Needed for video',
'com.apple.security.device.microphone': 'Needed for audio',
}
}
}build: {
mac: { icons: 'icon.iconset' },
// icon.iconset/ must contain icon_{16,32,64,128,256,512}x{same}[@2x].png
win: { icon: 'icon.iconset/icon_256x256.png' }, // .ico or .png, auto-converted
linux: { icon: 'icon.iconset/icon_256x256.png' }, // 256x256+ .png
}{channel}-{os}-{arch}-canary-macos-arm64-MyApp-canary.dmg
canary-macos-arm64-MyApp-canary.app.tar.zst
canary-macos-arm64-{prevHash}.patch
canary-win-x64-MyApp-Setup-canary.zip
canary-win-x64-MyApp-canary.tar.zst
canary-linux-x64-MyAppSetup-canary.tar.gz
stable-macos-arm64-MyApp.dmg ← no "stable" in name on stable channel.tar.zstrelease: {
baseUrl: 'https://storage.googleapis.com/mybucket/myapp/',
// GitHub Releases:
// baseUrl: 'https://github.com/ORG/REPO/releases/latest/download',
}/releases/latest/downloadjobs:
build-macos-arm64:
runs-on: macos-14 # Apple Silicon
build-macos-x64:
runs-on: macos-13 # Intel
build-windows:
runs-on: windows-latest
build-linux:
runs-on: ubuntu-latest
# Each job:
# uses: actions/checkout@v4
# uses: oven-sh/setup-bun@v2
# run: bun install
# run: electrobun build --env=stable
# uses: softprops/action-gh-release@v1
# with: files: artifacts/*-canarybuild: {
useAsar: true,
asarUnpack: ['*.node', '*.dll', '*.dylib', '*.so', 'data/large/**/*'],
}app.asarapp.asar.unpacked/| Issue | Fix |
|---|---|
| Linux webview layering broken | |
| Canary auto-update not working | GitHub |
| "damaged and can't be opened" macOS | Enable |
| Code signing cert errors | Install full Xcode from App Store, not just CLI tools |
| RPC type mismatch at runtime | Confirm shared type file is imported by both sides |
| Sandbox webview + RPC silent failure | |
| Windows no console output | Set |
| URL schemes not registering | App must be in |
| Cross-compilation attempt | Each platform must build on its own native OS |
| Linux renderer mixing | All webviews must use the same renderer on Linux |
| Old patches missing | Keep all patch files on static host for sequential upgrades |
| System-initiated quits may bypass it; |
| Notarize + codesign disabled for speed | Turn off during rapid debug cycles, re-enable for release |