Repository Analysis

blackboardsh/electrobun

Build ultra fast, tiny, and cross-platform desktop apps with Typescript.

1.5 Likely human-written View on GitHub
1.5
Adjusted Score
1.5
Raw Score
100%
Time Factor
2026-05-17
Last Push
12,096
Stars
TypeScript
Language
93,296
Lines of Code
373
Files
127
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 2LOW 125

Pattern Findings

127 matches across 5 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers59 hits · 59 pts
SeverityFileLineSnippet
LOWtemplates/wgpu-threejs/src/bun/index.ts93function makeShaderModuleDescriptor(nextInChainPtr: number) {
LOWtemplates/wgpu-threejs/src/bun/index.ts189function makeRenderPipelineDescriptor(
LOWtemplates/wgpu-threejs/src/bun/index.ts267function makeBindGroupEntrySampler(binding: number, samplerPtr: number) {
LOWtemplates/wgpu-threejs/src/bun/index.ts281function makeBindGroupEntryTexture(binding: number, textureViewPtr: number) {
LOWtemplates/wgpu-threejs/src/bun/index.ts320function makeTexelCopyBufferLayout(bytesPerRow: number, rowsPerImage: number) {
LOWtemplates/wgpu-threejs/src/bun/index.ts338function makeCommandEncoderDescriptor() {
LOWtemplates/wgpu-threejs/src/bun/index.ts352function makeRenderPassColorAttachment(viewPtr: number) {
LOWtemplates/wgpu/src/bun/index.ts67function makeShaderModuleDescriptor(nextInChainPtr: number) {
LOWtemplates/wgpu/src/bun/index.ts175function makeRenderPipelineDescriptor(
LOWtemplates/wgpu/src/bun/index.ts208function makeCommandEncoderDescriptor() {
LOWtemplates/wgpu/src/bun/index.ts222function makeRenderPassColorAttachment(viewPtr: number, clear: { r: number; g: number; b: number; a: number }) {
LOWkitchen/src/tests/wgpu-ffi.test.ts117function makeShaderModuleDescriptor(nextInChainPtr: number) {
LOWkitchen/src/tests/wgpu-ffi.test.ts189function makeRenderPipelineDescriptor(
LOWkitchen/src/tests/wgpu-ffi.test.ts209function makeCommandEncoderDescriptor() {
LOWkitchen/src/tests/wgpu-ffi.test.ts223function makeRenderPassColorAttachment(viewPtr: number) {
LOWkitchen/src/tests/interactive/wgpu-view.test.ts69function makeRequestAdapterOptions(surfacePtr: number) {
LOWkitchen/src/tests/interactive/wgpu-view.test.ts81function makeRequestAdapterCallbackInfo(callbackPtr: number) {
LOWkitchen/src/tests/interactive/wgpu-view.test.ts93function makeRequestDeviceCallbackInfo(callbackPtr: number) {
LOWkitchen/src/tests/interactive/wgpu-view.test.ts116function makeShaderModuleDescriptor(nextInChainPtr: number) {
LOWkitchen/src/tests/interactive/wgpu-view.test.ts230function makeRenderPipelineDescriptor(
LOWkitchen/src/tests/interactive/wgpu-view.test.ts266function makeCommandEncoderDescriptor() {
LOWkitchen/src/tests/interactive/wgpu-view.test.ts318function makeTexelCopyBufferLayout(bytesPerRow: number, rowsPerImage: number) {
LOWkitchen/src/tests/interactive/wgpu-view.test.ts356function makeBindGroupEntrySampler(binding: number, samplerPtr: number) {
LOWkitchen/src/tests/interactive/wgpu-view.test.ts370function makeBindGroupEntryTexture(binding: number, textureViewPtr: number) {
LOWkitchen/src/tests/interactive/wgpu-view.test.ts400function makeRenderPassColorAttachment(
LOWkitchen/src/bun/wgpuTagRenderer.ts289function makeShaderModuleDescriptor(nextInChainPtr: number) {
LOWkitchen/src/bun/wgpuTagRenderer.ts395function makeRenderPipelineDescriptor(
LOWkitchen/src/bun/wgpuTagRenderer.ts429function makeCommandEncoderDescriptor() {
LOWkitchen/src/bun/wgpuTagRenderer.ts443function makeRenderPassColorAttachment(
LOWpackage/build.ts279function getWindowsCefWrapperLibPath() {
LOWpackage/build.ts2243async function generateTemplateEmbeddings() {
LOWpackage/scripts/update-cef-version.ts27async function getLatestStableCEFVersion(): Promise<StableVersion> {
LOWpackage/scripts/update-bun-version.ts22async function getLatestStableBunVersion(): Promise<string> {
LOWpackage/src/native/win/nativeWrapper.cpp960class ElectrobunResourceRequestHandler : public CefResourceRequestHandler {
LOWpackage/src/native/win/nativeWrapper.cpp978class ElectrobunRequestHandler : public CefRequestHandler {
LOWpackage/src/shared/rpc.ts180function missingTransportMethodError(
LOWpackage/src/shared/naming.ts44export function getMacOSBundleDisplayName(
LOWpackage/src/shared/naming.ts136export function sanitizeVolumeNameForHdiutil(name: string): string {
LOWpackage/src/cli/index.ts1403async function downloadAndExtractCustomCEF(
LOWpackage/src/cli/index.ts1782async function createLinuxInstallerArchive(
LOWpackage/src/cli/index.ts1895function generateUsageDescriptions(
LOWpackage/src/cli/index.ts5107 async function createWindowsSelfExtractingExe(
LOWpackage/src/cli/index.ts5214 async function wrapWindowsInstallerInZip(
LOWpackage/src/bun/webgpuAdapter.ts302function makeTextureViewDescriptor(options?: {
LOWpackage/src/bun/webgpuAdapter.ts532function makeRenderPipelineDescriptor(
LOWpackage/src/bun/webgpuAdapter.ts554function makeProgrammableStageDescriptor(
LOWpackage/src/bun/webgpuAdapter.ts569function makeComputePipelineDescriptor(
LOWpackage/src/bun/webgpuAdapter.ts583function makeComputePassDescriptor() {
LOWpackage/src/bun/webgpuAdapter.ts593function makeBufferMapCallbackInfo(
LOWpackage/src/bun/webgpuAdapter.ts609function makeQueueWorkDoneCallbackInfo(
LOWpackage/src/bun/webgpuAdapter.ts666function makeBindGroupLayoutDescriptor(entriesPtr: number, count: number) {
LOWpackage/src/bun/webgpuAdapter.ts714function makePipelineLayoutDescriptor(layoutsPtr: number, count: number) {
LOWpackage/src/bun/webgpuAdapter.ts727function makeCommandEncoderDescriptor() {
LOWpackage/src/bun/webgpuAdapter.ts741function makeRenderPassColorAttachment(
LOWpackage/src/bun/webgpuAdapter.ts764function makeRenderPassDepthStencilAttachment(options: {
LOWpackage/src/bun/webgpuAdapter.ts2818function makeShaderModuleDescriptor(nextInChainPtr: number) {
LOWpackage/src/bun/webgpuAdapter.ts2844function makeTexelCopyBufferLayout(
LOWpackage/src/bun/proc/native.ts89function ensureWebviewRuntimeConfigured() {
LOWpackage/src/bun/preload/events.ts116export function initSPANavigationInterception() {
Over-Commented Block51 hits · 51 pts
SeverityFileLineSnippet
LOWkitchen/src/tests/session.test.ts61 // // Just test that the call doesn't throw
LOWkitchen/src/tests/session.test.ts81 // category: "Session",
LOWkitchen/src/tests/session.test.ts101
LOWkitchen/src/tests/interactive/permissions.test.ts1// Interactive Permission Prompt Tests
LOWpackage/src/native/macos/nativeWrapper.mm1/*
LOWpackage/src/native/macos/nativeWrapper.mm21 static int cached = -1;
LOWpackage/src/native/macos/nativeWrapper.mm41#include "include/cef_client.h"
LOWpackage/src/native/macos/nativeWrapper.mm61#include <atomic>
LOWpackage/src/native/macos/nativeWrapper.mm5921 // CefRegisterSchemeHandlerFactory("views", "", new ElectrobunSchemeHandlerFactory(assetFileLoader, 0));
LOWpackage/src/native/win/nativeWrapper.cpp1#include <winsock2.h> // Must come before Windows.h
LOWpackage/src/native/win/nativeWrapper.cpp21#include "dawn/webgpu.h"
LOWpackage/src/native/win/nativeWrapper.cpp41#include <dxgi1_2.h> // For DXGI 1.2 (CreateSwapChainForComposition)
LOWpackage/src/native/win/nativeWrapper.cpp61#include "../shared/json_menu_parser.h"
LOWpackage/src/native/win/nativeWrapper.cpp361#include "include/cef_scheme.h"
LOWpackage/src/native/win/nativeWrapper.cpp381#pragma comment(lib, "comctl32.lib")
LOWpackage/src/native/win/nativeWrapper.cpp3441 // WebView2 uses GPU-accelerated Direct3D rendering through an "Intermediate D3D Window"
LOWpackage/src/native/win/nativeWrapper.cpp12421 // Not supported on Windows
LOWpackage/src/native/win/dcomp_compositor.h1// dcomp_compositor.h — DirectComposition GPU surface compositor for Windows
LOWpackage/src/native/shared/cef_response_filter.h1// cef_response_filter.h - Cross-platform CEF response filter for preload script injection
LOWpackage/src/native/shared/json_menu_parser.h1// json_menu_parser.h - Cross-platform simple JSON menu parser
LOWpackage/src/native/shared/thread_safe_map.h1// thread_safe_map.h - Cross-platform thread-safe map template
LOWpackage/src/native/shared/download_event.h1// download_event.h - Cross-platform download event structures
LOWpackage/src/native/shared/permissions.h1// permissions.h - Cross-platform permission cache management
LOWpackage/src/native/shared/navigation_rules.h1// navigation_rules.h - Cross-platform navigation rules checking
LOWpackage/src/native/shared/asar.h1// asar.h - Cross-platform ASAR archive C FFI declarations
LOWpackage/src/native/shared/shutdown_guard.h1// shutdown_guard.h - Cross-platform shutdown state management
LOWpackage/src/native/shared/permissions_cef.h1// permissions_cef.h - CEF-aware permission helpers
LOWpackage/src/native/shared/ffi_helpers.h1// ffi_helpers.h - Cross-platform FFI helper utilities
LOWpackage/src/native/shared/webview_storage.h1// webview_storage.h - Cross-platform webview content storage
LOWpackage/src/native/shared/cache_migration.h1// cache_migration.h - One-shot CEF cache folder wipe on Electrobun upgrades.
LOWpackage/src/native/shared/cache_migration.h21// "old layout" that needs wiping.
LOWpackage/src/native/shared/cache_migration.h41#include <exception>
LOWpackage/src/native/shared/partition_context.h1// partition_context.h - Cross-platform CEF partition (CefRequestContext) management.
LOWpackage/src/native/shared/partition_context.h21// per call, never cached. Closing and reopening a webview that uses
LOWpackage/src/native/shared/mime_types.h1// mime_types.h - Cross-platform MIME type detection
LOWpackage/src/native/shared/glob_match.h1// glob_match.h - Cross-platform glob pattern matching utility
LOWpackage/src/native/shared/chromium_flags.h1// chromium_flags.h - Cross-platform Chromium CLI flag passthrough
LOWpackage/src/native/linux/nativeWrapper.cpp1#include <gtk/gtk.h>
LOWpackage/src/native/linux/nativeWrapper.cpp21#include <iostream>
LOWpackage/src/native/linux/nativeWrapper.cpp41#include <set>
LOWpackage/src/native/linux/nativeWrapper.cpp101// adds CEF into their bundles
LOWpackage/src/native/linux/nativeWrapper.cpp1601
LOWpackage/src/native/linux/nativeWrapper.cpp3041
LOWpackage/src/cli/index.ts2681 join(appBundleFolderContentsPath, "Info.plist"),
LOWpackage/src/cli/index.ts2701 // ./bun ../Resources/app/bun/index.js >"$LOG_FILE" 2>&1
LOWpackage/src/cli/index.ts3981 // For Linux, the app bundle is already in the correct directory structure
LOWpackage/src/cli/index.ts4481 });
LOWpackage/src/bun/proc/native.ts2201 const { quit } = require("../core/Utils");
LOWpackage/src/bun/__tests__/ffi-contract.test.ts1// Contract tests for the bun:ffi APIs that electrobun depends on.
LOWpackage/src/bun/preload/index-sandboxed.ts1// Electrobun Sandboxed Preload Script (for untrusted webviews)
LOWpackage/src/bun/preload/index.ts1// Electrobun Full Preload Script (for trusted webviews)
Verbosity Indicators15 hits · 22 pts
SeverityFileLineSnippet
LOWpackage/scripts/build-and-upload-artifacts.js99// Step 1: Build the release artifacts
LOWpackage/scripts/build-and-upload-artifacts.js108// Step 2: Check if the artifacts exist
LOWpackage/scripts/build-and-upload-artifacts.js127// Step 3: Check if release exists
LOWpackage/scripts/build-and-upload-artifacts.js161// Step 4: Upload artifacts
LOWpackage/scripts/build-and-upload-artifacts.js192// Step 5: Clean up local artifacts
LOWpackage/src/native/win/nativeWrapper.cpp8244 // Step 1: Init DComp compositor (visual tree) on main thread
LOWpackage/src/native/win/nativeWrapper.cpp8257 // Step 2: Get Dawn's DX12 device to find the DXGI adapter
LOWpackage/src/native/win/nativeWrapper.cpp8264 // Step 3: Create dedicated presentation D3D11 device on Dawn's adapter
LOWpackage/src/native/win/nativeWrapper.cpp8307 // Step 4: Create swap chain on the presentation device
LOWpackage/src/native/win/nativeWrapper.cpp8317 // Step 5: Create DX12 staging texture with shared access
LOWpackage/src/native/win/nativeWrapper.cpp8340 // Step 6: Create DXGI shared handle
LOWpackage/src/native/win/nativeWrapper.cpp8349 // Step 7: Set up cross-device sync
LOWpackage/src/native/win/nativeWrapper.cpp8370 // Step 8: Open shared handle on presentation device for CopyResource
LOWpackage/src/native/win/nativeWrapper.cpp8383 // Step 9: Import into Dawn via SharedTextureMemory
LOWpackage/src/native/win/nativeWrapper.cpp8407 // Step 10: Create WGPUTexture from SharedTextureMemory
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMpackage/src/cli/index.ts2690 // # Define the log file path
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMpackage/src/cli/index.ts4138 // Run it as a separate process to leverage multi-threadedness