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 };