Loading...
Loading...
This skill should be used when the user asks to "build electrobun app", "electrobun build", "electrobun canary", "electrobun stable", "set up code signing", "electrobun distribution", or is diagnosing electrobun build failures. Covers dev/canary/stable environments, all three platforms, toolchain prerequisites, artifact output, and CI/CD setup.
npx skill4agent add dexploarer/plugin-electrobun-dev electrobun-buildelectrobun build| Environment | Command | Codesign | Updates | Patch gen |
|---|---|---|---|---|
| | No | Disabled | No |
| | Yes (if configured) | Enabled | Yes |
| | Yes (if configured) | Enabled | Yes |
ELECTROBUN_BUILD_ENVpostBuildxcode-select --install # Xcode Command Line Tools
brew install cmake.dmg.app.tar.zstclang++makeinstall_name_toolarm64x64Microsoft.VisualStudio.Component.VC.Tools.x86.x64vswhere.exevcvarsall.bat.exe.zip.tar.zstcl.exelink.exex64sudo apt-get install -y \
build-essential \
cmake \
pkg-config \
libgtk-3-dev \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
fuse \
libfuse2libfuse2.AppImage.tar.zstg++makepkg-configx64arm64build.*build: {
bun: {
entrypoint: "src/bun/index.ts", // default
// + any Bun.build() options (splitting, minify, target, etc.)
},
views: {
// Each key becomes the view's URL scheme: mainview://index.html
mainview: {
entrypoint: "src/mainview/index.ts",
// + any Bun.build() options per view
},
},
copy: {
// Record<sourcePath, destPathInBuildOutput>
"src/assets/icon.png": "resources/icon.png",
},
buildFolder: "build", // default: "build"
artifactFolder: "artifacts", // default: "artifacts"
targets: "current", // default: build for host platform
useAsar: false, // default: false — pack assets into ASAR archive
asarUnpack: ["*.node", "*.dll", "*.dylib", "*.so"], // always unpacked from ASAR
cefVersion: undefined, // override bundled CEF version
bunVersion: undefined, // override bundled Bun runtime version
wgpuVersion: undefined, // override latest electrobun-dawn release
locales: "*", // ICU locales to include ("*" = all); Linux/Windows only
}build.macbuild: {
mac: {
bundleCEF: false, // bundle CEF instead of WKWebView (~120MB)
bundleWGPU: false, // bundle Dawn for native GPU rendering
defaultRenderer: "native", // "native" | "cef"
codesign: false, // enable Apple code signing
notarize: false, // enable notarization (requires codesign: true)
icons: undefined, // path to .iconset folder or .icns file
chromiumFlags: {}, // Record<string, string|true> — CEF-only flags
entitlements: undefined, // path to custom entitlements.plist
}
}build.winbuild: {
win: {
bundleCEF: false, // CEF is always needed on Windows (no OS webview)
bundleWGPU: false, // bundle Dawn
icons: undefined, // path to .ico file
chromiumFlags: {}, // CEF Chromium flags
}
}build.linuxbuild: {
linux: {
bundleCEF: false, // bundle CEF instead of GTKWebKit
bundleWGPU: false, // bundle Dawn
icons: undefined, // icon file path
chromiumFlags: {}, // CEF Chromium flags
}
}Linux multi-view note: GTKWebKit is the default system webview. For apps with multiple views or needing consistent rendering,is strongly recommended.bundleCEF: true
build.mac.codesign: trueELECTROBUN_DEVELOPER_IDbuildEnvironment !== "dev"bundleCEF: true.dylibMacOS/launcher.app.dmgexport ELECTROBUN_DEVELOPER_ID="Developer ID Application: Your Name (TEAMID)"
# Notarization (requires codesign: true)
export ELECTROBUN_APPLEID="you@example.com"
export ELECTROBUN_APPLEIDPASS="xxxx-xxxx-xxxx-xxxx" # app-specific password
export ELECTROBUN_TEAMID="ABCDE12345".appxcrun notarytool submit --waitxcrun stapler staple.dmgartifacts/build.artifactFolder{channel}-{os}-{arch}-{filename}| Platform | Installer | Update Tarball | Manifest |
|---|---|---|---|
| macOS stable arm64 | | | |
| macOS canary arm64 | | | |
| macOS stable x64 | | | |
| Windows stable x64 | | | |
| Windows canary x64 | | | |
| Linux stable x64 | | | |
| Linux canary arm64 | | | |
{channel}-{os}-{arch}-{fromHash}.patchupdate.json{
"version": "1.0.0",
"hash": "<sha256-of-uncompressed-tarball>",
"platform": "macos",
"arch": "arm64"
}version.jsonmacOS: MyApp.app/Contents/Resources/version.json
Windows: MyApp/Resources/version.json
Linux: MyApp/Resources/version.json{
"version": "1.0.0",
"hash": "<content-hash>",
"channel": "stable",
"baseUrl": "https://updates.example.com/",
"name": "MyApp",
"identifier": "com.example.myapp"
}postBuild| Variable | Example |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| Variable | Purpose |
|---|---|
| Override CEF version without editing config |
| Override Bun runtime version |
| Force console output on Windows in production |
does not exist. Code signing is controlled byELECTROBUN_SKIP_CODESIGNandconfig.build.mac.codesign.buildEnvironment
strategy:
matrix:
include:
- runner: macos-14 # Apple Silicon
arch: arm64
- runner: macos-15-intel # Intel
arch: x64
- runner: ubuntu-24.04 # Linux x64
arch: x64
- runner: ubuntu-24.04-arm # Linux ARM64
arch: arm64
- runner: windows-2025 # Windows x64
arch: x64| Secret | Purpose |
|---|---|
| Base64-encoded .p12 certificate |
| Certificate password |
| Apple Developer ID string |
| Apple ID email |
| App-specific password |
| Apple Team ID |
| Cloudflare R2 endpoint URL |
| R2 access key |
| R2 secret key |
| R2 bucket name |
| npm publish token |
- name: Install Apple Certificate
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p "" build.keychain
security import certificate.p12 -k build.keychain \
-P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security list-keychains -d user -s build.keychain
security set-keychain-settings -t 3600 -u build.keychain
security unlock-keychain -p "" build.keychain| Error | Cause | Fix |
|---|---|---|
| View URL not found | Config key doesn't match | |
| Blank window | Script tag points to | Use |
| Codesign fails locally | Certificate not in keychain | Run |
| Notarization fails | Hardened runtime without JIT entitlement | Add |
| Linux AppImage won't run | FUSE missing | |
| Windows MSVC not found | VS component missing | Install |
| CEF build fails | cmake not installed | Install cmake for the platform |
| | Set |
| WGPU GC crash after frames | FFI objects not pinned | Push all GPU objects to |