/** * Slim version of web-csv-toolbox with smaller bundle size (Browser/Web version). * * **Key Differences from main entry:** * - Does NOT include base64-inlined WASM (smaller bundle size) * - Requires manual WASM initialization via `loadWASM(wasmUrl)` * - Uses streaming WASM loading instead of synchronous base64 loading * * **Trade-offs:** * - ✅ Smaller bundle size * - ✅ Uses streaming WASM loading (better for production) * - ❌ Requires manual `await loadWASM(wasmUrl)` before using WASM-based APIs * - ❌ No automatic WASM initialization * * **Architecture:** * - Common exports are in `slim.shared.ts` * - This file only contains Web-specific exports * - Build-time resolution: Vite plugin resolves `#/wasm/loaders/*` imports based on entry file name * - WASM loader selection: `.web.ts` → uses `loadWASM.web.ts` (streaming fetch) * * @example Basic usage (recommended) * ```ts * import { loadWASM, parseStringToArraySyncWASM } from 'web-csv-toolbox/slim'; * import wasmUrl from 'web-csv-toolbox/csv.wasm?url'; * * // REQUIRED: Manual initialization with WASM URL * await loadWASM(wasmUrl); * * // Now you can use WASM-based APIs * const result = parseStringToArraySyncWASM(csv); * ``` * * @example Custom WASM URL * ```ts * import { loadWASM, parseStringToArraySyncWASM } from 'web-csv-toolbox/slim'; * * // Load from custom URL (e.g., CDN) * await loadWASM('https://cdn.example.com/csv.wasm'); * * const result = parseStringToArraySyncWASM(csv); * ``` * * @packageDocumentation */ /** biome-ignore-all assist/source/organizeImports: For sort by category */ export * from './slim.shared'; export * from './worker/helpers/ReusableWorkerPool.web'; export { ensureWASMInitialized, isWASMReady, loadWASM, resetInit, } from './wasm/WasmInstance.slim'; export * from './wasm/WasmInstance.slim';