Skip to content

Visual Studio Code, rebuilt in Rust

Rust
1.2 KB
Raw Blame
diff --git a/src/bootstrap-exthost.ts b/src/bootstrap-exthost.ts
new file mode 100644
index 00000000000..2294a81537f
--- /dev/null
+++ b/src/bootstrap-exthost.ts
@@ -0,0 +1,19 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+// Entry of the extension host bundle that the native (GPUI) app starts, on Bun or on Node.
+// It does what bootstrap-fork.ts and bootstrap-esm.ts do for the host, minus Electron's ASAR and crash reporter.
+// First: Electron's UNC host check on every `fs` path (utilityProcess.ts NODE_UNC_HOST_ALLOWLIST).
+import './vs/base/node/uncFsGuard.js';
+import { product, pkg } from './bootstrap-meta.js';
+import { removeGlobalNodeJsModuleLookupPaths } from './bootstrap-node.js';
+
+globalThis._VSCODE_PRODUCT_JSON = { ...product };
+globalThis._VSCODE_PACKAGE_JSON = { ...pkg };
+globalThis._VSCODE_FILE_ROOT = import.meta.dirname;
+
+removeGlobalNodeJsModuleLookupPaths();
+
+await import('./vs/workbench/api/node/extensionHostProcess.js');