import { setupNativeWorkingDir } from './native-path' type DllModule = typeof import('./work-dll.service') let dllMod: DllModule | null = null let nativeReady = false function ensureNativeEnv(): void { if (nativeReady) return setupNativeWorkingDir() nativeReady = true } export async function loadDllModule(): Promise { ensureNativeEnv() if (!dllMod) { dllMod = await import('./work-dll.service') } return dllMod }