From 59f2ebb2684300af7710f1a753bae62cb082d46a Mon Sep 17 00:00:00 2001 From: codecolorist Date: Tue, 14 Apr 2026 14:34:58 +0000 Subject: [PATCH] disable WASM SQLite engine, use KV backend only --- src/lib/engine/index.ts | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/lib/engine/index.ts b/src/lib/engine/index.ts index 7954c94..8730fb5 100644 --- a/src/lib/engine/index.ts +++ b/src/lib/engine/index.ts @@ -1,28 +1,8 @@ import type { Engine } from "./types"; -import { WASMEngine } from "./wasm"; -import { checkWASMSupport as checkSQLiteWASMSupport } from "./wasm"; import { KVEngine } from "./kv"; -let wasmSupported: boolean | null = null; -const wasmDisabled = process.env.NEXT_PUBLIC_USE_WASM === "0"; - -async function checkWASMSupport(): Promise { - if (wasmSupported !== null) return wasmSupported; - - wasmSupported = await checkSQLiteWASMSupport(); - return wasmSupported; -} - export async function createEngine(group: string): Promise { - if (wasmDisabled) { - return new KVEngine(group); - } - - const supported = await checkWASMSupport(); - if (supported) { - return new WASMEngine(); - } return new KVEngine(group); } -export { KVEngine, WASMEngine }; +export { KVEngine };