{"_id":"@cohesiumai/providers-wasm","_rev":"3-063529f18c50eef8ab9876a7ac521678","name":"@cohesiumai/providers-wasm","dist-tags":{"latest":"2.1.2"},"versions":{"1.0.0":{"name":"@cohesiumai/providers-wasm","version":"1.0.0","license":"MIT","_id":"@cohesiumai/providers-wasm@1.0.0","maintainers":[{"name":"cohesiumai","email":"renald@cohesium.ai"}],"dist":{"shasum":"e4c98fa2fb954b4aaedad2097d9302e5fee686e3","tarball":"https://registry.npmjs.org/@cohesiumai/providers-wasm/-/providers-wasm-1.0.0.tgz","fileCount":5,"integrity":"sha512-jf/jIOwIbFNr9tzMixz4dnG3j1lVQhsjoLdQpBylQKyxwzokl9GjG7sULSe0HLSJqlMr0ZY215eiL8A/+7myaQ==","signatures":[{"sig":"MEUCIQDhyq/Wo3j3eVINBybcpC86pVH4jCOfv+xXBrm3hyiSKQIgNDgtTtUryut7i91J7Jki97Eh56Asvvxmb1sPVdQy6CQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9304},"main":"dist/index.js","type":"module","_from":"file:cohesiumai-providers-wasm-1.0.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"cohesiumai","email":"renald@cohesium.ai"},"_resolved":"/tmp/95b92df3acb30438a535c0426ba5d9d1/cohesiumai-providers-wasm-1.0.0.tgz","_integrity":"sha512-jf/jIOwIbFNr9tzMixz4dnG3j1lVQhsjoLdQpBylQKyxwzokl9GjG7sULSe0HLSJqlMr0ZY215eiL8A/+7myaQ==","_npmVersion":"10.8.2","description":"WASM fallback provider for browser-ai — universal compatibility","directories":{},"_nodeVersion":"20.19.6","dependencies":{"@cohesiumai/core":"0.2.0","@huggingface/transformers":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","vitest":"^2.1.9","typescript":"^5.6.3"},"peerDependencies":{"@cohesiumai/core":">=0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/providers-wasm_1.0.0_1768902458512_0.7325158283518318","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@cohesiumai/providers-wasm","version":"1.0.1","license":"MIT","_id":"@cohesiumai/providers-wasm@1.0.1","maintainers":[{"name":"cohesiumai","email":"renald@cohesium.ai"}],"dist":{"shasum":"f120813357d6d7f37b94338d0add703835075550","tarball":"https://registry.npmjs.org/@cohesiumai/providers-wasm/-/providers-wasm-1.0.1.tgz","fileCount":5,"integrity":"sha512-CUTPhUKOfx/3CMHM9tOFgtG2rJpmYdqvgHUSKKdzFr1KQbgnBlejzzzJlq5AzGC4EI5RUSLtgboqUnP2XWRPJQ==","signatures":[{"sig":"MEUCIQDy2+eIP1HeiCkMfPyh7lILogbnwgD2GZf1sirRl0w80wIgVcvJBkT/QnIA6vq4Jpwk3crv/jmRQGvG5pdcBtTb6Yw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9304},"main":"dist/index.js","type":"module","_from":"file:cohesiumai-providers-wasm-1.0.1.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"cohesiumai","email":"renald@cohesium.ai"},"_resolved":"/tmp/728ebb1193cb369788ad97b8c3e2ae5d/cohesiumai-providers-wasm-1.0.1.tgz","_integrity":"sha512-CUTPhUKOfx/3CMHM9tOFgtG2rJpmYdqvgHUSKKdzFr1KQbgnBlejzzzJlq5AzGC4EI5RUSLtgboqUnP2XWRPJQ==","_npmVersion":"10.8.2","description":"WASM fallback provider for browser-ai — universal compatibility","directories":{},"_nodeVersion":"20.19.6","dependencies":{"@cohesiumai/core":"0.2.1","@huggingface/transformers":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","vitest":"^2.1.9","typescript":"^5.6.3"},"peerDependencies":{"@cohesiumai/core":">=0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/providers-wasm_1.0.1_1768905736034_0.47117693303240826","host":"s3://npm-registry-packages-npm-production"}},"2.1.2":{"name":"@cohesiumai/providers-wasm","version":"2.1.2","description":"WASM fallback provider for browser-ai — universal compatibility","type":"module","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@cohesiumai/core":"2.1.2","@huggingface/transformers":"^3.0.0"},"devDependencies":{"tsup":"^8.2.4","typescript":"^5.6.3","vitest":"^2.1.9"},"peerDependencies":{"@cohesiumai/core":"2.1.2"},"publishConfig":{"access":"public"},"license":"MIT","scripts":{"build":"tsup src/index.ts --format esm --dts","typecheck":"tsc -p tsconfig.json --noEmit","lint":"eslint .","test":"vitest run --passWithNoTests"},"_id":"@cohesiumai/providers-wasm@2.1.2","_integrity":"sha512-ELCwOuZ/y1Je2P1UxB0E2Txz9bU5fi879sla9zeBSkX5NMov2Wdg2NVRjaiHpzu+WjYFM3XytyvBfmQBAw5VYw==","_resolved":"/tmp/4a776628d0125ca7b0910c33df58ad4e/cohesiumai-providers-wasm-2.1.2.tgz","_from":"file:cohesiumai-providers-wasm-2.1.2.tgz","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ELCwOuZ/y1Je2P1UxB0E2Txz9bU5fi879sla9zeBSkX5NMov2Wdg2NVRjaiHpzu+WjYFM3XytyvBfmQBAw5VYw==","shasum":"fc354cc18da44b7ee9470a7c1427ddbd278c87ce","tarball":"https://registry.npmjs.org/@cohesiumai/providers-wasm/-/providers-wasm-2.1.2.tgz","fileCount":5,"unpackedSize":9302,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGNe43qA2SJxGp4oP6xmK/9MTPyeXpxizNp/d5HmQyC6AiEA2lZruQye5t1dSphKuJz6zuSWoXHuMJbuFygqgNvTr2E="}]},"_npmUser":{"name":"cohesiumai","email":"renald@cohesium.ai"},"directories":{},"maintainers":[{"name":"cohesiumai","email":"renald@cohesium.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/providers-wasm_2.1.2_1768910614483_0.9796705216309873"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-20T09:47:38.399Z","modified":"2026-01-20T12:03:34.759Z","1.0.0":"2026-01-20T09:47:38.636Z","1.0.1":"2026-01-20T10:42:16.162Z","2.1.2":"2026-01-20T12:03:34.624Z"},"license":"MIT","description":"WASM fallback provider for browser-ai — universal compatibility","maintainers":[{"name":"cohesiumai","email":"renald@cohesium.ai"}],"readme":"# @cohesiumai/providers-wasm\n\n> WASM provider for browser-ai — Universal fallback using WebAssembly.\n\n## Installation\n\n```bash\npnpm add @cohesiumai/providers-wasm\n```\n\n## Usage\n\n```typescript\nimport { createWASMProvider } from '@cohesiumai/providers-wasm';\n\nconst provider = createWASMProvider();\n\n// Check availability (always true in modern browsers)\nconst result = await provider.detect();\nif (result.available) {\n  console.log('WASM is available');\n}\n```\n\n## Browser Support\n\n| Browser | Support |\n|---------|---------|\n| Chrome | ✅ Full |\n| Edge | ✅ Full |\n| Firefox | ✅ Full |\n| Safari | ✅ Full |\n| Mobile browsers | ✅ Full |\n\n## Features\n\n- **Universal Compatibility** — Works in all modern browsers\n- **No GPU Required** — CPU-based inference\n- **Reliable Fallback** — Always available option\n- **Smaller Models** — Optimized for quantized models\n\n## API\n\n### `createWASMProvider(options?)`\n\nCreates a new WASM provider instance.\n\n```typescript\ninterface WASMProviderOptions {\n  numThreads?: number;  // Worker threads (default: navigator.hardwareConcurrency)\n  simd?: boolean;       // Use SIMD if available (default: true)\n}\n```\n\n### Provider Interface\n\n- `detect()` — Check if WASM is available\n- `init(config, modelSpec)` — Initialize with model\n- `generate(params)` — Run inference\n- `abort()` — Cancel current generation\n- `teardown()` — Cleanup resources\n- `getDownloadProgress()` — Get model download status\n\n## Performance Notes\n\nWASM inference is slower than WebGPU or WebNN but provides:\n- Consistent behavior across all browsers\n- No GPU memory constraints\n- Works on low-end devices\n\nRecommended for:\n- Fallback when other providers unavailable\n- Small quantized models (Q4, Q8)\n- Text-only tasks with moderate latency tolerance\n\n## V0.2+\n\nThis provider was introduced in browser-ai V0.2.\n\n## License\n\nMIT © 2026\n","readmeFilename":"README.md"}