# System map — clash-verge-rev/clash-verge-rev

> Canonical page: https://codevetter.com/unpack/clash-verge-rev/system-map

# System map — clash-verge-rev/clash-verge-rev

Scanned commit fd06fbb3b71ee5c4467bc0e3cc505dcac5348371 (2026-09-22). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

The process starts in src-tauri/src/main.rs, which installs a capped Tokio runtime and calls app_lib::run in src-tauri/src/lib.rs. That builder registers Tauri plugins and the IPC command table, then resolve_setup brings up config, the core, the tray, and the window. The UI is a Vite app rooted at src/ on port 3000. Persistent state lives in the OS data directory under the bundle id, not in the repo. The Mihomo core is an external binary, started either by clash-verge-service over IPC or as a sidecar. Release builds are GitHub Actions tag workflows; day-to-day dev is pnpm plus Cargo.
- Product identity is Clash Verge, npm name clash-verge and Rust package clash-verge version 2.5.5, bundle id io.github.clash-verge-rev.clash-verge-rev, license GPL-3.0-only, with lib app_lib built as staticlib, cdylib, and rlib. — [package.json](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/package.json) [src-tauri/Cargo.toml](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/Cargo.toml) [src-tauri/tauri.conf.json](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/tauri.conf.json)
- main() in src-tauri/src/main.rs builds a multi-thread Tokio runtime named clash-verge-runtime-* with at most 8 worker threads and twice that many blocking threads, sets it as the Tauri async runtime, then calls app_lib::run(). The perf-harness feature on macOS swaps in scripts/perf/app.rs instead. — [src-tauri/src/main.rs#L16-L37](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/src/main.rs#L16-L37)
- app_init::setup_plugins registers sysinfo, notification, updater (with a custom comparator that also treats build-to-stable as newer), clipboard, process, global-shortcut, fs, dialog, shell, opener, deep-link, http, and tauri-plugin-mihomo over a local socket at IClashTemp::guard_external_controller_ipc. Devtools load only for debug builds with tauri-dev and without tokio-trace. — [src-tauri/src/lib.rs#L42-L78](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/src/lib.rs#L42-L78)
- The only IPC command table is app_init::generate_handlers, covering listener probes, proxy ports, profiles, clash/DNS, service install, runtime YAML, UWP, backups, WebDAV, and media-unlock checks. — [src-tauri/src/lib.rs#L126-L216](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/src/lib.rs#L126-L216)
- Frontend bootstrap is src/main.tsx: Vite root src, dev server port 3000, React 19 StrictMode, SWR, WindowProvider, AppDataProvider, and a createBrowserRouter whose children come from navItems. beforeDevCommand is pnpm run web:dev and frontendDist is ../dist. — [src/main.tsx#L43-L74](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src/main.tsx#L43-L74) [src/pages/_routers.tsx](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src/pages/_routers.tsx) [vite.config.mts](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/vite.config.mts) [src-tauri/tauri.conf.json#L23-L28](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/tauri.conf.json#L23-L28)
- The Cargo workspace members are src-tauri plus crates clash-verge-draft, clash-verge-media-unlock, clash-verge-logging, clash-verge-signal, tauri-plugin-clash-verge-sysinfo, clash-verge-i18n, and clash-verge-limiter. tray-icon is patched from Tunglies/tray-icon branch fix/macos-27-click-reentrancy. — [Cargo.toml#L1-L63](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/Cargo.toml#L1-L63)
- Bundled externalBin sidecars are sidecar/verge-mihomo and sidecar/verge-mihomo-alpha. scripts/prebuild.mjs downloads the Mihomo core and the clash-verge-service binary into src-tauri/sidecar or src-tauri/resources (Linux service binaries go to the sidecar dir). — [src-tauri/tauri.conf.json#L17](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/tauri.conf.json#L17) [scripts/prebuild.mjs#L67-L70](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/scripts/prebuild.mjs#L67-L70)
- App home is dirs::data_dir() joined with APP_ID (the .dev id when feature verge-dev is on). Files there include verge.yaml, config.yaml, profiles.yaml, profiles/, logs/, icons/, clash-verge.yaml, dns_config.yaml, and window_state.json. — [src-tauri/src/utils/dirs.rs#L11-L31](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/src/utils/dirs.rs#L11-L31) [src-tauri/src/utils/dirs.rs#L95-L111](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/src/utils/dirs.rs#L95-L111) [src-tauri/src/constants.rs#L56-L61](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/src/constants.rs#L56-L61)
- Privileged core control uses clash_verge_service_ipc 2.7.3 with the client feature. Feature verge-dev also enables that crate's development-channel. CoreManager::start_core_inner picks StartupDecision::Service or Sidecar from ServiceStatus, with a Windows sidecar fallback. — [src-tauri/Cargo.toml#L102-L104](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/Cargo.toml#L102-L104) [src-tauri/Cargo.toml#L17-L21](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/Cargo.toml#L17-L21) [src-tauri/src/core/manager/lifecycle.rs#L40-L49](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/src/core/manager/lifecycle.rs#L40-L49) [src-tauri/src/core/manager/lifecycle.rs#L572-L633](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/src/core/manager/lifecycle.rs#L572-L633)
- Deep-link desktop schemes are clash and clash-verge. The updater plugin pins a minisign pubkey and three endpoints, trying update.hwdns.net and gh-proxy.org before the GitHub update.json. Windows install mode is passive. — [src-tauri/tauri.conf.json#L32-L48](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/tauri.conf.json#L32-L48)
- Rust toolchain file pins channel 1.98.1 with rustfmt and clippy. The crate rust-version is 1.95 and edition 2024. pnpm scripts are dev, dev:service, dev:sidecar, build, web:build, typecheck, lint, and test (vitest run). — [rust-toolchain.toml](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/rust-toolchain.toml) [src-tauri/Cargo.toml#L10-L11](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/src-tauri/Cargo.toml#L10-L11) [package.json#L5-L41](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/package.json#L5-L41)
- Release workflow .github/workflows/release.yml runs on tags v*.*.*, requires the tag commit to be on main, and requires the tag to equal v plus package.json version. dev.yml is a manual matrix of Windows, macOS aarch64, and Linux deb/nsis/dmg bundles and does not run unit tests. — [.github/workflows/release.yml#L1-L59](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/.github/workflows/release.yml#L1-L59) [.github/workflows/dev.yml#L1-L63](https://github.com/clash-verge-rev/clash-verge-rev/blob/fd06fbb3b71ee5c4467bc0e3cc505dcac5348371/.github/workflows/dev.yml#L1-L63)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
