Skip to the content.

Design: the pre-bundled plugin architecture

← Back to index

Historical. This is the plan the current architecture grew from (September 2026), kept for the reasoning. Where it disagrees with the rest of this site — the install domain, IndexedDB, per-plugin details — the rest of the site is right.

Goal Description

Transition the VRCNext Plugin System from a client-side runtime evaluation model (IndexedDB + dynamic Blob URLs) to an Ahead-Of-Time (AOT) compiled monolithic bundle.

Under this model:

  1. Zero-Dependency One-Liner Installer: End-users run a clean one-liner from the base domain:
    • Linux / macOS: curl -sSL https://vrcx-plugins.github.io/install.sh | bash
    • Windows PowerShell: iwr -useb https://vrcx-plugins.github.io/install.ps1 | iex (Neither Git nor Node.js is required on the user’s PC!)
  2. Pure-Rust In-Process Git Engine (gix / gitoxide): All Git repository cloning, branch tracking, commit verification, and updating are performed in-process inside vrcnext-bridge using the pure-Rust gix crate. No external git binary, no C-compiler/CMake (libgit2) dependencies, and zero command-line injection surface.
  3. Standalone Compilation Engine (esbuild): vrcnext-bridge drives a standalone static esbuild binary (~9 MB) located in ~/.vrcnext-plugins/bin/. Compiles TypeScript plugins into the VRCNext custom theme in < 30 milliseconds without Node.js or pnpm.
  4. Flat Plugin Repositories (1 Repo = Root main.ts): Plugin repositories are flat: main.ts directly in the repository root, exporting definePlugin({ ... }) (identical to Vencord’s authoring model).
  5. In-App Management: The VRCNext “Manage Plugins” UI communicates with vrcnext-bridge over local loopback (http://127.0.0.1:42081) to clone/pull plugin repos via gix and compile the unified bundle.

Security Analysis: Pure-Rust gix vs CLI Spawning

[!NOTE] Summary on Security: Using gix (gitoxide) eliminates command-line injection and argument injection entirely by keeping all Git network and repository operations inside Rust memory.

1. Complete Elimination of CLI & Argument Injection

2. Supply-Chain & State Predictability

3. Remaining Considerations


Ecosystem Comparison

Dimension Equicord / Vencord Our Planned VRCNext Model
Normal Users Downloads pre-compiled release bundle (dist.zip). Cannot add unmerged 3rd-party git plugins. Can install any 3rd-party plugin Git repo via UI; vrcnext-bridge automatically compiles it locally in <30ms.
Custom Git Plugins Requires Node.js + pnpm installed on user PC. Runs pnpm build --dev via child_process.exec. Zero Node.js dependency: Spawns standalone static esbuild binary.
Git Dependency Requires system git in PATH. Zero Git dependency: Uses pure-Rust gix in vrcnext-bridge. User does not need git.exe installed.
Plugin Authoring Flat index.ts exporting definePlugin({ ... }). Flat main.ts directly in repo root exporting definePlugin({ ... }).

Architecture Flow

flowchart TD
    A["End User"] -->|"Runs one-liner"| B["install.sh / install.ps1 on vrcx-plugins.github.io"]
    B -->|"Downloads bridge + esbuild + core"| C["~/.vrcnext-plugins/"]
    B -->|"Sets up service or startup"| S["vrcnext-bridge daemon (:42081)"]
    C -->|"Compiles initial bundle"| D["VRCNext custom-themes"]
    
    subgraph in_app ["In-App Plugin Management"]
        E["VRCNext UI: Manage Plugins"] -->|"POST /v1/plugins/install"| S
        S -->|"gix in-process clone"| G["plugins/plugin-id/main.ts"]
        S -->|"Runs standalone esbuild"| H["esbuild binary"]
        H -->|"Overwrites vrcnext-plugin-host.js"| D
        S -->|"Returns 200 OK"| E
        E -->|"Displays: Theme reloaded"| A
    end

Proposed Changes

Component 1: Cross-Platform Unified Installer (No Node, No Git Required)

[NEW] vrcnext-plugin-system/scripts/installer/install.sh

[NEW] vrcnext-plugin-system/scripts/installer/install.ps1


Component 2: Native Companion (vrcnext-bridge) with In-Process gix

[MODIFY] vrcnext-bridge/Cargo.toml

Add gix dependency with blocking HTTP/reqwest-rustls features:

gix = { version = "0.72", default-features = false, features = ["blocking-http-transport-reqwest-rustls", "revision"] }
url = "2"

[NEW] vrcnext-bridge/crates/vrcnext-bridge-plugins

Dedicated sub-crate in vrcnext-bridge handling plugin lifecycle & bundling:

[MODIFY] vrcnext-bridge/crates/vrcnext-bridge-server

Expose HTTP endpoints on port 42081:


Component 3: Build & Static Plugin Linking Pipeline

[NEW] vrcnext-plugin-system/packages/host/src/static-plugins.ts


Component 4: Web UI Updates

[MODIFY] vrcnext-plugin-system/packages/host/src/ui/manager-panel.ts


Verification Plan

Automated Tests

  1. gix Clone & Pull Tests:
    • Unit tests in vrcnext-bridge-plugins testing clone_plugin, pull_plugin, and URL validation with mock/local repositories.
    • Test rejection of invalid schemes (file://, ssh://, ext::).
  2. Bundler Engine Tests:
    • Integration test running esbuild against 0, 1, and multiple mock main.ts plugins to confirm correct IIFE bundle generation.
  3. Host Test Suite:
    • Ensure all 71 existing unit tests in vrcnext-plugin-system pass via ./scripts/check.sh.

Manual Verification

  1. Run install.sh on blu-pc-bazzite.
  2. Verify vrcnext-bridge starts and serves /v1/plugins/list.
  3. In VRCNext UI, paste a sample plugin GitHub URL.
  4. Verify vrcnext-bridge clones via gix into ~/.vrcnext-plugins/plugins/ and compiles vrcnext-plugin-host.js in <50ms.
  5. Reload theme and verify the plugin activates immediately.